- Wont work in EA
- Simple program to buy on open and sell on close
- whats is wrong with this code
Add . . . Print("limit= ", limit); before your "main loop" . . see what it is, I suspect it is <= 1
RaptorUK:
Add . . . Print("limit= ", limit); before your "main loop" . . see what it is, I suspect it is <= 1
Add . . . Print("limit= ", limit); before your "main loop" . . see what it is, I suspect it is <= 1
ok. I have found the problem. Thanks for the help.
for(int shift= limit-1; shift >=1; shift--) { int M15_bar3 = iBarShift(NULL, PERIOD_M15, Time[shift]); double M15_Close3 = iClose(NULL, PERIOD_M15, M15_bar3); }
The loop does nothing. If you want the LAST 15 minute bar just:// for(int shift= limit-1; shift >=1; shift--) // { int M15_bar3 = iBarShift(NULL, PERIOD_M15, Time[1]); double M15_Close3 = iClose(NULL, PERIOD_M15, M15_bar3); // }
- If you want the 15 minute bar of the candle you're computing you'ld use Time[i]
- But you're not using the variables at all. Delete the loop.
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