Source: https://fxcodebase.com/code/viewtopic.php?f=17&t=76252
Forum: 17 · Topic 76252 · 1 post(s)
Apprentice · Mon Aug 18, 2025 2:29 pm


For each selected currency pair and timeframe, the script calculates three moving averages (MA1, MA2, MA3).
It then checks the last candle: If close > MA1 and open < MA1 (candle crosses MA1 upward) → signal “Up” But only if confirmation is enabled and the trend is aligned (MA1 > MA2 > MA3), or if confirmation is turned off.
If close < MA1 and open > MA1 (candle crosses MA1 downward) → signal “Down” With confirmation, it requires MA1 < MA2 < MA3 (downtrend alignment) or if confirmation is turned off.