OPEN-SOURCE SCRIPT
已更新

Simple Trend Indicator (Heikin-Ashi) | Lyro RS

1 267
Simple Trend Indicator (Heikin-Ashi)
A momentum oscillator using Heikin-Ashi smoothed data to filter trend direction with zero-line crosses.

This indicator calculates the normalized deviation of Heikin-Ashi OHLC values from their Simple Moving Average (SMA), then averages these deviations into a single oscillator. It simplifies trend detection by:

Reducing noise via Heikin-Ashi smoothing.
Highlighting momentum shifts through a zero-line cross system (bullish/bearish).
Providing clear visual signals with color-coded plots and directional dots.

Originality:
Unlike standard momentum oscillators, this tool uniquely combines:
Heikin-Ashi normalization for cleaner trend analysis.
Multi-component averaging (high, open, low, close) to balance sensitivity.
Minimalist design for clutter-free charting.

How It Works:
Data Input: Fetches Heikin-Ashi OHLC values using request.security().

Momentum Calculation: For each Heikin-Ashi component:
Computes % deviation from its SMA: (value − SMA(value, length)) / SMA(value, length) * 100.
Oscillator: Averages deviations of all four components into one line (sum).

Signals:
Bullish: Oscillator > 0 (green).
Bearish: Oscillator < 0 (red).

Cross Confirmation: Dots (⦿) mark zero-line crosses.

Usage:
Trend Following: Enter long/short on sustained oscillator breaks above/below zero.
Reversal Watch: Zero-line crosses may hint at weakening momentum.

Filter: Combine with volume or support/resistance levels.


⚠️Disclaimer: This indicator is a tool for technical analysis and does not provide guaranteed results. It should be used in conjunction with other analysis methods and proper risk management practices. The creators of this indicator are not responsible for any financial decisions made based on its signals.
版本注释
small fix.
版本注释
update: added HA Candles, changed default value to 14 --> 50, added a input to switch between classic mode, and the ha candle plotting.

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。