Postmessagea & trailing stops

 
Hi,

Does anyone know if there is a way in MQ4 (programmatically) to set trailing stops? This would be like mimicking right clicking on a currently open order and selecting the number of PIPs for the trailing stop.

Thanks,

Neil
 
snafu4: Does anyone know if there is a way in MQ4 (programmatically) to set trailing stops?
if Bid > OrderStopLoss() + X * pips2dbl modify SL = Bid - X * pips2dbl
 
WHRoeder:
if Bid > OrderStopLoss() + X * pips2dbl modify SL = Bid - X * pips2dbl

Thanks but I should have been specific. I don't want to continuously run the code. I want to send a PostMessageA command that sets it like I was right clicking on an open order.
 
snafu4:
Thanks but I should have been specific. I don't want to continuously run the code. I want to send a PostMessageA command that sets it like I was right clicking on an open order.
No one knows how to do this with PostMessageA? I'm a little surprised. Thanks anyways.
 
snafu4:
No one knows how to do this with PostMessageA? I'm a little surprised. Thanks anyways.
PostMessageA is not within the scope of mql4 . . .
Reason: