can't enter stop loss and take profit values
??
i'm using the CTrade class to open positions (CTrade.Buy and CTrade.Sell) and it works well if i don't specify any stop loss or take profit values in their respective fields (meaning i type 0) , however if i specify any value in these fields the ea stops working it never open any positions
why is that and what should i do
here is my code :
thank you.
Hi karemtalli,
What the error from the order send say ?
what's that ? i don't i don't get any errors it just doesn't open positions it doesn't display any errors
Hi karemtalli,
Really ? No error ?
Your code below does not give you pop out alert error ?
else { Alert("long position was not opened - ",GetLastError()); ResetLastError(); return; } else { Alert("Short position was not opened - ",GetLastError()); ResetLastError(); return; }
![]()
i'm using the CTrade class to open positions (CTrade.Buy and CTrade.Sell) and it works well if i don't specify any stop loss or take profit values in their respective fields (meaning i type 0) , however if i specify any value in these fields the ea stops working it never open any positions
why is that and what should i do
here is my code :
thank you.
my wrong it says error 4756 (which means: Trade request sending failed )
and if you type 0 instead of the stop loss and take profit values then it workes okay
Maybe your ea work on an ecn broker~
what does than mean and ecn broker
i'm using the CTrade class to open positions (CTrade.Buy and CTrade.Sell) and it works well if i don't specify any stop loss or take profit values in their respective fields (meaning i type 0) , however if i specify any value in these fields the ea stops working it never open any positions
why is that and what should i do
here is my code :
thank you.