Are you trying to find the most recent high and low ? (swing)
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
William Roeder #:
thanks for your answer..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
Files:
qqq.png
84 kb
Leak_Tabel-v01.mq5
3 kb
i think the problem is the amount of tBars...
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..
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..
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
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