Error 4756 : invalid stop not really about stops ...

 

Hi !

Using CTrade. Strategy Tester.

Trade.PositionModify(_Symbol,sl,0);

returns

2013.05.21 23:59:00   CTrade::OrderSend: modify EURUSD (sl: 1.28620, tp: 0.00000) [invalid stops]
2013.05.21 23:59:00   failed modify sell 0.22 EURUSD sl: 0.00000, tp: 0.00000 -> sl: 1.28620, tp: 0.00000 [Invalid stops]

(look at the date)


Strategy Tester run from 21.05.2013 before the deal taken

No error

How's that possible ?! I've seek on the forum with no clear solution & now send a copy to the service desk. May you share your experience & workarounds about please ? 

NB : somes says putting a Sleep(5) before the position modify make the trick but didn't worked for me ...

NB 2 : Not seen live session.

 
Icham Aidibe:

Hi !

Using CTrade. Strategy Tester.

returns


Strategy Tester run from 21.05.2013 before the deal taken

How's that possible ?! I've seek on the forum with no clear solution & now send a copy to the service desk. May you share your experience & workarounds about please ? 

What was the market price at the time you tried to modify your SL ? You need to take into account stopslevel.

You can also have to normalize your sl price, depending on how it's set.

NB : somes says putting a Sleep(5) before the position modify make the trick but didn't worked for me ...

Of course, that doesn't make sense.
 
Alain Verleyen:

What was the market price at the time you tried to modify your SL ? You need to take into account stopslevel.

You can also have to normalize your sl price, depending on how it's set.

Of course, that doesn't make sense.

All of course good about price l'AngeVoyageur. Including the stop level & the swap.

 
Icham Aidibe:

All of course good about price l'AngeVoyageur. Including the stop level & the swap.

Of course, all is good but you get an error.
 
Alain Verleyen:
Of course, all is good but you get an error.

A error that appears only when the tester runs on a long history. May be due to memory ?

 
Icham Aidibe:

A error that appears only when the tester runs on a long history. May be due to memory ?

There is no way to help if you don't give all informations.
 
Alain Verleyen:
There is no way to help if you don't give all informations.

There are all the informations & the complete log. Trade.Modify ---> error invalidstop ---> printf(_LastError) ---> error 4756 on full history test & not if started few days before the error occurs.

Everything's there Alain.