Trend-Range Identifier

Process:
- ATR is calculated based on the input parameter atrLength
- Range/Channel containing upLine and downLine is calculated by adding/subtracting atrMultiplier * atr to close price.
- This range/channel will remain same until the price breaks either upLine or downLine.
- Once price crosses one among upLine and downLine, then new upLine/downLine is calculated based on latest close price.
- If price breaks upLine, the trend is considered to be up until the next line break or no lines are broken for rangeLength bars. During this state, candles are colored in lime and upLine/downLine are colored in green.
- If price breaks downLine, the trend is considered to be down until the next line break or no lines are broken for rangeLength bars. During this state, candles are colored in orange and upLine/downLine are colored in red.
- If close price does not break either upLine or downLine for rangeLength bars, then the instrument is considered to be in range. During this state, candles are colored in silver and upLine/downLine are colored in purple.
- In ranging duration, we display one among Keltner Channel, Bollinger Band or Donchian Band as per input parameter : rangeChannel. Other parameters used for calculation are rangeLength and stdDev
I have not fully optimized parameters. Suggestions and feedback welcome.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Sie können dieses Script für einen schnellen Zugang auf einem Chart Ihren Favoriten hinzufügen — erfahren Sie hier mehr.
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Haftungsausschluss
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Sie können dieses Script für einen schnellen Zugang auf einem Chart Ihren Favoriten hinzufügen — erfahren Sie hier mehr.
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io