• Overview
  • Reviews (3)
  • Comments (38)
  • What's new


Trade in the opposite directions with HedgeTerminal

HedgeTerminal is a full-featured trading terminal inside MetaTrader 5. This is a graphic panel resembling MetaTrader 4 terminal. It allows you to track oppositely directed positions in the manner it is possible in MetaTrader 4. In other words, we can open unlimited number of positions on a single symbol even if positions are in complete or partial hedge (lock). Thus, you can maintain long and short positions simultaneously, which is impossible in MetaTrade 5 environment. HedgeTerminal has a number of features making trader's work more efficient:

  • Oppositely directed positions and swapless hedge. HedgeTerminal allows you to trade in the opposite directions and even save on swaps. We all know that the charged swap is always negative when hedging positions in MetaTrader 4. This is due to the fact that the broker either does not pay the entire amount of interest when it is positive for you, or you pay your broker even greater interest when the interest rate for the currencies is negative for you. MetaTrader 5 compares favorably with its predecessor, since it does not allow the broker to charge a negative swap for the fully hedged position, since that position does not exist for it. However, if your trading strategy involves full or partial hedging, you have not been able to trade in MetaTrader 5 easily and securely, since your positions have not been visible to the terminal. HedgeTerminal solves the issue. Now, all hedged positions are visible only to you, while your broker cannot see a single open position. The swaps are not charged, which means that your trading tactics in MetaTrader 5 environment become more efficient than in MetaTrader 4.
  • Independence from duplicate tools with _m postfix. Some brokers provide duplicate or hedging symbols in MetaTrader 5 environment. These are the symbols with the same names and trading conditions having '_m' postfix in their names. That allows you to easily hedge your positions, while the broker can easily charge additional fee in the form of negative swaps. However, duplicate symbols are usually not enough for real work, and sometimes they are not provided at all. The number of positions is increasing, tracking strategies are becoming more complicated, while fees are rising. HedgeTerminal makes using duplicate symbols meaningless. You can open the necessary amount of positions on a single symbol, while saving on swaps.
  • Real stop loss levels. Each hedging position can be accompanied by the individual stop loss executed on the server. Regardless of whether your terminal is launched or not, all protective stops are executed if necessary. HedgeTerminal processes stop losses correctly and defines what had happened to the position, while HedgeTerminal was disabled.
  • Ability to trade using Expert Advisors. HedgeTerminal was first created exactly for tracking the automated trading. Any Expert Advisor, indicator or script can interact with HedgeTerminal via the special library and manage its positions in the same easy way as it happens in MetaTrader 4. Actions performed by one of your Expert Advisors become visible to all other trading robots as well as to you via the HedgeTerminаl visual panel. 
  • Remote interaction with VPS and trading in the group. HedgeTerminal can help you in the following cases: your automated trading algorithms are launched on the remote VPS, while you are tracking them via MetaTrader 5 launched on your PC; you are an investor, and you want to track positions of your traders; you want to receive the data on your positions, algorithms and traders anywhere in the world. HedgeTerminal does not create the database of its positions on the PC it is installed at. Instead, it generates its positions right during the launch using the data available via MetaTrader 5 program interface. This means that HedgeTerminal or Expert Advisors using it always see the same positions and track their changes in real time no matter where the product is launched. 
  • Advanced visual control tools. HedgeTerminal provides a convenient and functional graphic table (panel) similar to MetaTrader 4/5 terminal. It allows you to completely close the hedging position entirely or partially, place stop loss or take profit, as well as trailing stop. You can configure the table by adding or deleting necessary columns, as well as changing their size.
  • You do not have to change your trading style. Do you use position trading or fast scalper techniques within small time frames? Do you perform transactions right in MetaTrader 5 depth of market? Or do you prefer trading via the fast trading panel on the chart? Do you use the standard window to create a new order? All these methods are good in their own way. You are free to choose any method you like. New hedging position can be opened in any way. However, it can be closed only via HedgeTerminal panel or its program interface.

HedgeTerminal has a number of parameters that distinguish it from the solutions developed for personal use. Below is the summary table containing the features of MetaTrader and HedgeTerminal terminals, as well as of the software solutions developed for personal use.

