How is the PercentHL calculated? I'm trying to determine what the TS dollar value would be for the trailstop to be triggered.
where HMAxTS is a percentage for the trail stop.
CODE:
CloseAtTrailingStop(foundPosition0, TrailingStopType.PercentHL, HMAxTS.AsDouble, "Sell At T/S");
where HMAxTS is a percentage for the trail stop.
Rename
Documented in the QuickRef.
○ PercentHL - Like PercentC, but adjusts based on intraday progress; uses highs for long positions and lows for short positions.
○ PercentHL - Like PercentC, but adjusts based on intraday progress; uses highs for long positions and lows for short positions.
HMAxTS is a Parameter [type] in your script.
Thanks, very helpful. FYI, the Quickref in the application and on the Support tab leaves off the clarifiers "...uses highs *for long positions* and lows *for short positions*". It just says "...calculated using highs and lows."
I can clarify it. Anyway, the idea implied is that you're using the most favorable excursion for the trade to set the Trailing stop (instead of using the Closing price).
Your Response
Post
Edit Post
Login is required