• Overview
  • Reviews
  • Comments (1)

Hedging positions

This EA attempts to recover losing trades. Start the robot on the chart, and as soon as it detects an open trade on the chart (or a trade series) that was opened manually or using another EA, the robot instantly calculates the total breakeven point and starts drawing the trade out of the drawdown, regardless of the number of trades and their types. The trades can be both buy and sell with any identifiers.

The robot is able to detect and monitor any order. After all the calculations the robot starts to move all orders to total breakeven, and once the specified price is reached, the robot closes all orders with the deposit percentage specified in the settings.

The robot is actively used in both manual and automated trading as a supplement to any other EA. It s very easy to connect the robot to another EA, simply run the robot on a separate chart of the currency your EA runs on, and it will start operating right away, transferring all orders to breakeven and closing them.

This EA can also be used for testing indicators in the strategy tester. The robot is equipped with a control panel for maintaining orders from the chart, mainly the panel can be used for opening and closing both market and pending orders.

The EA is primarily designed as an auxiliary tool for any trading system, the robot is able to perform fully automated trading only during optimization. For that purpose the code of the EA implements an indicator block with a number of indicators that are able to work both separately and in conjunction with each other in any combination.


  • AvtoTrade - if enabled, the robot will open orders on its own using the signals from the indicator block
  • MM - automated money management
  • Lot - lot size if the auto money management is disabled
  • Risk - risk for automatic lot calculation
  • StopLoss - stop loss distance
  • TakeProfit - take profit distance
  • MagicNumber - order identifier, if set to - 1 the EA will identify and control any order on the current symbol not depending on anything
  • Slippage - allowed slippage
  • Hedging - very important parameter. This variable multiplies the total volume of the trades, then uses that volume to place a pending order opposite to the latest trade. Once the order breaks out the robot places another pending order in the reverse direction. If the price moves further on the robot moves all orders into profit and closes them. If the price recovers right after the order breakout, then the same happens on the other side.
  • HedgingMinimum - the number of market orders to open on the chart to start hedging the trades as the indicator block generates a reverse signal.
  • HedgingMaximum - the number of market orders to open on the chart to start hedging the trades regardless of the indicator values
  • MaxDistans - the maximum distance from the price of the first order in points to start hedging trades
  • Distans - the distance between the pending orders during hedging
  • ProfitPercentage - profit percentage depending on the deposit, when reached all trades on the current symbol will be closed
  • Multiplication - lot multiplication of the hedging positions
  • HedgingTrades - the maximum number of the hedging orders
  • Spread - maximum allowed spread
  • UseTime - trading by time (position hedging is performed regardless of the time)
  • BeginTime - trading start time
  • EndTime - trading end time
  • Comments - display information on the chart
  • TrailingStop - the trailing function
  • ModifyTP - if enabled, the take profit will be moved away from the price when stop loss is moved
  • TrailingStart - distance from the breakeven point to enable trailing
  • StepTrailing - trailing step
  • StopLevel - move to breakeven
  • NoLoss - distance from the price for moving to breakeven
  • MinProfitNoLoss - fixed profit when moving to breakeven

If you want anything added to the EA, feel free to write me a private message about it, and I will the functionality of the EA in the next version.

No reviews