I have the following code to modify the stoploss of the open 'SELL' orders,
the order is modified every time the market price varies and the problem is that, the modifed value of stoploss is not always equal to the value of SL....
I dont know why this happens...
With in a period, I checked the value of SL with
it is really not changing...
but the stoploss is anyway modified, and keeps jumping between two values: SL and SL - spread.
Could someone explain this? Thanks a lot,
LSharp
Inserted Code
..... OrderSelect(Tickets, SELECT_BY_POS, MODE_TRADES); SL = MA + spread; //MA is the calculated moving average, and spread speaks for it self. OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,CLR_NONE);
the order is modified every time the market price varies and the problem is that, the modifed value of stoploss is not always equal to the value of SL....
I dont know why this happens...
With in a period, I checked the value of SL with
Inserted Code
comment(SL)
but the stoploss is anyway modified, and keeps jumping between two values: SL and SL - spread.
Could someone explain this? Thanks a lot,
LSharp