1 of 15

Algorithm 1

Iteration 1

2 of 15

What is Algorithm 1?

Algorithm 1 is a high win rate, moderate reward:risk trend-following system whose edge comes from riding large trends while winning/losing little or breaking even during non-trending markets.

3 of 15

How does Algorithm 1 work?

Algorithm 1 is based off of the following structure:

  1. ATR indicator
    • Enables the strategy to automatically generate volatility-adaptive stop loss and take profit levels.
  2. Confirmation 1 indicator (C1)
    • A slow trend following indicator that calls the start of trends with a 60%+ win rate with a 1xATR take profit and a 1.5xATR stop loss. It is the main way to enter the market.
  3. Exit indicator 1
    • A faster trend indicator that cuts losses before the stop loss is hit.
  4. Exit indicator 2
    • Another trend indicator, slower than Exit Indicator 1 but faster than the C1, that cuts winners before the trend severely reverses.
  5. Volume indicator
    • A volume/volatility indicator that filters out C1 signals that occur during choppy (ranging with low volatility) price action.
  6. Confirmation 2 indicator (C2)
    • Another trend following indicator that confirms the C1’s signals to increase win rate to 65%. It is slightly faster than the C1 indicator.
  7. Baseline indicator
    • A multi-purpose moving-average type indicator that filters out countertrend and overextended signals.
    • It also adds a new way to enter the market: baseline-price crossovers, and baseline slope changes.
  8. Continuation indicator
    • A faster trend following indicator that calls the start of pullback reversals accurately and consistently. It is yet another way to enter the market after the trend started and has not yet crossed over the baseline moving average.
  9. Additional nuances
    • These are observations that I noticed during forward testing and live trading that I have tested to improve the algo.
      • One Candle Rule: If you miss a C1 signal, you can take it one candle later if all your indicators still line up and the price has retraced to a more favorable entry point.
      • Bridge Too Far: You can only take baseline crossover signals if the last C1 signal was at most 7 candles prior. Past that, the trend usually goes too far.
      • $EVZ Index: Take no trades when EVZ is below 6; risk 1% if EVZ is between 6 and 8; risk 2% if EVZ is 8 or above.

4 of 15

C1 Indicator

Main backtesting metric: Winrate

Steps to backtest:

  1. Choose a trend following indicator
  2. Check the charts to see if it is getting you into trends consistently and early enough
  3. Run a backtest on the benchmark 5 currency pairs (AUDCAD, AUDNZD, CHFJPY, and EURGBP)
  4. Repeat for 20-30 C1 indicators with various fast and slow settings (that still get you into trends consistently and early).
  5. Choose the indicator with the highest TP hitrate as your C1.

The purpose of a C1 indicator is to call trend entries early and consistently.

5 of 15

Exit Indicator

Main backtesting metric: ROI (pips) and profit factor (gross profits / gross loss)

Steps to backtest:

  • Choose a trend following indicator that is faster than your C1 indicator
  • Check the charts to see if it is getting you out of some losing trades before the SL is hit.
  • Check the charts to see if it is still capturing most of the trending move.
  • Run a backtest on the benchmark 5 currency pairs (AUDCAD, AUDNZD, CHFJPY, and EURGBP)
  • Repeat for 10-30 exit indicators with various settings (that are still faster than your C1).
  • Choose the exit indicator with the highest ROI, and then the highest profit factor.

The purpose of an exit indicator is to get you out of losing trades before they hit your SL, while also keeping you in trend trades and get you out before they turn against you.

6 of 15

Algorithm 1 actually uses two exit indicators.

Lets see them →

7 of 15

Exit 1: A fast indicator that is active before 1xATR TP is hit

The goal of this faster exit indicator is to cut losing trades before they hit the stop loss.

8 of 15

Exit 2: A slow indicator that is active after 1xATR TP is hit

The goal of this slower exit indicator is to cut winning trades before the trend reverses.

9 of 15

Both Exits Overlayed

Together, they capture high-RRR trending moves, while keeping winrate high.

10 of 15

Volume Indicator

Main backtesting metric: ROI and Profit factor

Steps to backtest:

  • Choose a volume, volatility, indicator
  • Check the charts to see if it is filtering out C1 signals that occur during choppy environments, while still letting most trending C1 signals through.
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Repeat for 10-30 volume indicators with various fast and slow settings
  • Enable the EVZ(6) filter
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Enable the EVZ(6,8) filter
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Repeat for 10-30 volume indicators with various fast and slow settings.
  • Choose the exit indicator with the highest ROI, and then the highest profit factor.

