$ £ ¥
¥ £ $

Spike Trader Expert Advisor

Spike Trader Forex expert advisor is based on the idea of spike bars preceding movement in the opposite direction to the spike. This EA was inspired by the trading strategy described in May 2012 issue of Currency Trader magazine.


The spike is defined as a bar that is higher than previous BarsNumber bars, higher than previous bar by PercentageDifference and that closed in the lower ThirdOrHalf part of its length. For bullish signal, everything is inverted. The position is kept open until Hold bars pass or an opposite signal is received. If a new signal in the same direction is received, the position's timer is reset and no new position is opened.

This strategy doesn't include any stop-loss or take-profit levels.

Input Parameters


  • Hold (default = 11) — how many bars to hold the position open.
  • BarsNumber (default = 3) — how many of the preceding bars to check for the entry condition analysis.
  • PercentageDifference (default = 0.003) — the required percentage difference with the previous bar.
  • ThirdOrHalf (default = 0.5) — the bar being checked should close in the lower/bottom part of the previous bar. This value determines that part. For example, 0.5 means lower/upper half. 0.33 would mean lower/upper third, and so on.

Money management

  • Lots (default = 0.1) — the volume for trades.


  • Slippage (default = 30) — the acceptable price slippage in points.
  • OrderCommentary (default = "Spike Trader") — the commentary for positions opened by this EA.
  • Magic (default = 173923183) — the order magic number to filter positions opened by this EA. Used only in MT4.


The backtest of the Spike Trader MetaTrader expert advisor on the period of 9 years showed 16.3% profit with 14% maximum drawdown. The used position's volume was set to 0.1 standard lots. The EA made 120 trades, of which 57.5% were profitable. The default settings were used in this backtest on USD/CAD D1 chart.

During the backtest, the average loss was $130 and the average profit — $120. The EA traded once every month on average.

Spike Trader expert advisor - backtest sample trades from MetaTrader 5

A sample of the backtest trades of this EA can be seen on the chart screenshot above.

If you are going to apply the EA to a different currency pair or timeframe, you should re-optimize it for different input settings, especially, the PercentageDifference parameter.

This EA is ECN-safe. You can freely use this expert advisor with ECN (market execution) brokers as it either does not apply any stop-loss and take-profit levels in its trading orders or sends only pending orders.


Warning! Before you ask basic questions regarding installation of the expert advisors, please, read this MT4 Expert Advisors Tutorial to get the elementary knowledge on handling them.

Do you have your own trading results or any other remarks regarding this expert advisor?

Discuss Spike Trader with other traders and MQL programmers on the experts forums.


1.01 - 2022-04-17

  • Added input parameters' descriptions.
  • Added error messages to some potential error situations.
  • Added OrderCommentary input parameter to change the text comment attached to each trade.
  • Optimized calculations.

1.00 - 2012-07-18

  • First release of the Spike Trader expert advisor on