I know, I know... we've all said it before, hedging is f*** stupid because it costs you double in fees, right?
Well that's actually not (always) the case. There's a neat little hidden gem in MT that's almost entirely undocumented and almost never used by developers (ever) that's called OrderCloseBy. What this function does is takes hedged orders and reconciles the transactions as netted. This allows you to do some neat things we'll talk about in a minute, but for now it's important to understand that if you use this method you are not charged double fees since you are instructing the broker server to reconcile the hedge as a netting transaction.
eg. Buy 1 lot to open and Sell 1 lot to close. Profit = spread of sell price - buy price. Net commission = 1 lot (not 2). Net Profit = Profit - commission.
So why is this important? Well it's about risk management. Let's say you have 20 open positions and you want to close them down instantly. How do you do it?
Option 1: Close them one by one whilst crying into your keyboard because your profits are slipping away from waiting for each order to close and confirm....and on......and on........
Option 2: You send in a hedge. Wait until calm markets. Close both and get charged double fees.
Option 3: You send in a hedge. Close whenever you damn-well please by instructing the server to reconcile both transactions as net-closed and only get charged once.
What about reversing positions? Even if you're reversing a single order you still have to close one.........wait for confirmation.........open another. In the mean-time a full second could have passed and massive slippage accrued in the process. Reversing with hedging is instant when you send an order in that's net_position * 2 in the opposite direction. Then of course you use OrderCloseBy to reconcile the orders as partially closed - costing you nothing in the process.
Here is a proof of concept trade panel I made. It's not the prettiest panel out there, but it is the fastest!
IMPORTANT: This will not work with brokers that don't support hedging accounts.
Features:
Well that's actually not (always) the case. There's a neat little hidden gem in MT that's almost entirely undocumented and almost never used by developers (ever) that's called OrderCloseBy. What this function does is takes hedged orders and reconciles the transactions as netted. This allows you to do some neat things we'll talk about in a minute, but for now it's important to understand that if you use this method you are not charged double fees since you are instructing the broker server to reconcile the hedge as a netting transaction.
eg. Buy 1 lot to open and Sell 1 lot to close. Profit = spread of sell price - buy price. Net commission = 1 lot (not 2). Net Profit = Profit - commission.
So why is this important? Well it's about risk management. Let's say you have 20 open positions and you want to close them down instantly. How do you do it?
Option 1: Close them one by one whilst crying into your keyboard because your profits are slipping away from waiting for each order to close and confirm....and on......and on........
Option 2: You send in a hedge. Wait until calm markets. Close both and get charged double fees.
Option 3: You send in a hedge. Close whenever you damn-well please by instructing the server to reconcile both transactions as net-closed and only get charged once.
What about reversing positions? Even if you're reversing a single order you still have to close one.........wait for confirmation.........open another. In the mean-time a full second could have passed and massive slippage accrued in the process. Reversing with hedging is instant when you send an order in that's net_position * 2 in the opposite direction. Then of course you use OrderCloseBy to reconcile the orders as partially closed - costing you nothing in the process.
Here is a proof of concept trade panel I made. It's not the prettiest panel out there, but it is the fastest!
IMPORTANT: This will not work with brokers that don't support hedging accounts.
Features:
- One-click trading
- Set TP and SL by points
- Add or subtract incremental positions at will to manage overall net exposure
- Reverse net position instantly
- Close net position instantly
- Lock order management to Panel orders only so you won't interfere with other orders (like alt EA orders)
- Order Maintenance button to reconcile transaction on your schedule so it won't slow down rapid scalping in a fast market
- Status in window. Includes last action status with order latency and slippage reporting as well as the overall net position.
- Move window anywhere on screen for convenience
Inserted Video
Attached File(s)
HedgeTradePanel.ex4
338 KB
|
4,269 downloads