Stochastic Based Walk Forward Optimization System

  • updated

Hi all, I want to add an optimization system because we know that the market changes, and every sets out there may fail in previous or future events. So after reading some articles and watching some videos about avoiding overfitting sets by adding walk forward samples, I've tried to create a schedule for optimizing based on Joan's set (could be applied to other set too).

Broker : ICMarketsSC-MT5

Account Type : Raw Spread

EURUSD Spread : Floating 0.0-0.3 pips

Joan's set :

2018 : Crashed

2019 - early 2021 : To the moon

today : Maybe a bit slow because EURUSD is bearish

My conclusion after visual backtesting in 2018:

2018 : too aggressive  (small step) martingale, and trade didn't close after TDI goes below signal level (martingale keep pushing after downtrend)

- Stochastic 9,3,3 is the main brain of this set

- I added TDI and IdentifyTrend as a Close Signal,

- I added TDI Signal Level and TimeFrame for Optimization (The set use "Buy Only" trade so modifying the Signal Level is less complex than hedging system)

- I added Martingale Step Increase for Optimization (For keeping the pace of martingale)

By adjusting the Walk Forward System, the schedule for backtesting and live testing is shown as 2 alternatives :

3:1 Ratio - 3 inSamples (Backtest) and 1 outSamples (Forward/Live Trading) - 4 Months Period

Image 1470

3:1 Ratio - 3 inSamples (Backtest) and 1 outSamples (Forward/Live Trading) - 3 Months Period

Image 1471

The general idea of this system is explained like this

Image 1472

Optimization method I use is brute force on 3 parameters I think are the most influenced on 2018 crash for the set (Martingale Step Increase, TDI Signal Timeframe and Signal Level), because testing one at a time is quite confusing when choosing the best results. Problem is, brute force-ing 3 parameters takes pretty much a long time, and to test that the set can survive with periodic optimization might take a while.

So in the end, I want to ask the community :

- Am I in the wrong section of the forum? lol

- Can the schedule minimize the risk of future market changes by taking samples from time to time? Is the method correct?

- Is there a method for optimizing multiple parameters with maximum results, but less time consuming (assuming I used only the 3 listed parameters above)

- Does anyone has another thought about which parameter should and should not be optimized on this case?

If you think that scheduled optimization might minimize the risk and maximize the profit, I will continue running the test from 2017-today, and goes on for later/future trades. But if you think it won't work, I will stop the test (single optimization is 6 hours :( even for only 3 parameters), unless there is another method beside brute-forcing.

If you want to contribute in testing, commenting, or adding optimizable parameter, I have created a Google Drive folder containing the Sheets file, Set Files (MT5 only), Optimization settings and current Optimization results in (I allow comment on the sheets file, but you should download to modify it). The sheet file contains parameter start-step-stop value, backtest date, forward period, and background idea of the chosen optimized parameter.

FYI, the set included is optimized in 2018 for early 2019 trade (in 4 month period optimization folder), so don't use it for today's trade, especially live, it will definitely crash!

Thank You!

MT version:
Set for MT5 only
EA version: