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

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?

Wyłączenie odpowiedzialności