Join & EARN

FOREX ALGOS { }

Confirmation Filter

An additional condition required to validate a trade signal, reducing false entries. A confirmation filter ensures that the primary entry signal is supported by one or more secondary signals or market conditions. For example, a breakout entry might require volume to be above average or an ADX above 25 to confirm trend strength. In practice, this is implemented by adding extra if conditions (logical AND) in the entry logic.

  • Definition: A secondary check applied to an entry signal. If the filter condition fails, the trade is not taken. For instance, “only buy if the MACD indicates momentum and RSI is above 50.” This double-checking “determines whether a breakout has taken place”, for example.

  • Context: A confirmation filter is often implemented by combining conditions: e.g. if(MainSignal && FilterCondition) then EnterTrade. It may use additional indicators, market data, or time filters.

  • Example Code:

    // Only enter long if RSI confirms the MA crossover
    if(iCross(Symbol(),0,fastMA,slowMA,1) == 1 && iRSI(Symbol(),0,14,PRICE_CLOSE,1) > 50)
    OrderSend(...);
    // cAlgo: MA crossover plus RSI confirmation
    if (Indicators.MACrossover.CrossOver() && Indicators.RSI(14).Result.LastValue > 50)
    ExecuteMarketOrder(TradeType.Buy, SymbolName, volume, "Bot");
    // NinjaScript: only enter if price above 200 SMA and RSI > 50
    if (CrossAbove(Close, SMA(200), 1) && RSI(14)[0] > 50)
    EnterLong();