My iCustom code always return empty value (2147483647)----------------------(second edition)
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
this is the indicator code
and this is the expert advisor