The purpose of a volume indicator is to eliminate signals that are taken during choppy markets, leaving only the signals that are taken during trending markets.

11 of 15

Volume Indicator (cont.)

  • The volume indicator is Algorithm 1’s main weakness.
  • Although it successfully filters out C1 signals that occur during choppy conditions, it also removes a lot of valid trending C1 signals (show by the bold red circles)
  • So as I forward test my first iteration of Algorithm 1, my main focus for the 2nd iteration will be to find nuances or a new volume indicator that allows me to get into more trends, while still keeping me out of chop.

The purpose of a volume indicator is to eliminate signals that are taken during choppy markets, leaving only the signals that are taken during trending markets.

12 of 15

C2 Indicator

Main backtesting metric: TP hit rate (can also use win rate)

Steps to backtest:

  • Choose a >55% WR C1 indicator you tested before
  • Run a backtest on the benchmark 5 currency pairs (AUDCAD, AUDNZD, CHFJPY, and EURGBP)
  • Repeat for 10-30 high performing (>55% WR or TPHR) C1 indicators.
  • Choose the indicator with the highest TP hitrate or winrate as your C2

The purpose of a C2 indicator is to increase the base winrate of your algorithm by having another high-performing indicator confirming your C1 signals.

13 of 15

Baseline Indicator

The purposes of the baseline indicator are:

Filtering out countertrend entries

  • Slower baselines that stay away from price, like SMA(55), filter out countertrend trades better than faster baselines, like SMA(5), do.

Filtering out overextended entries (1xATR rule):

  • Faster baselines that track price closer, like SMA(5), filter out overextended entries better than slower baselines, like SMA(55), do.

Giving the volume indicator more time to catch up to the rest of the algo (One Candle Rule - OCR)

  • If you get an entry but miss it for some reason, you can enter again if on the next candle you get a better entry price.

Adding new entry setups: Baseline Price Cross (BLC), Baseline Slope Change (BLS)

  • BLC: If the price crosses and closes beyond the baseline, enter a trade.
  • BLS: If the slope of the baseline changes from negative to positive or vice versa, enter a trade.

Adding a new setup filter for BLC and BLS setups: the bridge too far (BTF) rule:

  • Example - BTF(7) means that you ONLY take BLC or BLS setups if the last C1 setup was at most 7 candles back.

Adding new exit triggers: Baseline Price Cross (BLC), Baseline Slope Change (BLS)

  • BLC: If the price crosses and closes beyond the baseline against your trade, exit the trade.
  • BLS: If the slope of the baseline changes against the direction of your trade, exit the trade.

14 of 15

Baseline Indicator (cont.)

Main backtesting metrics: Profit factor

Steps to backtest:

  • Choose a moving average-type, on-chart indicator
  • Check the charts to see if it crosses price at the start and end of a trend, with minimal crossing in between.
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Check the charts to see if the 1xATR baseline nuance successfully prevents overextended trend entries.
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Check the charts to see if a baseline cross entry (BLC), baseline slope change entry (BLS), or using both simultaneously makes sense.
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Check the charts to see if the bridge too far nuance (BTF) makes sense.
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Test the one candle rule (OCR) nuance
    • Run a backtest on the benchmark 5 currency pairs to test this
  • Repeat for 10-30 moving average-type indicators on various fast and slow settings
  • Choose the indicator with the highest profit factor as your baseline

15 of 15

Continuation Indicator

Main backtesting metric: ROI and Profit factor

Steps to backtest:

  • Choose a trend following indicator. Start with your exit indicator(s) and your C1 (if your C1 is fast enough to catch pullback reversals)
  • Check the charts to see if it is getting you into pullback reversals consistently and early enough
  • Run a backtest on the benchmark 5 currency pairs (AUDCAD, AUDNZD, CHFJPY, and EURGBP)
  • Repeat for 10-30 trend following indicators with various fast and slow settings (that still get you into trends consistently and early)
  • Choose the continuation indicator with the highest ROI, and then the highest profit factor

You can ignore the volume indicator and 1xATR baseline rule for continuation signals, allowing you to get back into trends your volume indicator and/or 1xATR baseline filter might have left you out.

The purpose of a continuation indicator is to call pullback reversals early and consistently. This way you can get into trends you may have otherwise missed.