karemtalli:
hello, i'm using the CTrade class and i use positionmodify() to have trailing stops
however each time the expert advisor has to modify the position i get the 4756 error, here is a pic of the errors :
any ideas about what's causing this ?
Don't just check GetLastError(), but also check trade result, see the code in here and read the rest of the thread. You have invalid stop, which mean you probably modify within the range of SymbolInfoInteger's SYMBOL_TRADE_STOP_LEVEL &/ SYMBOL_TRADE_FREEZE_LEVEL
ok thanks i figured the problem i was trying to change the stop values by very little differnce
any way do you know other ways to implement trailing stops other than this way, i mean is there an easier way or function (preferably in CTrade class) to do it automaticaly instead
of using positionmodify() ?
any way do you know other ways to implement trailing stops other than this way, i mean is there an easier way or function (preferably in CTrade class) to do it automaticaly instead
of using positionmodify() ?
karemtalli:
ok thanks i figured the problem i was trying to change the stop values by very little differnce
any way do you know other ways to implement trailing stops other than this way, i mean is there an easier way or function (preferably in CTrade class) to do it automaticaly instead
of using positionmodify() ?
Nope, but you can create your own trade class, don't you ?
ok thanks i figured the problem i was trying to change the stop values by very little differnce
any way do you know other ways to implement trailing stops other than this way, i mean is there an easier way or function (preferably in CTrade class) to do it automaticaly instead
of using positionmodify() ?
phi.nuts:
Nope, but you can create your own trade class, don't you ?
i'm not that good yet... hopefully i will in the future
Nope, but you can create your own trade class, don't you ?
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
hello, i'm using the CTrade class and i use positionmodify() to have trailing stops
however each time the expert advisor has to modify the position i get the 4756 error, here is a pic of the errors :
any ideas about what's causing this ?