OPEN-SOURCE SCRIPT

TrigWave Suite [InvestorUnknown]

The TrigWave Suite combines Sine-weighted, Cosine-weighted, and Hyperbolic Tangent moving averages (HTMA) with a Directional Movement System (DMS) and a Relative Strength System (RSS).

Hyperbolic Tangent Moving Average (HTMA)
  • The HTMA smooths the price by applying a hyperbolic tangent transformation to the difference between the price and a simple moving average. It also adjusts this value by multiplying it by a standard deviation to create a more stable signal.




Sine-Weighted Moving Average (SWMA)
  • The SWMA applies sine-based weights to historical prices. This gives more weight to the central data points, making it responsive yet less prone to noise.




Cosine-Weighted Moving Average (CWMA)
  • The CWMA uses cosine-based weights for data points, which produces a more stable trend-following behavior, especially in low-volatility markets.




Directional Movement System (DMS)
  • DMS is used to identify trend direction and strength based on directional movement. It uses ADX to gauge trend strength and combines +DI and -DI for directional bias.




Relative Strength System (RSS)
  • RSS employs RSI and an adjustable moving average type (SMA, EMA, or HMA) to evaluate whether the market is in a bullish or bearish state.




ATR Adjustments
  • To minimize false signals, the HTMA, SWMA, and CWMA signals are adjusted with an Average True Range (ATR) filter:




  • This adjustment allows for better adaptation to varying market volatility, making the signal more reliable.


Signals and Trend Calculation
  • The indicator generates a Trend Signal by aggregating the output from each component. Each component provides a directional signal that is combined to form a unified trend reading. The trend value is then converted into a long (1), short (-1), or neutral (0) state.


Backtesting Mode and Performance Metrics
  • The Backtesting Mode includes a performance metrics table that compares the Buy and Hold strategy with the TrigWave Suite strategy. Key statistics like Sharpe Ratio, Sortino Ratio, and Omega Ratio are displayed to help users assess performance. Note that due to labels and plotchar use, automatic scaling may not function ideally in backtest mode.


Alerts and Visualization
  • Trend Direction Alerts: Set up alerts for long and short signals
  • Color Bars and Gradient Option: Bars are colored based on the trend direction, with an optional gradient for smoother visual feedback.


Important Notes
  • Customization: Default settings are experimental and not intended for trading/investing purposes. Users are encouraged to adjust and calibrate the settings to optimize results according to their trading style.
  • Backtest Results Disclaimer: Please note that backtest results are not indicative of future performance, and no strategy guarantees success.
Moving AveragesstatisticsTrend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항