Donchian Scalper EA

Donchian Scalper EA




The Donchian Scalper EA is a fully automated Expert Advisor that trades based on the Donchian indicator. The EA trades using market orders and uses averaging to safely turn otherwise negative trades positive. This EA works best on USDJPY using the M5 timeframe. A VPS is advisable when trading this system. Check the comments for back test results and optimized settings.

Forward testing signals


  • Fully automated
  • Not sensitive to spread
  • Risk Money Management
  • Always a stop loss in place
  • Hedge accounts only
  • This system has the option to be NFA/FIFO compliant
  • All you need is a VPS

Input Settings

Order Settings

  • MagicOrderNumber – Unique number for the EA to identify its trades. Any integer.
  • Lots – Number of fixed lots per trade if money management is off. Values from 0.01 to 50.0.
  • Slippage – Slippage in pips. Values from 1 to 10.
  • MoneyManagement – If turned on trade lot sizes are calculated on account risk, true/false.
  • MoneyManagementRisk – Risk per trade if money management is on. Values from 0.01 to 0.1.
  • AllowNewTrades – Turn this of to disable new trades, true/false.
  • AccountProfitLock – If money management is on the EA will stop trading if the account balance drops to this fraction of the maximum account balance (0.5 = 50% of account balance). Values from 0.0 to 1.0.
  • NFA_FIFOCompliant – Turn this on if you need this to be NFA and FIFO compliant, true/false.

Entry Settings

  • TimeFrame – Timeframe drop-down selection to lock EA to a timeframe so that selection of the chart timeframe doesn’t affect the EA. When testing ensure the tester timeframe is set to the same value.
  • Trend1TimeFrame – Timeframe drop-down selection for the first trend detection.
  • Trend2TimeFrame – Timeframe drop-down selection for the second trend detection.
  • MaxSpread – Maximum spread in pips that the EA will trade. Values from 1.0 to 10.0.
  • DonchianPeriod – The period used for the Donchian indicator. Values from 5 to 40.
  • TakeProfit – The take profit (Setting to 0 disables). Values from 2 to 10 depending on the pair being traded.
  • StopLoss – The fixed stop loss visible to the broker – Values 25 to 200 depending on the pair being traded.
  • Averaging – If turned on averaging is used to recover negative trades, true/false.
  • AveragingStep – The negative move in pips against the current trade to trigger the next averaging trade. Values 5 to 100.
  • AveragingMultiplier – The lot multiplier for averaging trades. Values 1.0 to 2.0.


Optimization & Defaults

Default input values are for USDJPY M5. If optimizing, optimization of DonchianPeriod, TakeProfit, StopLoss, AveragingStep and AveragingMultiplier are needed to find the best results.