The aim of this script is to attenuate danger in all conditions, particularly when the shit hits the fan. This script offers the perfect and the quickest potential danger mitigation out there through MT4 by using some distinctive logic not present in another close-all scripts.
1.Internet positions are calculated per image (sum of all open trades).
2.Symbols are prioritized to handle net-positions from bigger (extra danger) to smaller.
3.Hedge orders are despatched within the order of precedence to shut all publicity directly whatever the variety of trades.
4.As soon as all open-expo is hedged this system prioritizes pending orders
5.Pending orders are deleted so as of highest danger of being executed
6.Remaining hedged positions (closed by hedge) are then reconciled on the dealer server and there aren’t any prices/unfold/commissions charged on the hedge (it’s actually handled like a closed place)
Be aware: This solely works on non-FIFO hedging brokers. I’ve additionally included a unique script that closes orders on FIFO brokers (slowww in comparison with hedging brokers).
You might also just like the Hedge Commerce Panel