I am currently running a simple EA that open and close orders as per the attache file sections 15 & 16.
The Ea will open or close a pending, only one trade at a time so on opening a Pending Buy will Close a Pending Sell and opening a Pending SELL will close a Pending BUY.
I would like the following to occur instead;
1. Opening a Pending BUY order will Close a Pending sell order
2. Opening a Pending SELL order will Close a Pending BUY order
3. If in a MARKET BUY order a Pending SELL order will NOT close the MARKET order but a SELL MARKET order will close the BUY Market order & visa versa.
4. The ability to close a MARKET order based on other parameters Trailing Stop, other Indicator inputs etc.