
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
Ya, does not work and only 1 order is close and not both together
Thanks, but is this comparing 1 with 2, then 2 with 3, then 3 with 4?
I need to specifically compare order
1 & 2 only
3 & 4 only
5 & 6 only
..... and so on
other orders should not be compared.
just add before this line
just add before this line
Thanks, but does not work, It closes any profitable orders. It is quite a mess.
EX. I have 10 orders like order 1,2,3,4,5,6,7,8,9,10. I opened them in sequential order, meaning opened order 1 then 2 then follow by 3 ... etc.
I would like to group them in pairs (see below).
1 & 2 (Pair 1) or
3 & 4 (Pair 2) or
5 & 6 (Pair 3) or
7 & 8 (Pair 4) or
9 & 10 (Pair 5)
I would also like a loop to go through the 10 orders over and over again until the addition of any pair is more than Profit.
Pair must be inseparable.
If the addition of any of the 5 pairs is more than Profit, only then close that pair. It should not close 1 & 5, or 1 & 3, or 2 & 3 ... etc.
Do you think that my ticketA/B and profitA/B is updated correctly in the loop as (1 & 2), (3 & 4), (4 & 5) ... etc.?
Or do I need to store ticket number in some sort of an array?