Hedge The Hedge (HTH) Trader for MetaTrader 5: A Smart Hedging Strategy

Mike 2017.05.02 19:50 39 0 0
Attachments

The brains behind this strategyc0d3, mq5 authorbarabashkakvn.


Hedge The Hedge (HTH) Trader is designed to hedge the typical hedging strategy, like pairing EURUSD with USDCHF. While pairs trading can sometimes lead to significant drawdowns, this innovative approach aims to hedge the hedge, minimizing those tough losses traders often face. The HTH Trader effectively hedges EURUSD against USDCHF and GBPUSD against AUDUSD, creating a robust hedge the hedge strategy. It typically executes four trades per day, and the drawdown is contained since positions are kept live for just one day. At the start of a new day, when the Hour() for your broker hits zero, the EA kicks in. It waits until the Hour() reaches 23 to close the current positions, and then it resets for the new day.

  • When the previous day's deviation for EURUSD is positive, the EA goes LONG on EURUSD, LONG on USDCHF, SHORT on GBPUSD, and LONG on AUDUSD. In this case, EURUSD is hedged against USDCHF, GBPUSD against AUDUSD, and USDCHF against AUDUSD.
  • If the previous day's deviation for EURUSD is negative, the EA enters SHORT on EURUSD, SHORT on USDCHF, LONG on GBPUSD, and SHORT on AUDUSD.
  • The strong correlation between the EURUSD/USDCHF ratio and the GBPUSD/AUDUSD ratio allows for effective hedging the hedge.


New Feature: Emergency Trading

If 'enable_emergency_trading' is set to 'true', this EA will monitor losses. Once losses hit the specified 'emergency_loss' PIP value, it will open new trades based on profitable positions. For example, if EURUSD and USDCHF are in the red but GBPUSD and AUDUSD are in the green, the EA will clone the profitable GBPUSD and AUDUSD positions. This emergency function is designed to execute only once per day when the 'emergency_loss' threshold is reached, and then it resets for the next day. This feature cannot be disabled unless the code is removed.

if(enable_emergency_trading==true && totalprofit<=-emergency_loss){doubleorders();}


EA Options:

  • Trade | enables trading if set to true
  • C1 | 1st currency
  • C2 | 2nd currency
  • C3 | 3rd currency
  • C4 | 4th currency
  • Show_Profit | enables tracking of profit/loss for all trades executed by this EA
  • Enable_Profit | enables profit monitoring to close all positions
  • Enable_Loss | enables loss monitoring to close all positions
  • Enable_Emergency_Trading | allows entry into new trades when profit reaches the Emergency_Loss PIP value
  • Profit | PIP value
  • Loss | PIP value
  • MagicNumber1 | number to track C1
  • MagicNumber2 | number to track C2
  • MagicNumber3 | number to track C3
  • MagicNumber4 | number to track C4
  • E_MagicNumber | number to track Emergency Trades
  • Lot | order lots
    List
    Comments 0