
Mar 19 2015 at 13:38
Hey guys,
This may be a very silly question, but suppose I have 4 trades open, they will have Position 0, 1, 2 and 3 on the MODE_TRADES pool..
Now, if I close the order that's assigned to position 2, will I be left with positions 0, 1 and 3, or will the order in position 3 be reassigned to position 2?
This may be a very silly question, but suppose I have 4 trades open, they will have Position 0, 1, 2 and 3 on the MODE_TRADES pool..
Now, if I close the order that's assigned to position 2, will I be left with positions 0, 1 and 3, or will the order in position 3 be reassigned to position 2?
CrazyTraderfx
(CrazyTrader)
เป็นสมาชิกตั้งแต่ Nov 21, 2011
1718 โพสต์
Mar 19 2015 at 18:05
Renko posted:
Hey guys,
This may be a very silly question, but suppose I have 4 trades open, they will have Position 0, 1, 2 and 3 on the MODE_TRADES pool..
Now, if I close the order that's assigned to position 2, will the order in position 3 be reassigned to position 2?
Yes I guess so.
Simply do a test by closing 2, then check if it closes 2 positions.
Any pool, at any time, have indexes form 0 to MAX-1 !
... where MAX can be : OrdersHistoryTotal() or OrdersTotal() .
Any trade operation change both pools (list of orders) immediately.
WARNING : Before new OrderSelect() , you still have old data selected (loaded in memory) !!!
So, If you have 4 active position ( list index =0,1,2,3 ),
and close position ( index=2 ),
the result is :
-> Total position = 3
-> possible List index = 0,1,2
So here is a test :
- if you have 4 positions, and close position=2, try :
--> OrderSelect(3,SELECT_BY_POS,=MODE_TRADES ); ==> return ERROR
--> OrderSelect(2,SELECT_BY_POS,=MODE_TRADES ); ==> return current position=2, previous=3
... where MAX can be : OrdersHistoryTotal() or OrdersTotal() .
Any trade operation change both pools (list of orders) immediately.
WARNING : Before new OrderSelect() , you still have old data selected (loaded in memory) !!!
So, If you have 4 active position ( list index =0,1,2,3 ),
and close position ( index=2 ),
the result is :
-> Total position = 3
-> possible List index = 0,1,2
So here is a test :
- if you have 4 positions, and close position=2, try :
--> OrderSelect(3,SELECT_BY_POS,=MODE_TRADES ); ==> return ERROR
--> OrderSelect(2,SELECT_BY_POS,=MODE_TRADES ); ==> return current position=2, previous=3
Small GAIN, big WIN
its a kind of silly ques but try something on 2

Mar 20 2015 at 10:35
Thanks Ivan!
โปรดเข้าสู่ระบบเพื่อแสดงความคิดเห็น