This is a simple trailing stop loss tool using bar ranges, to be used with some discretion and understanding of basic price action.
Given a configurable percentage value, e.g. 25%:
A bullish bar (close > open) will be marked at the lower 25%
A bearish bar (close < open) will be marked at the upper 25%
The idea is to move your stop loss after each completed bar in the direction of the trade, at the configured percentage value.
If you have an inside bar, or something very close to it, or a doji-type bar, don't trail that, because there is no clarity of what the bar means, we can only wait.
The chart shows an example use, with trailing at 10% of the bar, from the initial stop loss after entry, trailing till we get stopped out. Some things to note:
Because this example focuses on a short trade, we ignore the bullish candles, and keep our trailing stop at the last bearish candle.
We ignore doji-esque candles and inside bars, where the body is in the range of the prior candle. Some definitions of inside bars include the wicks as well. I don't have a strong opinion, and this example is just for illustration. Furthermore, the inside bar will likely be the opposite of the swing bars (e.g. bullish bar in a range of bearish bars), so our stop remains unchanged.
One could use this semi-systematic approach in scalping on any timeframe, for example to maximise gains, adjusting the bar percentage as needed.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.