Jump to content

Close Opposite Orders Script - Pay 1x Spread NOT 2x When Closing Hedged Positions


Recommended Posts

This script enables you to close a hedged position and only pay 1x spread instead of 2.

I find it very useful for scaling out of winning positions, as I can just place pending limit orders at my TP levels and then use this script to close close out the 'opposite orders' and only pay 1x spread.

 

http://www.mediafire.com/file/95wmc8atvz6f46j/CloseOppstOrders.mq4

 

Example:

Long GU 1.00 lots @ 1.5800

Short GU 0.33 lots @ 1.5850 (+50 pip ) - a filled Sell Limit Order

Short GU 0.33 lots @ 1.5900 (+100 pips) - a filled Sell limit Order

 

If you ran the script now it would close out the 2x short positions of 0.33 lots as well as simultaneously close 0.66 lots of the long position, banking the profit and you only pay 1 spread. 0.34 lots long would be left open.

 

I think it's pretty cool - I wish I knew about it years ago.

 

Cheers, Pye

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...