Closing Trades in Stages

 

Hi Traders,

I have some code ( I didnt write it) that attempts to determine a trades level in respect to the stages I use to perform a partial close. It attempts to count Order History Records, as a way to determine at which level the open trade is currently. It's quite messy and not fool proof. Would be nice if there was a single unifying ID for trades, that wouldnt change as the trade is close in partial stages. Currently MT4 chains the parts together with an entry in the Comments field. Im considering writing a recursive routine to join them together and count them. In the end though, I really don't like this approach (counting history recs) as a means to manage trades.


Anyone have a solid approach to doing this?


Xie Xie!

Reason: