This is actually MT4 code, I didn't know there was another section for MT4. But anyway, please help.
Changing the draw limit of all indicators from 1000 to 99 seems to solve the problem.
Otherwise the iCustom function always give crazy numbers
Edit: Just found out it was because of tickdatasuite setting that only shows 100 bars before.
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
Please help? I used two indicators for opening position and when one of the indicators go from positive to negative it is supposed to close all orders. But during backtest the order never closes.
Update: turns out the iCustom(Symbol(),PERIOD_CURRENT,"mt",0,0) < 0 never is true. But when I look at the stopped strategy tester, the indicators seem fine and it becomes <0 at some point.
(Even the send order condtion is not working properly.)
I have three indicators "mta", "mtb" and "mt". mt calls for mta and mtb via the iCustom function also.
It says "array out of range in "mt"(or mta)" in the journal. I don't know if that has something to do with it.