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 автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности