Hi!
Exist a function analogous to Close[n] that returns the last ticket number of the opened position in function of n?
Like this:
Ticket[0] = 12340000 (buy)
Ticket[1] = 12340001 (buy)
Ticket[2] = 12340002 (sell)
Ticket[3] = 12340003 (buy)
Ticket[4] = 12340004 (sell)
Ticket[5] = 12340005 (sell)
Ticket[6] = 12340006 (buy)
Ticket[7] = 12340007 (sell)
Ticket[8] = 12340008 (buy)
And also for buy and sell, like this:
TicketBuy[0] = 12340000
TicketBuy[1] = 12340001
TicketBuy[2] = 12340003
TicketBuy[3] = 12340006
TicketBuy[4] = 12340008
TicketSell[0] = 12340002
TicketSell[1] = 12340004
TicketSell[2] = 12340005
TicketSell[3] = 12340007