Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
can i write a line of code that if the up volume > down volume then ....
I have a program i notice when it places a trade a loses the down volume is greater than the up volume
Is there a way i can write a line of code if Up Volume > Down Volume then ....
I tried
if volume > VOVO
and "upticks bars > DownTicks bars"
and
ROC1 > RATEY
and
Price[1] crosses above ExpAv1[1]
then
begin
buy ( "buy") Cts contracts next bar at market ;
end;
and it returns this message to me when i try to compile
------ Compiled with error(s): ------
'If' condition must be followed by the word 'Then'
line 42, column 0
My 2 cents are that it is going to be very difficult for someone to help you with questions like these. I would recommend that you at least go through a tutorial that introduces you to the basics of EasyLanguage.
I would also recommend including your intended program logic in plain language so that someone understands what exactly you are trying your code to do for you.
The more specific the question, the better chances you have at getting it answered.
For this specific error message, I am copying the built in TradeStation help which you can easily access by pressing F1 in the Development environment:
in my opinion you are looking for the reserved words UpTicks and DownTicks, they will only work with realtime data though. It appears the error comes from you using words that are not recognized by the compiler.
I would like to second what @Hulk wrote, take the time going over some tutorials or the EL Essentials PDF and I can almost guarantee you that it will boost your coding to a new level. In the end you will save a lot of time and hassle by devoting some time to laying a solid foundation.
From looking at your code it might be possible you are not getting the correct Volume information when using "Volume" as a reserved word. Take a look at the build in Volume indicator. You should check for the bartype and either use TIcks or Volume depending on the Bar type you are using, as there is a difference for daily bars or minute and lower.