Hello folks,
Does anyone know how to express points move in code? for example, if a price closes more than 5 points higher than N time frames ago, I want to see a signal (the latter I know how to do, it’s the first part which I’m struggling with!)
Thanks
Variable Cond will either be true (1) or false (0):
Cond = close > (highest[5](high[1]) + 5 * pipsize)
actually any value <> 0, not just 1, is considered to be true.
Roberto’s code will return true if the current close is 5 pips higher than the highest high in the last 5 candles. If you just want it to be 5 pips higher than the close 5 candles ago then you need to use:
Cond = close > (high[4] + (5 * pipsize))