Topic: Max Spread Protection in the Backtester

Hello, Traders,

As you know, the historical data provided in the EA Studio dynamic spread. You also have a dynamic spread when you import data from MetaTrader 5. MetaTrader 4 does not provide spread information, so I strongly recommend that you switch to MetaTrader 5.

Now, EA Studio accepts Max Spread protection parameters in the Strategy Properties and in the Generator, and calculates them correctly during the backtest.

When used, the Max Spread protection prevents the opening of new positions when the data spread is higher than the protection value.

It prevents overestimated backtests for strategies that exploit data gaps. Such strategies use Bollinger Bands, Envelop, or Donchian Channel indicators and trade against that gap.

The problem in such cases is that the spread on a gap is much higher than usual, and it reduces the potential profit.

With the Max Spread protection, we can eliminate such entries in both backtesting and real-time trading in MetaTrader.


Max Spread Protection in Strategy Properties

We can set the Max Spread Protection in the Strategy Properties.
EA Studio calculates and updates the backtest stats in real-time when we change it.

We set the protection in Points. Zero means that the protection is off.

https://image-holder.forexsb.com/store/ea-studio-editor-max-spread-protection-thumb.png


Max Spread Protection in the Generator and the Reactor

You can set Max Spread protection values in the Generator. By doing that, it will preset this protection in the created strategies.

https://image-holder.forexsb.com/store/ea-studio-generator-max-spread-protection-thumb.png

Spread Statistics

We introduced spread statistics in the Data -> Data Stats page.

It shows the maximum, minimum, and average spread.

We also calculate and show the Highest and the Lowest 1% average spread.

These real spread statistics help us to choose a proper value for the Max Spread Protection.

I recommend you use a value between the Average Spread and the Highest average 1% values.

https://image-holder.forexsb.com/store/ea-studio-data-statistics-spread-stats-thumb.png

Updated Indicator Chart

The Indicator chart now correctly draws the entry values of the long positions at the Ask price.

We see how big the spread is in the screenshot below. It makes it very dangerous to trade during significant gaps without entry protections.

https://image-holder.forexsb.com/store/eas-indicator-chart-long-position-entry-at-ask-thumb.png

Please, experiment with this new feature and share your opinion.

Have a pleasant and productive trading session!