量化交易系统

MT4-Percent range advisor

  • 型号:
Main Image

The Expert Advisor is based on Williams` Percent Range. The EA trades both during low volatility and a trend if MACD is enabled. Two Williams` Percent Range indicators can be used to enter a trade with different parameters, while the third one can be configured to close a trade. Besides, the EA has the trailing stop and stop loss calculation functions depending on the currency pair movement strength.


Inputs

  • 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);
  • MaxStopLoss - maximum possible 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);
  • 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);
  • EnableMACD - use MACD;
  • MACDPeriod1 - fast EMA period in MACD;
  • MACDPeriod2 - slow EMA period;
  • MACDSignalPeriod - MACD signal line period (0 - disabled);
  • EnableAutoClose - auto close of trades;
  • PeriodForClose - WPR period to close trades;
  • LevelsForClose - WPR levels to close trades;
  • AdxPeriod - ADX period;
  • MinAdxLevel - ADX minimum level;
  • MaxAdxLevel - ADX maximum level;
  • Trading start hour - trading start hour;
  • Trading end hour - trading end hour;
  • DecreaseLot - lot reduction by a specified amount of volume after each transaction;
  • IncLotAfterProfit - increase the lot after the profitable close of the previous transaction;
  • DecLotAfterLoss - reduce the lot after the unprofitable closing of the previous transaction;
  • MaxTradeCount - the maximum number of trades, after which to stop trading (0 - not used);
  • MaxLossCount - the maximum number of losing trades, after which to stop trading (0 - not used);
  • ShowInfo - show information.