• Overview
  • Reviews
  • Comments
  • What's new

Hedging Script

The HedgingScript utility is a trading tool, allowing to exit a floating loss that results from erroneous trades by using hedging of trade results. This tool also allows you to solve the problem of negative locking.

Hedging of trade results means their simultaneous closing TakeProfit and Stop Loss calculated by the script.

The script takes into account the volume of opened positions! However, if the number or volume of trades is increased, the script should be relaunched on the chart! The TakeProfit and StopLoss levels are calculated for larger volumes, allowing to revert trade direction the required number of times depending on the current market mood!

StopLoss must be distant from TakeProfit by the value equal to the average spread specified in the script inputs, because this way you can close all trades at a time.

In any case, trades with TakeProfit must be closed first!

The total result of trades is set in points in the script inputs and depends on what the trader needs: allowable loss, breakeven or profit.

The calculated TakeProfit level is set for appropriate open positions! A comfortable script use is also possible when combined with the Hedging indicator.

The script only works with market orders and makes calculations when there are at least two trades of different volumes in different directions: bullish or bearish. It does not perform calculations when trades are in the same direction or bi-directional trades have the same volume!

The operation of the script with the above indicator is shown in the attached video.


Input Parameters

  1. Take Profit - the Take Profit level in points.
  2. Average Spread - average spread value.
  3. Language - choose language for the displayed information:
    • English.
    • Russian.
No reviews
Version 2.0 - 2017.01.16
The script algorithm has been optimized.