Trend Volatility State Engine [Pineify]

3 446
Overview
Trend Volatility State Engine keeps direction and volatility on separate axes. Spine, ATR-percentile envelope, quadrants, and age rail describe structure, movement scale, regime, and persistence without forecasting.

Problem Definition
A trend label cannot separate orderly drift from unstable expansion; volatility alone cannot show whether wide ranges retain direction. Raw slope and ATR thresholds also vary by instrument. Equal trend readings can occur at unlike volatility levels, while equal ATR can represent efficient travel or balanced noise. A blended score hides which input changed, so this indicator preserves both dimensions.

Design Rationale
Direction uses regression slope normalized by ATR to remove price-scale dependence. Endpoint displacement divided by total close travel reduces the score when a fitted line masks reversals; disagreement between fitted and endpoint direction adds a penalty. Volatility is the percentile rank of ATR as a percentage of price, replacing a universal cutoff with a relative comparison. Entry/release hysteresis explains persistence but delays exits.

Key Features
  • Signed strength joins normalized slope, path efficiency, and direction agreement.
  • ATR percentile remains an independent axis.
  • Confirmed hysteresis creates four states and age.
  • Optional layers encode separate facts.


How It Works
ATR divided by absolute price is ranked inside the selected history; 100 means high relative to that sample. After both windows warm up, adjacent regression estimates produce slope. Slope times window span divided by ATR becomes volatility-unit displacement, then a bounded transform limits extremes. Endpoint displacement divided by summed close travel supplies path efficiency. Bounded slope is weighted by efficiency, with lower weight when slope and endpoint directions disagree.

On confirmed bars, one latch enters trend mode above its entry threshold and exits below its release threshold. A second latch applies the rule to high ATR percentile. Their combinations are Quiet Balance, Quiet Trend, Volatile Balance, and Volatile Trend. Age resets on change, then increments. Spine shows strength, gold envelope shows percentile, background shows state, and the floor rail shows capped age. Spine and envelope can move on an open bar, while state, age, markers, and alerts wait for close.

How Multiple Indicators Work Together
Regression supplies direction but misses an inefficient zigzag. Path efficiency supplies quality but lacks volatility context. ATR normalization makes slope relative to recent movement; ATR percentile locates that movement in history. Hysteresis converts both axes into states. Omitting one link either overstates noise, removes direction or context, or causes chatter.

Trading Ideas and Insights
Use the engine as context, not a trade command. Quiet Trend describes controlled travel; Volatile Trend adds wider movement. Volatile Balance marks large movement without retained direction; Quiet Balance marks restrained, inefficient travel. A change can prompt review of risk and setup assumptions. Age measures persistence, not continuation probability.

Unique Aspects
The contribution is an orthogonal state engine, not a moving average recolored by ATR. Signed regression pressure and relative volatility stay independent, while efficiency and agreement govern trend evidence. Two confirmed latches create an auditable quadrant history plus age. Visual roles follow the model: direction uses the spine, volatility the envelope, quadrant the background, and persistence the rail.

How to Use
Begin with defaults and observe complete rank windows. Read spine sign and distance from zero, then envelope width and quadrant. Markers show close-confirmed changes. The dashboard reveals whether trend evidence includes path efficiency or mainly fitted slope. Match settings and alerts to the symbol and timeframe.

Customization
Trend Window controls regression and efficiency; shorter values react faster but admit local reversals. ATR Length sets the movement unit. Rank Lookback sets the comparison sample; shorter samples adapt faster but make ranks less stable. Entry thresholds demand evidence; release thresholds control tolerated weakening, with enforced separation if they conflict. Duration Alert Bars sets the event; Display Scale changes only the rail. Visual switches do not alter logic.

Assumptions and Limitations
The model needs meaningful OHLC data and sufficient history. ATR percentile is relative to symbol, timeframe, feed, and lookback, not universal risk. Regression can lag turns; close-path efficiency ignores intrabar sequence; gaps can dominate both. The agreement penalty is a design rule, not probability. Hysteresis reduces chatter but delays exits. Raw values can change on the open bar; states and events are confirmed. Context changes recalculate windows. Future bars are not used, but open values are not fixed. Liquidity, volume, costs, fundamentals, expected return, and trade suitability are outside scope.

Conclusion
The engine separates direction quality, relative volatility, confirmed regime, and persistence so each claim stays inspectable. Use the quadrants as descriptive context and keep risk and execution decisions outside the indicator.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.