M
Use the SRC button in the posting page here and paste in the whole code - cant read it all - or well enough!
-BB-
M
> second trade won't be allowed by this expression
You think?
In fact it will & it can because you are not defining the logic as closely enough
As you are evaluating every tick - start() runs every tick - the expression
(ADX0 > ADX1)
and
(PDI0 < MDI0 && PDI0 < PDI1 && MDI0 > MDI1)
could both have been true at some point during the bars formation
Also the values of
bought
and
sold
are being reset every tick to the extern values
To preserve their value for across successive runs of start(), change them from externs to static values
Good Luck
-BB-
Thanks for explanation. I didn't knew, that it runs every tick :( Now I know why all my tries crashes...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can anybody help me with this problem? As you can see on picture, where is highlighted the main expression and the values from graph on left, the second trade won't be allowed by this expression... but it happens and i can't figure WHY? But it isn't all - it even don't match the expression for SELL so...
(+DI is blue, -DI is red and ADX is silver)
PLEASE HELP - THANKS
MAARTY