In the original thread, several posters made suggestions how to improve the strategy, but OP preferred to keep the thread strictly about the original strategy to avoid confusion. In this thread I would like to explore some modifications to try to improve the strategy. Feel free to contribute new suggestions, backtest results, etc.
For starters, here is the original strategy on GBPCAD using minimum bar length of 110 pips, and TP of 30 pips:
- Exact implementation of the strategy described in the original thread.
- EntryDelayMinutes: Entries can be delayed until few minutes after daily open for brokers that temporary stop trading at the session start, default is 15 minutes (cescof, post #2)
- BasketTakeProfitPips: Option to close basket in profit instead of breakeven, default is 0 pips (cescof, post #7)
- MaxDrawdownPercent: Close all trades when basket is in drawdown the specified percentage of the account balance, default is 25% (bdunn, post #3)
- MaxOpenTrades: Limit the number of open orders of a basket, default is 999 orders (bdunn, post #3)
- MaxSpreadPips: Wait with entry or scale-in until spread is below specified limit, default is 4.0 pips (cescof, post #21)
- TradeDirection: Use to configurate whether only Buy or Sell orders are allowed (suppress other orders), default is "BothBuySell" (bdunn, post #22)
- BarSelection: choose how to select large bars, either SelectFixedLength or SelectPercentile (yoriz, post #31).
In SelectFixedLength mode:
- MinBarLengthPips: minimum body length of previous bar to make entry
In SelectPercentile mode:
- LargeBarPercentile: percentage of bars that will qualify as large
- NrBarsLookback: number of bars to consider for percentile calculation
- LotSizing: choose lot sizing method, either Compounding or FixedSize (cescof, post #30)
In Compounding mode:
- LotsPer10kEquity: number of lots to use for each 10,000 equity
In FixedSize mode:
- FixedLotSize: number of lots to use for each trade, regardless of equity
- EntryStrategy switch to choose between RetraceAfterLargeBar, TrendContinuationAfterLargeBar or RandomDirection (yoriz, post #41)
- The RetraceAfterLargeBar option is the original strategy where we assume the market will retrace after a large candle. For example, after a large bull candle we go short.
- The TrendContinuationAfterLargeBar option does the opposite. We assume the market will continue in the direction of the large candle. For example, after a large bull candle we go long.
- To test whether the entry criteria make any sense at all, I've also added a RandomDirection option that does just that. Randomly make either a Buy or Sell trade. Each time you run the Strategy Tester you will get different results with this.
- Added MovingAverageCross entry strategy. Use FastMABars and SlowMABars to configure length of SMAs (Toppi, post #42)
- Added stricter input parameter validation to avoid problems due to wierd, invalid values during Optimizer runs (bdunn, post #56)
- Added configurable MagicNumber parameter to enable running multiple instances of EA on same pair (bdunn, post #69)
- Prevent reinitialisation after chart timeframe switch
- Try to close all open trades upon fatal error before removing EA from chart
- Retry order execution after non fatal errors
- Added VerboseLogging switch to log orders and positions for troubleshooting (default off)
- Changed order of EntryStrategy options to enable skipping RandomDirection option in optimizer
- Added RandomizationSeed input parameter to enable searching best/worst drawdown using optimizer
- Added ConcurrentBuyAndSell trade direction that allows two independent DOSI instances trading concurrently in both directions (post #82)
- Removed VerboseLogging switch
- Added CloseAllTradesOnFriday, FridayCloseHour and FridayCloseMinute input parameters to force closing all trades before the weekend at the specified time. Note that the time is specified in the broker time zone (in other words: ignores the BrokerGMTOffset input parameter).
- Added MaxOpenBuyTrades and MaxOpenSellTrades. These can overrule MaxOpenTrades to create an asymmetric configuration if you suspect the market to be bullish or bearish. If both MaxOpenTrades and MaxOpenBuyTrades/MaxOpenSellTrades are non-zero, the latter will take precedence. (bdunn, post #89)
- Improved robustness against requotes, network hickups, etc.
- Log trade execution (e.g. latency, slippage, disconnects, etc.) to file (yoriz, post #101)
- Added log file rotation to limit maximum file size (yoriz, post #106)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
WARNING: This EA is experimental and still under development.
No attempt is made to remain backwards compatible between versions. Input parameters are regularly renamed or grouped differently to try to keep the ever growing list of switches and input values comprehensible. .set files of an old version might fail on the current version. Make sure you write down or take a screenshot of your optimized settings before upgrading!