What happens here ? - page 2

Pilot65
696
Pilot65  

Ok guys thanks for your input.

Seems the safest way to handle this is to assume OrderSelect selects a (more or less) random order from the pool,

and that any reqired order must be achieved by additional filtering to be sure things happend as planned.

I'll clean up the code and make it a little more robust.

meikel
365
meikel  
DayTrader:

Ok guys thanks for your input.

Seems the safest way to handle this is to assume OrderSelect selects a (more or less) random order from the pool,

and that any reqired order must be achieved by additional filtering to be sure things happend as planned.

I'll clean up the code and make it a little more robust.

i cant imagine, that metaquotes implement a random function in orderselect.

if someone thinks that this is possible, the only solution would be, dont use MT4, because in every other function random maybe also implemented

BR
454
BR  

Daytrader...If you have any doubt...proving the truth is very easy. Just backtest closing the orders

counting down and look at the result (and order of closing of the orders)....


for(i=OrdersTotal()-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);


Then do the same thing counting up....


for (n=0;n<OrdersTotal();n++)
{

OrderSelect(n,SELECT_BY_POS,)


The answer should be obvious....