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

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità