OPEN-SOURCE SCRIPT

AadTrend [InvestorUnknown]

The AadTrend indicator is an experimental trading tool that combines a user-selected moving average with the Average Absolute Deviation (AAD) from this moving average. This combination works similarly to the Supertrend indicator but offers additional flexibility and insights. In addition to generating Long and Short signals, the AadTrend indicator identifies RISK-ON and RISK-OFF states for each trade direction, highlighting areas where taking on more risk may be considered.


Core Concepts and Features

Moving Average (User-Selected Type)
The indicator allows users to select from various types of moving averages to suit different trading styles and market conditions:
  • Simple Moving Average (SMA)
  • Exponential Moving Average (EMA)
  • Hull Moving Average (HMA)
  • Double Exponential Moving Average (DEMA)
  • Triple Exponential Moving Average (TEMA)
  • Relative Moving Average (RMA)
  • Fractal Adaptive Moving Average (FRAMA)


Average Absolute Deviation (AAD)
The Average Absolute Deviation measures the average distance between each data point and the mean, providing a robust estimation of volatility.



  • This provides a volatility measure that adapts to recent market conditions.


Combining Moving Average and AAD
The indicator creates upper and lower bands around the moving average using the AAD, similar to how the Supertrend indicator uses Average True Range (ATR) for its bands.



A chart displaying the moving average with upper and lower AAD bands enveloping the price action.
快照


Signals and Trade States

1. Long and Short Signals
  • Long Signal: Generated when the price crosses above the upper AAD band,
  • Short Signal: Generated when the price crosses below the lower AAD band.

2. RISK-ON and RISK-OFF States
These states provide additional insight into the strength of the current trend and potential opportunities for taking on more risk.
  • RISK-ON Long: When the price moves significantly above the upper AAD band after a Long signal.
  • RISK-OFF Long: When the price moves back below the upper AAD band, suggesting caution.
  • RISK-ON Short: When the price moves significantly below the lower AAD band after a Short signal.
  • RISK-OFF Short: When the price moves back above the lower AAD band.


Highlighted areas on the chart representing RISK-ON and RISK-OFF zones for both Long and Short positions.
快照

A chart showing the filled areas corresponding to trend directions and RISK-ON zones
快照


Backtesting and Performance Metrics

While the AadTrend indicator focuses on generating signals and highlighting risk areas, it can be integrated with backtesting frameworks to evaluate performance over historical data.

Integration with Backtest Library:


快照


Customization and Calibration

1. Importance of Calibration
  • Default Settings Are Experimental: The default parameters are not optimized for any specific market condition or asset.
  • User Calibration: Traders should adjust the length, aad_mult, and avg_type parameters to align the indicator with their trading strategy and the characteristics of the asset being analyzed.

2. Factors to Consider
  • Market Volatility: Higher volatility may require adjustments to the aad_mult to avoid false signals.
  • Trading Style: Short-term traders might prefer faster-moving averages like EMA or HMA, while long-term traders might opt for SMA or FRAMA.



Alerts and Notifications

The AadTrend indicator includes built-in alert conditions to notify traders of significant market events:

Long and Short Alerts:


RISK-ON and RISK-OFF Alerts:



Important Notes and Disclaimer

  • Experimental Nature: The AadTrend indicator is experimental and should be used with caution.
  • No Guaranteed Performance: Past performance is not indicative of future results. Backtesting results may not reflect real trading conditions.
  • User Responsibility: Traders and investors should thoroughly test and calibrate the indicator settings before applying it to live trading.
  • Risk Management: Always use proper risk management techniques, including stop-loss orders and position sizing.

Moving AveragesstatisticsTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明