Smart Hedge MT5
- Experten
- Francesco Baldi
- Version: 1.0
- Aktivierungen: 10
-
Worried about weekend price crashes wiping your account?
-
Tired of adverse news releases stopping your positions?
-
Trade with peace of mind with Smart Hedge.
Smart Hedge protects your positions from weekend gaps and news spikes.
MT4 version: https://www.mql5.com/en/market/product/113290
Description:
Have you ever feared that some breaking news during the weekend could wipe your account?
Did you ever have your positions stopped by an adverse news release during the market open hours?
I did, and that’s why I came out with this product and now you too can protect your account automatically with Smart Hedge.
This product hedges all your open positions before market closures and news releases, neutralizing your net open volume.
After the danger is gone all the hedging positions are closed and your trading can proceed as usual.
This allows your strategies to work without being affected by unpredictable events and, differently from an account equity protector, protects your equity before the damage is done.
How it works:
When placed on a chart the advisor scans M1 bars in order to identify market open / close times, also it periodically downloads and updates the list of upcoming news.
You can configure which market closure gaps and which news events you want to protect.
You can also choose which symbols and magic numbers will be hedged.
How to install:
First of all you have to allow the following urls in the Tools | Options | Expert Advisors menu:
Place the advisor on the chart of a symbol that you want to protect, any timeframe, configure what to protect using the provided parameters and you are done.
The first time that the advisor is placed on a chart it scans M1 bars to determine market open / close hours, if there are not enough available bars it will download them by scrolling the chart, this has a weird visual effect but it is necessary, also it might take a while so be patient.
Configuration:
Parameter | Description |
---|---|
Magic Number for Hedging Positions | Magic Number for the positions that the advisor manages, must be unique. |
Orders Comment | This will appear in the comment column for the hedging positions. |
Symbol List (comma separated) | You can specify a list of symbols to protect, “current” means the chart symbol, see cautions below. |
Magic Numbers to Hedge | This is a comma separated list of the magic numbers of the positions that you want to hedge, leave it empty to protect every position. |
S/L Quota for Hedging Position T/P | Hedging positions can have Stop Loss and Take Profit. They are calculated as a quota of hedged positions Take Profit and Stop Loss. e.g. if the position to be hedged has a Stop Loss of 100 pips and you set this parameter to 2.0, Take Profit will be set to 200 pips. Default is 1.0 (TP = SL). |
T/P Quota for Hedging Position S/L | Hedging positions can have Stop Loss and Take Profit. They are calculated as a quota of hedged positions Take Profit and Stop Loss. e.g. if the position to be hedged has a Take Profit of 100 pips and you set this parameter to 2.0, Stop Loss will be set to 200 pips. Default is 1.0 (SL = TP). |
Weekend Gaps Protection Enabled | Enable hedging of positions left open over weekends (most symbols except cryptos). |
Night Gaps Protection Enabled | Enable hedging of positions overnight (for gold and some indices). |
Intraday Gaps Protection Enabled | Enable hedging of positions on intraday closures (stocks). |
Min Gap Length to Consider | This is the minimum duration of a gap in minutes to be considered. Default is 60, meaning that gaps of less than one hour will not be considered. |
Minutes Before Gap to Start Hedging | This is the time in minutes before the market closes to start hedging. Default is 10, meaning that positions will be hedged 10 minutes before closure. |
Minutes After Gap to Stop Hedging | This is the time in minutes after the market reopens to stop hedging. Default is 0, meaning that hedging positions will be closed as soon as the market opens. |
News Protection Enabled | Enables news protection. |
Minimum Impact | News are categorized by impact (Low, Medium and High). Default is High, meaning that only high impact news will be considered. |
Include Speeches | Speeches usually do not trigger price spikes, they often start or reinforce trends though. Default is false, meaning that speeches will not be considered. |
Minutes Before Event to Start Hedging | This is the time in minutes before the news release to start hedging. Default is 3, meaning that positions will be hedged 3 minutes before the event. |
Minutes After Event to Stop Hedging | This is the time in minutes after the news release to stop hedging. Default is 2, meaning that hedging positions will be closed 2 minutes after the event, this should be enough to catch the price spike. |
Auto Server GMT Offset | This is required if news protection is enabled, it allows synchronization of server time with news release time. Default is true. |
Manual Server GMT Offset | You can safely skip setting this parameter, since synchronization is automatic. Default is 2, most brokers server time zone is gmt+2. |
Manual Server Daylight Saving Mode | You can safely skip setting this parameter, since synchronization is automatic. Default is United States, most brokers use NY daylight saving time. |
Caution:
This advisor allows configuration of multiple symbols on one chart, but you must be well aware of what you are doing.
Market closing times are determined from the current chart only, therefore if you put this advisor on a forex symbol (i.e. EURUSD), you should not add metals or indices in the symbol list, since those have closing times at night which would not be detected.
Therefore you should put at least one instance of the advisor for every asset type (forex, commodities, indices, stocks, …) and do not mix them.
If you are unsure, do not configure multiple symbols and simply put one instance of the advisor on separate charts for each symbol that you want to protect.
Backtesting:
Although backtesting this ea would normally produce no result, in order to see how it works and what would happen in a real environment, in the strategy tester it will place random orders to be hedged.
What to expect:
Sometimes gaps are in your favor, sometimes they are not, Smart Hedge neutralizes them all, taking away the losses but also the easy gains. On average the net profit / loss of this advisor will be 0, minus broker commissions.
If you are a trader and not a gambler this tool will help you trading with peace of mind.
Feel free to contact me if you have any questions.