• Overview
  • Reviews
  • Comments (4)
  • What's new

WPR scalper with Martingale

The Expert Advisor is based on Bollinger bands, Williams' Percent Range and some other indicators. It features the martingale function increasing a lot after a loss. However, it should be used wisely in order not to seriously damage your deposit in case trading ends in a loss. You can set a small number of losses in a row, at which a lot increases, and (or) a small increase in a lot value. In this case, trading becomes safer, while the number of trades remains large enough. You can disable the martingale by MartingaleFactor=1 so that a lot is not increased after losses.


  • Lots - lot size (if 0, the lot volume is calculated based on the % of account free margin);
  • Percentage of free money - percentage of free margin to open each new trade (applicable when Lots=0);
  • MaxSpread - maximum allowable spread to open trades (for floating-spread symbols, to avoid opening with a large spread);
  • Magic - unique identifier (use different magic numbers if multiple Expert Advisors run in your terminal);
  • TakeProfit - take profit (in points);
  • StopLoss - stop loss (in points);
  • PeriodDynamicStop - dynamic stop loss calculation period (if 0, the maximum stop loss is used);
  • DynamicStopFactor - dynamic stop loss calculation multiplier;
  • TrailingStopValue - trailing stop value in points (0 - not used);
  • OrderComments - comments to opened orders;
  • TradeEveryTick - trade each new tick (slows down optimization, but may improve profit in real trading);
  • BollingerPeriod - Bollinger bands period;
  • BollingerDeviations - Bollinger bands deviations;
  • Bollinger2Enable - enable/disable the second Bollinger bands indicator;
  • Bollinger2Period - second Bollinger bands indicator period;
  • Bollinger2Deviations - second Bollinger bands indicator deviations (this parameter value should be less than the first indicator deviations and may even become negative);
  • MoreTransactions - allow the EA to react to weak signals and to open more trades;
  • PeriodWPR - WPR (Williams' Percent Range) period;
  • LevelsWPR - WPR levels (1-50, automatically converted to lower and upper levels);
  • PeriodWPR2 - second WPR period (0 - second WPR is not used);
  • MartingaleMaxLosses - maximum number of losses in a row, at which a lot is increased (resetting to the initial value afterwards);
  • MartingaleFactor - number of times a lot is increased in case of a loss (1.5-2.5 are recommended);
  • AdxPeriod - ADX period;
  • MinAdxLevel - ADX minimum level;
  • MaxAdxLevel - ADX maximum level;
  • Trading start hour - trading start hour;
  • Trading end hour - trading end hour;
  • ShowInfo - enable the display of information.

Do not forget to optimize the parameters before launching the EA and after a few days of running it.

No reviews
Version 1.1 2018.06.12
Changed the calculation of lot based on the percentage of free margin when using martingale.