HODL LINE [AstrideUnicorn]

This indicator determines periods of bull market when a buy-and-hold investor can hold the asset, and bear market periods when they should avoid holding it. Though it was designed primarily with cryptocurrencies in mind, it can be successfully used for any market.
Technically, the indicator is an asymmetric trend filter aimed to account for the fact that market sell-offs tend to be sharper than up-trends. The algorithm has two regimes – with and without price smoothing.

The step-like line is the main trend filter. It is colored green in an uptrend and red in a downtrend. When the smoothing is on, in addition to the trend filter, the indicator plots a purple line. It is a Hull Moving Average ( HMA ) of the price. In this case, the indicator uses this line instead of the price to find crossings with the trend filter.
When the price or the smoothed line crosses the trend filter above, it is an uptrend signal. The indicator marks such crossings with green circles. It also colors the chart background green in an uptrend. The price or the purple line crossing the trend filter below means a downtrend signal. Downtrend signals show as red circles. The chart background in a downtrend turns red.

Sensitivity – a dropdown list that allows the user to choose an averaging period of the indicator. Users can select a value for sensitivity from a predetermined set that better suits their investment horizon.
Use Smoothing – turns on and off smoothing of the price with HMA . With the smoothing turned on, the indicator responds slower to price changes, but at the same time produces less amount of false signals.


本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。