Scotland
Posts: 27 since May 2019
Thanks Given: 11
Thanks Received: 4
|
Hi im using a trailing stop and stop loss. Most of the time this works but sometimes my trailing stop is putting me into a reverse position. This typically happens when my position does not move into profit from my entry and moves straight to the stop loss.
Is this because the orders are still live until the close of the bar?
How do I go about ensuring that this does not happen?
sl (4),
tp (12),
trailing_input (4),
if marketposition <> 0 then
setprofittarget_pt(tp);
setstoploss_pt(sl);
settrailingstop_pt(tp/trailing_input);
Thanks.
|