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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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!