Can this exit method be implemented in SQ?
2 replies
eastpeace
4 years ago #254807
About trailing stop.
The red line is SQ’s ATR trailing stop. It will move in the unfavorable direction.
It is more like a volatility monitor than a good stop trailing. So I adjust the stop loss to a value that is always away from the entry price. As indicated by the green line.
Here is my request.
https://roadmap.strategyquant.com/tasks/sqp_0066
Can this exit method be implemented in SQ? The EL code is easy. But Java in SQ is too hard for me.
Is anyone interested in this? How to add such an exit method in SQ.
Here is EL style code.
ATRV = avgtruerange(20);
mp = MarketPosition;
if MarketPosition= 1 then Begin
Atrtrail_SQ = c – 3*ATRv;
if BarsSinceEntry = 0 then Begin
AtrTrail_Fix = Atrtrail_SQ;
end;
if Atrtrail_SQ < AtrTrail_Fix Then Begin
AtrTrail_Fix = AtrTrail_Fix[1];
end;
else Begin
AtrTrail_Fix = Atrtrail_SQ;
end;
end;
eastpeace
4 years ago #254810
It is like this method.
https://school.stockcharts.com/doku.php?id=technical_indicators:chandelier_exit
And there is another exit method with time factor,
http://forum.metastock.com/posts/t148709-
eastpeace
4 years ago #254859
Please forgive my invincibility. As I checked the code in SQ and MC again, I found that the trailing method that like chandelier_exit has been implemented and works well.
Viewing 2 replies - 1 through 2 (of 2 total)