1. Flux Charts
    2. S&D Backtester

    S&D Backtester: Strategy Examples

    S&D Backtester Strategy Examples

    The S&D Backtester allows users to create, backtest, and automate strategies using features from the MTF Supply & Demand Zones Toolkit. This article provides detailed examples of long and short trade conditions to illustrate how to effectively use the S&D Backtester tool.

    Long Strategy Example

    Long Strategy Criteria

    In this example, we will create conditions for a long strategy with the S&D Backtester that meets the following criteria:

    • Step 1: Price is below the 50 Moving Average (MA)

    • Step 2: Price retests a Demand Zone from the current chart's timeframe

    • Only take trades between 6:30 AM - 5:00 PM

    • Exit open positions at the end of the trading session

    • Take Profit (TP) once a new Supply Zone is detected on the current chart's timeframe.

    • Stop Loss (SL) if a demand zone is invalidated or broken

    • Move SL to Breakeven (BE) when the position has moved 1 multiple of the Average True Range (ATR) in profit

    Long Conditions

    Step One:

    The first step to set up this strategy would be adding a Moving Average (MA) indicator to your chart and setting the MA length to 50.

    Afterward, set up condition 6 (external condition) to be a candle close less than the 50 MA and assign this as Step 1.

    S&D Backtester setting up long strategy conditions

    Step Two:

    The second step requires setting a 2nd retest of a Demand Zone as Step 2.

    S&D Backtester setting up long strategy conditions

    Step Three:

    The third step involves defining the time session criteria for trade entries. To do this, enable the Only Take Trades option and specify the desired time range, which in this case is from 6:30 AM to 5:00 PM.

    S&D Backtester setting up specific time period to take trades for long strategy

    Step Four:

    To have positions exit or close at the end of the trading session of the ticker you're viewing, simply enable the Exit on Session End setting.

    S&D Backtester exit on session end in long strategy

    Long Exit Conditions

    To set up the TP and SL conditions for this strategy, scroll down to the Long Exit Conditions section within the S&D Backtester settings.

    Step One:

    Enable the TP Condition and set the criteria to be a Supply Zone detection from the current chart's timeframe.

    S&D Backtester TP Condition long strategy

    Step Two:

    Enable the SL Condition and set the criteria to be a break of a Demand Zone from the current chart's timeframe.

    S&D Backtester SL Condition long strategy

    Step Three:

    Enable the Move SL to BE After Profit condition and set the condition to ATR with an input of 1.

    S&D Backtester Move SL to BE after profit setting for long strategy

    Short Strategy Example

    Short Strategy Criteria

    In this example, we will create conditions for a short strategy with the S&D Backtester that meets the following criteria:

    • A Supply Zone is detected from the 4-hour timeframe

    • Price retests a Supply Zone on the chart's timeframe

    • Price is below the Volume-Weighted Average Price (VWAP)

    • TP when price retests a Demand Zone

    • SL when a Supply Zone is broken from the 4-hour timeframe

    • Activate a Trailing SL of 50 ticks when the position is 100 ticks in profit

    Short Conditions

    Step One:

    The first step to set up this strategy would be toggling on a higher timeframe under the Timeframes section of the S&D Backtester settings.

    In this strategy example, we will need to toggle on the 4-hour timeframe, which will be 'Timeframe 2'.

    S&D Backtester timeframes setting

    Step Two:

    The second step to build this short strategy with the S&D Backtester would be setting a Supply Zone detection from Timeframe 2 (4 hour timeframe) as Step 2.

    S&D Backtester short strategy set up

    Step Three:

    Set a condition for a Supply Zone retest from Timeframe 1 (chart's timeframe) as Step 2.

    S&D Backtester short strategy set up

    Step Four:

    Add the VWAP indicator to your chart and then use Condition 6 under the 'Short Conditions' section within the S&D Backtester settings to create an external condition. Set the condition to be a candle close less than the VWAP and assign this to Step 3.

    S&D Backtester short strategy using external condition with VWAP

    Short Exit Conditions

    To set up the TP and SL conditions for this strategy, scroll down to the Short Exit Conditions section within the settings.

    Step One:

    Enable the TP Condition and set the condition to be a retest of a Demand Zone from Timeframe 1.

    S&D Backtester short strategy TP Condition

    Step Two:

    Enable the SL Condition and set the condition to be a break of a Supply Zone from Timeframe 2 (4-hour timeframe).

    S&D Backtester short strategy SL Condition

    Step Three:

    Enable the Fixed SL and set the condition to trailing with an input of 50 ticks. Also, change the Trailing Stop Activation input to 100.

    S&D Backtester short strategy Trailing SL Condition