OPEN-SOURCE SCRIPT

Hyperbolic Tangent SuperTrend [InvestorUnknown]

Diupdate
The Hyperbolic Tangent SuperTrend (HTST) is designed for technical analysis, particularly in markets with assets that have lower prices or price ratios. This indicator leverages the Hyperbolic Tangent Moving Average (HTMA), a custom moving average calculated using the hyperbolic tangent function, to smooth price data and reduce the impact of short-term volatility.

Hyperbolic Tangent Moving Average (HTMA):
  • The indicator's core uses a hyperbolic tangent function to calculate a smoothed average of the price. The HTMA provides enhanced trend-following capabilities by dampening the impact of sharp price swings and maintaining a focus on long-term market movements.
  • The hyperbolic tangent function (tanh) is commonly used in mathematical fields like calculus, machine learning and signal processing due to its properties of “squashing” inputs into a range between -1 and 1. The function provides a non-linear transformation that can reduce the impact of extreme values while retaining a certain level of smoothness.


cuplikan



The HTMA is calculated by taking the difference between the price and its simple moving average (SMA), applying a multiplier to control sensitivity, and then transforming it using the hyperbolic tangent function.



Important Note: The Hyperbolic Tangent function becomes less accurate with very high prices. For assets priced above 100,000, the results may deteriorate, and for prices exceeding 1 million, the function may stop functioning properly. Therefore, this indicator is better suited for assets with lower prices or lower price ratios.

SuperTrend Calculation:
  • In addition to the HTMA, the indicator includes an Average True Range (ATR)-based SuperTrend calculation, which helps identify uptrends and downtrends in the market. The SuperTrend is adjusted dynamically using the HTMA to avoid false signals in fast-moving markets.
  • The ATR period and multiplier are customizable, allowing users to fine-tune the sensitivity of the trend signals.





Inbuilt Backtest Mode:
  • The HTST includes an inbuilt backtest mode that enables users to test the indicator's performance against historical data, similar to TradingView strategies.


cuplikan

  • The backtest mode allows you to compare the performance of different indicator settings with a simple buy and hold strategy to assess its effectiveness in different market conditions.


cuplikan

Hint Table for Display Modes:
  • The indicator includes a Hint Table that recommends the best pane to use for different display modes. For example, it suggests using the "Overlay" mode in the same pane as the price action, while the "Backtest Mode" is better suited for a separate pane. This ensures a more organized and clear visual experience.
  • The Hint Table appears as a small table at the bottom of the chart with easy-to-follow recommendations, ensuring the best setup for both visual clarity and indicator functionality.


With these features, the Hyperbolic Tangent SuperTrend Indicator offers traders a versatile and customizable tool for analyzing price trends while providing additional functionalities like backtesting and display mode hints for optimal usability.
Catatan Rilis
Updated the code to pinescript v6, added backtesting library v2 with more backtesting functions and removed old backtesting functions from the code
Catatan Rilis
Updated the code to pinescript v6, added backtesting library v2 with more backtesting functions and removed old backtesting functions from the code
Moving AveragesTrend Analysis

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan