Comparison of candles at different times.
-
Good afternoon! I would like to make an EA that could compare the current candle of a temporality, for example M5 with another candle of another temporality, for example H1, the comparison is to know if the candle has a downtrend in M5 and in the temporality its trend is the opposite , ie bullish to be able to tell the EA that if the trends are the same there will be an operation and if they are different that it does not do anything. This is possible, how? Thank you very much for anticipating.
-
@banditdos No sure if I fully understand. Is this what you want?:
Timeframe: 5M -> last candle was bullish
Timeframe: 1H -> last candle was bullishThen buy
Timeframe: 5M -> last candle was bearish
Timeframe: 1H -> last candle was bullishDo nothing
-
Why not use trendline then?
-
@l-andorrà Hello @andorra !, if it is exactly what I need and if you can also verify if the trend is also the same even better. If you can tell me how it would be both possibilities, I would appreciate it very much.
@biztet said in Comparison of candles at different times.:
Why not use trendline then?
@biztet , If also, I would need both possibilities.
Thank you both very much.
-
@Banditdos , within 1 hour the H1 candle can change bullish/bearish few times. Trendline will the your best choice if you want to confirm the current trend in H1. You can compare with many indicators, MA, MACD, adx, etc...
And of course your setting will define the trend.Just think of the reversal candle.
-
@banditdos Here you have it. I didn't include the part of the trendline because that can be veruy different depending on the chose criteria as biztet suggested:
