You can analyze comment "split from #XXXXXX"
MagicNumber still the same
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The ticket # is i closed and goes into Account History trades and a new ticket# is created which shows up in trades screen.
If I attempt to modify the stop loss on the remaining lots, I get an unknown ticket number. The log file shows that it tried to modify using the ticket number of the lot (original ticket#) that was closed.
When I am doing the following to get the ticket# of the active trades, I get the old ticket # that was closed.
int total = OrdersTotal();
int ticket;
for (int n = 0; n < total; n++)
{
OrderSelect(n, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()== Symbol())
{
ticket = OrderTicket();
break;
}
// ticket has the ticket#
How can I get the new ticket # of the remaining lots?