How to check future candle prices
-
Hello,
I need some help Please.
I have some conditions ,if there are true i need my ea wait and check if the next,or two,three candles later the price it will be up than the current price(which the condition are true),then buy now.It will be very easy with candle Id, but as i know i can't put negative prices.Is any easy way to do it with fxdreema or should i code custom mql4 code? -
Then check the last (or last 2 or last 3) bars for the condition. You cannot check something that has not yet come to pass. Remember that when you are checking something it is because it is happening (current bar) or has already passed (you actually can feed negative bar ID numbers but only for drawing something because there's no bar there in ID -1), so imagine all the conditions already passed (when the trade would trigger) and plan it that way. So if you want to check certain condition and then check if the next or 2 or 3 bars later the price is higher, then you need to check at each bar if in the last three bars (that would be bar ID 1, 2 and 3) all your conditions have been met (that is if the pattern you are looking for formed and also if said previous bars have a lower open price).