Hi all,
I'm just learning MQL and would like to know the easiest way to find out if a trend is going long or short based on the last 2 bars.
For example, if the close price is 1.2345 for Close[2] and the close price is 1.2350 for Close[1], and the current Close price is 1.2360 for Close[0].
Would I do something like
if(Close[2] < Close[1] && Close[1] < Close[0]) {
}
and do the same for a down trend but reversed
Or is there a more professional way to do it.
Thanks for your help
Nudge