in your indicator, replace
while(pos-1>0)
with
while(pos>=0)
You are giving the same value to historical bars when starting the indicator
Did you intend this?
int start(){ int count = IndicatorCounted(); int pos = Bars - count; while(pos>=0) { var_a[pos]=iMACD(NULL, 0, 8, 17, 9, PRICE_CLOSE, MODE_SIGNAL, pos); var_b[pos]=iMACD(NULL, 0, 8, 17, 9, PRICE_CLOSE, MODE_MAIN, pos); pos--; } return (0); }
.
Hey there,
where is Maintrend_TimeFrame coming from? And when does it return 0, during backtest, live or when added in backtest to another EA? When added to strategy tester while you testing another EA, it cannot work, because the tester does not support other timeframes int such case, just btw.
Doerk
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
this is the indicator code
and this is the expert advisor