- Why did you post your MT4 question in the Root / MT5 General
section instead of the MQL4 section, (bottom of the Root
page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. As they did with your previous post. - There are not "two Low[1]". There is only one, the last complete candle low (Low[1]) and the previous candle low (Low[2]). There isn't an "old Close[1] and new Close[1]". The last close (Close[1]) becomes close[2] as soon as a new candle starts.
- Eng Keat Ang: next next candle low is 1.44 which is lower than previous low (1.55) then do something.Code it exactly like you stated.
if( Low[1] < Low[2] ) DoSomething();
- Why did you post your MT4 question in the Root / MT5 General
section instead of the MQL4 section, (bottom of the Root
page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. As they did with your previous post. - There are not "two Low[1]". There is only one, the last complete candle low (Low[1]) and the previous candle low (Low[2]). There isn't an "old Close[1] and new Close[1]". The last close (Close[1]) becomes close[2] as soon as a new candle starts.
- Code it exactly like you stated.
That is the problem.
I cannot use code :
if( Low[1] < Low[2] ) DoSomething();
Because sometime next candle won't be lower than previous candle, need to wait 6th candle only will find lower than the previous 6th candle back. So
I need to have old Low[1] and new Low[1]. Is it posible to store Low[1] at variable or array or private class? And when found new Low[1] is lower
than the old 1, then do something.
https://www.mql5.com/en/forum/316883Eng Keat Ang:
Because sometime next candle won't be lower than previous candle,
need to wait 6th candle only will find lower than the previous 6th candle back.
So I need to have old Low[1] and new Low[1].
Is it posible to store Low[1] at variable or array or private class?
And when found new Low[1] is lower than the old 1, then do something.
- So what?
- Now you are changing your problem. That isn't what you originally posted. That is what your other
thread already discussed. You already know how — you posted the code:
int iLL = iLowest(_Symbol, _Period, MODE_LOW, 6, 2); // Lowest candle 6 back. if (Low[1] < Low[iLL]) { // Last candle is lower. DoSomething(); }
- Stop saying that. There are no old and new, there are only candles, the forming one (0,) the last one (1,) the
previous one (2,) …
- Why do you think you need to store values in a variable or array, when they are already in an array to start with?
- That is your original question and was answered, but you state you "cannot use code." Until you can concretely describe what you want, you
can't code it.
Asked and answered
if( Low[1] < Low[2] ) DoSomething();
Asked and answered
i see. I got what you mean know. Thanks.
Asked and answered
should be
if(
Low[1] <
Low[2]
) DoSomething();
if(
Low[1]
< Low[3]
) DoSomething();

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use