OPEN-SOURCE SCRIPT

ka66: Candle Range Mark

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%:

  1. A bullish bar (close > open) will be marked at the lower 25%
  2. 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.
Volatility Stop

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明