I am running a long-only strategy that opens multiple long trades, and then sells them off one by one. The first position it sells should correspond with the ticket of the first position it had opened.
I have been browsing the forums for literally hours on end, as well as documentation, but have been unable to get it to work (Tried mostly with CTrade functions).
Can anyone point me in the right direction?
So basically, they store the tickets in an array, and sort via time?
So every position I open, i should append the corresponding ticket to an array?
So I should just close the ticket corresponding with the first index in the array? And then once closed, remove it from the array?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.