TradingView
HasanRifat
11. Febr. 2023 08:48

Range Detection 

Bitcoin / TetherUSBinance

Beschreibung

This is a simple indicator to find the sideways market or ranging market.

It is mainly focused on BTCUSD as BTCUSD doesn’t make big moves each and every candle. It makes big breakouts with one candle and then goes sideways for a longer period of time.

So, this indicator identifies those big candles and plots high and lows of those big candles using lines. New range is created only when new candles close above or below previous major candles high or low.

Versionshinweise

1. Range detection is now dynamic.
2. User inputs for the range to start showing.
3. Alerts for Bullish and Bearish breakouts.
Kommentare
abdulmunaf
Hi Hasan - Can you add parameter for min number of bars for Range and alerts if range is breached either on upside or downside
HasanRifat
abdulmunaf
@HasanRifat, Thank you !!
arthurarthur
Hello @HasanRifat, what's the purpose of

if high > candleHigh and close < candleHigh
candleHigh := high
if low < candleLow and close > candleLow
candleLow := low

?

The variables are already assigned whit these values.
abdulmunaf
Hello Hasan - Is it possible to re-draw support and resistance lines based on new high and low of x number of bars and not wait for original range to be broken before new range is established. I observed a scenario that let's say bar has a long wick, based on current logic range is established which remains for a very long time. Thanks again
HasanRifat
@abdulmunaf, When it comes to determining a range, it is possible to employ various logical approaches but altering the core logic of the indicator will inevitably lead to a change in its intended functionality.
tradingaccount7777777
Hi, thanks. Any way to get more history values? I would like to backtest it.
HasanRifat
@tradingaccount7777777, Yes, you can use the plot function to visualize the results of your normalization and get more historical values.
Mehr