MetaTrader 4
MetaTrader 5
Other solutions
Hedging (locking) and oppositely directed positions
Swapless hedges
Applied stop loss level type
Applied take profit level type
Visualization of positions, one-click trading
Combining orders and trades in a single position 
Displaying a name of an Expert Advisor that placed a position. Table configuration, set of columns, their width. NO  NO  YES  NO 

Additional fonts are required for the correct display of HedgeTerminal:

  • Arial Rounded MT Bold;
  • Wingdings (included in the standard font set and, most probably, already installed on your PC).
Sergey Lebedev
Sergey Lebedev 2019.06.29 12:11 

Прошу вас рассмотреть вопрос конвертации проекта в формат OpenSource с созданием репозитария на GitHub или с публикацией кодов в CodeBase.

Izzatilla Ikramov
Izzatilla Ikramov 2015.01.06 21:39 

Купил, буду изучать. Возможности приведенные в описании впечатляют.

Server Muradasilov
Server Muradasilov 2015.01.03 20:47 

Интересный продукт, дающий возможность для разработки новых стратегий торговли,покупкой доволен.

Version 1.19 2016.06.29
- Fixed the application crash, which sometimes occurred when attempting to download data from XML files of the HedgeTerminal settings. Compilation is performed for the MetaTrader build 1347 from June 17, 2016.
Version 1.18 2016.06.13
- The new version 1.18 is built for latest version of the MetaTrader 5 (build 1340 of May 13, 2016). The previous versions could cause runtime errors and crash the terminal in certain cases. The new build fixes those issues.
Version 1.17 2016.03.10
All products:
- Fixed freezing error. This error occurred when trying to close a position with a preset stop loss, provided that the closing command also contained a comment.
- Fixed the error that in some cases caused an infinite call to the position update procedure (infinite recursive loop).
- Fixed the profit calculation for some of the forex instruments. Now the profit is calculated correctly for the instruments such as gold.
- Fixed the input of the new Take-Profit value. Now an incorrect value can not be entered in the Take-Profit column (it simple will not be set).
Version 1.16 2015.11.18
All products:
- The series of HedgeTerminal products has been successfully tested on the largest Brazilian Stock Exchange Bm&fBovespa. The products now support bi-directional trading with Bm&fBovespa.
- Outgoing position comments are now saved and loaded using global variables.
- Fixed the error, when HedgeTerminal failed to start on the accounts of brokers whose names contained symbols inappropriate for file name.

HedgeTerminal Panel Demo:
- The demo version of the panel works now with the AAPL* instrument.

- If a comment is changed in one panel window, the change is now displayed in other running windows of the panel. This didn't work in the previous versions.
Version 1.15 2015.11.11
All products:
- Fixed error, due to which an actually closed position was perceived by HedgeTerminal as a still open bi-directional position.
- Trade operation processing speed has been greatly improved. The lags that could happen in previous versions have been eliminated.
- Now HedgeTerminal stores additional information about active positions in global variables. This has significantly improved trade logic processing speed and simplified interaction between terminals and HT applications.

- Fixed display of icons in the Asia region. Now all icons and characters appear the same regardless of the current encoding settings.
Version 1.11 2015.10.23
All products:

Fixed an error that could occur, if the stop order that implements the Stop Loss level got expired for some reasons. In the previous versions this stop level could freeze, and working with stop-levels of bi-directional positions was impossible. In the new version this situation is handled like cancellation of a stop order: protective stop levels are reset in this case.

Fixed check of the total net position between HedgeTermianal and MetaTrader 5. This check could sometimes lead to an untrue message that the positions are not equal. Now, if there is a mismatch, messages are printed to the terminal log instead of the MessageBox. The error message has been expanded: details of the mismatch are also shown.


