Problem with ArrayMaximum() function
double _high = gHigh[lastHi]; double _low = gLow[lastLo];
You haven't set the array direction before filling. In order not to depend on defaults, call the ArraySetAsSeries() function for the arrays to work with.
Event Handling / OnCalculate - Reference on algorithmic/automated trading language for MetaTrader 5
You haven't set the array direction before filling. In order not to depend on defaults, call the ArraySetAsSeries() function for the arrays to work with.
Event Handling / OnCalculate - Reference on algorithmic/automated trading language for MetaTrader 5
i have set the array as series array..
but now i got my terminal freezed..
i think the problem is the value of "k-lastHi" or "lastHi-k" in series array..
if i replace it with a number, it work..
but when i use the "k-lastHi", it freezed
my old machine can not handle with large amount bars calculation..
when i reduce tbar to max 1000,, its run...
theres no problem with the arraymaximum function..
its my computer fault..
sorry for that and thanks for your help..
i try to create multi timeframe indicator, later, i want to apply it to my ea
i use copyhigh() and copylow() functions to get data.
but when i use arraymaximun an minimum function,
it look like error
please tell me what should i do
here's the code