Problem with trailing stop loss
chris.dotan:
Hi,
code below works but only for buy, for sell not activated. What is problem?
The best place to start would be to print any possible errors. The OrderModify() function is a bool (true/false) so always print an error notification function should a bool function return the opposite of what you want it to return.
I know it's not a definitive solution but its the best place to start in investigating it.
if (!OrderModify(...)){ PrintFormat("Your position failed to modify. (Error %d", GetLastError()); } else { CreateTrailingStopStatusInfoComment("Activated!"); }
ticket = OrderModify(
OrderModify does not return a ticket number.
Hi,
code below works but only for buy, for sell not activated. What is problem?