Additional icons are available in the new MetaTrader 5 versions: Depth of Market and Trade Panel. To avoid overlapping, the HedgeTerminal menu button has been moved to the right.
Version 1.10 2015.08.27
All products:
- Fixed removing stop loss orders during clearing when trading on FORTS. Now, all pending orders placed by HedgeTerminal are active up to their expiration time or indefenitely (on other markets).
Version 1.9 2015.08.21
All products:
- Fixed calculation of financial result for some FORTS futures (RTS, ED, GOLD) in terminals of some brokers. Now the cost of a point of these instruments is correctly calculated.
- Fixed the zero division error occurred if the trading instrument was not found in the history.
- New item in the panel settings: "Hide Hedge Positions". If all active positions make a complete hedge (or a lock), they can be hidden. Thereby, they are considered to be closed by HedgeTerminal and EAs which use the virtualization library. As actually positions are not closed, hidden positions do not require commissions and are not subject to slippage. But hidden positions are absent on the History tab and their financial result is not taken into account.
Version 1.8 2015.05.26
All products:
- Fixed calculation of the financial result for some FORTS futures (RTS, ED, GOLD). Now it conforms to the price step for the futures.
- Now HedgeTerminal correctly handles rollover of futures positions in MOEX. In earlier versions, specific rollover deals were not handled and were not deleted from the HedgeTerminal environment, which could lead to memory leaks.
- From the current version on, HedgeTerminal is compiled in the new optimized MQL5 compiler. This has increased the overall performance of HedgeTerminal by 15-20%!
- Position change is displayed in the panel faster in some cases.
Version 1.7 2015.04.10
All products:
- HedgeTerminal now correctly displays active positions on the accounts of the brokers who carry classical position rollover using conversion transactions (when positions are reopened at the time of rollover or clearing).
Version 1.6 2015.04.02
- The "Experts" column in the panel now shows the "Manual" identifier when the EA's magic number is equal to zero (order placed manually).
- Some minor bug fixes in version 1.05.
Version 1.5 2015.03.25
For all products:
- The new MetaTrader 5 version build 1090 and higher features a significantly higher order and deal parsing speed. Now parsing 20,000 orders and 20,000 deals with the i7 processor takes about 6-8 seconds. In previous versions the same parsing took 23-25 seconds.
- Fixed error, which cased part of table rows to get behind the table in the tabs area following panel resizing.
- Tooltip added for columns EntryDate and ExitDate. It helps to define the position entry and exit time when the full date does not fit into the column.
- All source codes provided with the library have been revised. Some older versions of the Chaos2.mqh EA have been fixed. Now it uses the new version Prototypes.mqh and compiles without warnings and errors.
Version 1.4 2015.02.16
- Changed the prototype file. ENUM_TRANS_DIRECTION enumeration has been replaced with ENUM_DIRECTION_TYPE. Added IF_LONG, IF_SHORT, IS_FROZEN and FOREACH_POSITION substitutional macros.
- Fixed minor errors in HedgeTerminalAPI.
Version 1.3 2015.01.29
All products:
- Added the progress bar. Now, the loading status can be seen in a small graphical window. The bar is displayed both for the panel and for HedgeTerminalAPI.
- The chart is now specially prepared for the table before the download. After uploading the EA, the previous chart state is restored. Now, the panel looks more attractive.
- Fixed Margin values. Now, it displays an actual margin load level from 0 to 100%.
- Added seconds to Entry Date and Exit Date columns.
Version 1.2 2015.01.22
- Fixed bad grammar in messages and dialogs.

- Updated Prototypes.mqh prototype file.
Version 1.1 2014.11.26
- Fixed entering the continuous loop if the new take profit level is similar to the old take profit's one.
- Fixed crash when setting the position volume exceeding the current one.
- Increased the speed of order and deal parsing by 7-10%.

- Fixed display of positions. Now, displayed positions are sorted by their IDs from the smallest to the largest one.
- Fixed demo panel errors.

- Fixed processing ENUM_CLOSE_TYPE modifier when closing a position via an Expert Advisor.
- Added ENUM_POSITION_STATE enumeration displaying the current position status.
- Added ENUM_HEDGE_PROP_INTEGER enumeration defining a modifier of one of HedgeTerminal properties.
- Added HedgePropertySetInteger function setting one of HedgeTerminal properties.
- Added HedgePropertyGetInteger function receiving one of HedgeTerminal properties.
- Fixed ENUM_HEDGE_ERR error activation in case a stop loss level is modified.
- Added Chaos2 Expert Advisor to the standard delivery.