Colored SMA by Time & TrendScalping script for XAUUSD this indicator checks times in which there is a usual uptrend or downtrend for this instrument. When green, a buy is likely to be profitable (at least for a few bars) and when red, a sell is likely to be profitable (for the next few bars).
Analisi trend
S&P 500 Bear Markets and CorrectionsS&P 500 Corrections and Bear Markets (pullbacks/crashes) from 1970 to 2025 (May).
You are always welcome to reach out with feedback :-)
Best - Nicolai
Peak Pulse ReversalPeak Pulse Reversal is a clean and accurate indicator designed to detect price exhaustion zones.
It uses a combination of internal logic to identify high-probability reversal points — both at tops and bottoms.
📈 Ideal for swing and intraday traders
🔍 Highlights overbought/oversold extremes with signal arrows
🧠 Combines multiple hidden tools under a simplified interface
🔎 Among the signals generated by the indicator, purple and orange signals represent moments where multiple internal indicators confirm an overbought or oversold condition simultaneously.
These signals often form at stronger exhaustion points and indicate a higher probability of reversal.
💡 Therefore, purple and orange signals are considered high-confidence zones.
🔐 Manual access only. Contact @traderpango for access
Unified ATR Zones### 🧠 **Purpose of the Script**
This indicator draws **ATR-based support and resistance levels** directly on the price chart (overlay). It's a clean and minimal visualization of current volatility zones derived from the **ATR (Average True Range)**.
---
### ⚙️ **1. User Inputs**
```pinescript
atr_length = input.int(14, "ATR Period", minval=1)
smoothing = input.string("RMA", "Smoothing", options= )
use_prev_close = input(false, "Use Previous Close")
```
* `atr_length`: The number of bars to calculate the ATR (default 14).
* `smoothing`: Type of moving average used to smooth the ATR.
* `use_prev_close`: If true, use the previous close (`close `) as the base level. If false, use the current close.
---
### 📐 **2. ATR Calculation**
```pinescript
true_range = ta.tr(true)
atr_value = ma_function(true_range, atr_length)
```
* `true_range`: Measures the maximum of:
* High - Low
* High - Previous Close
* Low - Previous Close
* `atr_value`: Smoothed version of `true_range` using the selected MA type.
---
### 📏 **3. Base Level**
```pinescript
base_level = use_prev_close ? close : close
```
* This is the price reference point for plotting zones:
* Can be today's close or yesterday’s close, based on user input.
---
### 🧱 **4. Zone Plotting**
```pinescript
plot(base_level, "Base", color=color.gray, linewidth=1)
plot(base_level + atr_value, "1 ATR Long", color=color.green)
plot(base_level + atr_value * 1.5, "1.5 ATR Long", color=color.blue)
plot(base_level - atr_value, "1 ATR Short", color=color.red)
plot(base_level - atr_value * 1.5, "1.5 ATR Short", color=color.maroon)
```
* **Base level** is plotted in gray.
* **+1 ATR and +1.5 ATR levels** are shown above as resistance or targets (green/blue).
* **–1 ATR and –1.5 ATR levels** are plotted below as support or potential reversal zones (red/maroon).
---
### 📋 **5. Info Panel**
```pinescript
var table info_table = table.new(position.top_right, 2, 1)
table.cell(info_table, 0, 0, "ATR: " + str.tostring(atr_value, "#.##"), bgcolor=color.new(color.gray, 90))
```
* A small **table in the top-right corner** shows the current ATR value.
* Background is semi-transparent gray for a clean look.
---
### ✅ **Use Case**
This script is useful for:
* Visualizing real-time **volatility zones**.
* Planning entries/exits or managing risk based on market volatility.
* Identifying breakout or retracement opportunities at dynamic ATR-based levels.
---
Would you like to add **alerts** when price touches any of these zones, or include more zone levels (e.g. 0.5 ATR)?
ATR Zone Levels Pro### 🧠 **Purpose of the Script**
The script calculates **dynamic support/resistance levels** above and below a base price using the **ATR (Average True Range)**. These "zones" help traders identify potential areas of price reaction, entries, or stop placement based on current market volatility.
---
### ⚙️ **1. User Inputs**
```pinescript
show_long = input(true, "Show Long Levels")
show_short = input(true, "Show Short Levels")
use_close_price = input(true, "Use Close Price")
atr_length = input.int(14, "ATR Period", minval=1)
smoothing = input.string("RMA", "Smoothing Type", options= )
```
* `show_long` and `show_short`: Allow toggling visibility of long/short zones.
* `use_close_price`: If true, base level = close price; else, it’s the average of high and low.
* `atr_length`: Number of bars used for ATR calculation.
* `smoothing`: Type of smoothing applied to the ATR.
---
### 📐 **2. ATR Calculation with Custom Smoothing**
```pinescript
ma_function(source, length) => ...
true_range = ta.tr(true)
atr = ma_function(true_range, atr_length)
```
* `true_range`: Calculates the true range for each bar.
* `atr`: Applies user-selected smoothing function to the true range to get ATR.
---
### 📏 **3. Base Level Calculation**
```pinescript
base_level = use_close_price ? close : (high + low) / 2
```
* Defines the **base price level** for the zones:
* `close` if selected, otherwise midpoint of high and low.
---
### 🔢 **4. Calculating Zone Levels**
```pinescript
array.push(long_levels, base_level + atr * 0.3) ...
array.push(short_levels, base_level - atr * 0.3) ...
```
* Creates arrays of levels spaced at multipliers of ATR (0.3x, 0.5x, 1x, 1.5x).
* `long_levels` are above the base level (for breakout or continuation).
* `short_levels` are below (for breakdown or reversal).
---
### 🖼️ **5. Plotting Levels**
```pinescript
plot(show_long ? array.get(long_levels, 1) : na, ...)
```
* Each level is plotted with distinct colors.
* If `show_long` or `show_short` is disabled, the corresponding lines are hidden.
---
### 📋 **6. Info Table (Top Right Corner)**
```pinescript
var table info_table = table.new(position.top_right, 2, 5)
```
* Displays:
* Current ATR value
* Main Long/Short zone level (1 ATR above/below base)
* Chosen smoothing type
* Current base price
---
### 🏷️ **7. Info Label on Chart**
```pinescript
label.new(bar_index, base_level, ...)
```
* Shows a label near the base price on the last bar with:
* Base level
* ATR value
* Old label is deleted on each bar to keep only one active label.
---
### ✅ **Use Case**
This indicator is ideal for:
* Determining dynamic **support/resistance levels**
* Planning entries/exits based on volatility zones
* Structuring trades with ATR-based risk zones (e.g. 1.5x ATR stops)
---
Would you like me to add **alerts** when price reaches these zones or crosses them?
ATR Momentum Pro### 🧠 **Purpose of the Script**
This indicator visualizes the **momentum of volatility** by calculating the difference between the current ATR (Average True Range) and its moving average. It helps detect periods when market volatility is accelerating or decelerating.
---
### ⚙️ **1. User Inputs**
```pinescript
atr_length = input.int(14, "ATR Period", minval=1, maxval=100)
ma_length = input.int(20, "MA Period", minval=1, maxval=50)
ma_type = input.string("SMA", "MA Type", options= )
```
* `atr_length`: Number of periods used to calculate ATR (default is 14).
* `ma_length`: Number of periods for smoothing the ATR.
* `ma_type`: Type of Moving Average to use for smoothing (SMA, EMA, RMA, or WMA).
---
### 📈 **2. Calculations**
```pinescript
atr = ta.atr(atr_length)
```
* Calculates the standard **ATR**, which measures market volatility using high, low, and close prices.
```pinescript
ma_value = switch ma_type
"SMA" => ta.sma(atr, ma_length)
"EMA" => ta.ema(atr, ma_length)
"RMA" => ta.rma(atr, ma_length)
"WMA" => ta.wma(atr, ma_length)
```
* Applies the selected Moving Average to the ATR to smooth it.
```pinescript
oscillator = atr - ma_value
```
* Calculates the **ATR Momentum Oscillator**:
* Positive values: volatility is increasing.
* Negative values: volatility is decreasing.
---
### 📊 **3. Oscillator Plot**
```pinescript
plot(oscillator, "ATR Momentum", color=color.new(color.blue, 0), style=plot.style_histogram)
```
* Plots the oscillator as a **blue histogram** in a separate pane below the chart.
---
### 🏷️ **4. Informational Label**
```pinescript
var label lbl = label.new(bar_index, na, "", style=label.style_label_center)
if barstate.islast
label.set_xy(lbl, bar_index, ta.highest(high, 10) )
label.set_text(lbl,
"ATR: " + str.tostring(atr, "#.##") +
" MA(" + str.tostring(ma_length) + "): " + str.tostring(ma_value, "#.##") +
" Momentum: " + str.tostring(oscillator, "#.##"))
label.set_color(lbl, oscillator > 0 ? color.green : color.red)
```
* Creates a **single label** that updates only on the **latest bar**.
* The label shows:
* Current ATR
* ATR moving average
* Momentum (difference between the two)
* Label color:
* **Green** if momentum > 0
* **Red** if momentum < 0
* The label is positioned just above the price (highest high of the last 10 bars, offset by 1 bar).
---
### ✅ **Use Case**
This indicator is useful for:
* Spotting increases or decreases in market volatility
* Confirming breakout strength
* Filtering trades based on volatility momentum
---
Would you like me to add **buy/sell signals** when the oscillator crosses above or below zero?
ORB Advanced Cloud Indicator & FIB's by TenAMTraderSummary: ORB Advanced Cloud Indicator with Alerts and Fibonacci Retracement Targets by TenAMTrader
This TradingView script is an advanced version of the Opening Range Breakout (ORB) indicator, enhanced with visual clouds and Fibonacci retracement/extension levels. It is designed to help traders identify key price levels and track price movements relative to those levels throughout the trading day. The script includes alert functionalities to notify traders when price crosses key levels and when Fibonacci levels are reached, which can serve as potential entry and exit targets.
Key Features:
Primary and Secondary Range Calculation:
The indicator calculates the primary range (defined by a start and end time) and optionally, a secondary range.
The primary range includes the highest and lowest prices during the designated time period, as well as the midpoint of this range.
The secondary range (if enabled) tracks another price range during a second time period, with its own high, low, and midpoint.
Visual Clouds:
The script draws colored clouds between the high, midpoint, and low of the opening range.
The upper cloud spans between the Opening High and Midpoint, while the lower cloud spans between the Midpoint and Opening Low.
Similarly, a second set of clouds can be drawn for the secondary range (if enabled).
Fibonacci Levels:
The script calculates Fibonacci retracement and extension levels based on the primary range (the difference between the Opening High and Opening Low).
Fibonacci levels can be used as entry and exit targets in a trading strategy, as these levels often act as potential support/resistance zones.
Fibonacci levels include standard values like -0.236, -0.382, -0.618, and positive extensions like 1.236, 1.618, etc.
Customizable Alerts:
Alerts can be set to trigger when:
The price crosses above the Opening High.
The price crosses below the Opening Low.
The price crosses the Opening Midpoint.
These alerts can help traders act quickly on important price movements relative to the opening range.
Customization Options:
The indicator allows users to adjust the time settings for both the primary and secondary ranges.
Custom colors can be set for the lines, clouds, and Fibonacci levels.
The visibility of each line and cloud can be toggled on or off, giving users flexibility in how the chart is displayed.
Fibonacci Levels Overview:
The script includes several Fibonacci retracement and extension levels:
Negative Retracements (e.g., -0.236, -0.382, -0.50, -0.618, etc.) are plotted below the Opening Low, and can act as potential support levels in a downtrend.
Positive Extensions (e.g., 1.236, 1.382, 1.618, 2.0, etc.) are plotted above the Opening High, and can act as potential resistance levels in an uptrend.
Fib levels can be used as entry and exit targets to capitalize on price reversals or breakouts.
Safety Warning:
This script is for educational and informational purposes only and is not intended as financial advice. While it provides valuable technical information about price ranges and Fibonacci levels, trading always involves risk. Users are encouraged to:
Paper trade or use a demo account before applying this indicator with real capital.
Use proper risk management strategies, including stop-loss orders, to protect against unexpected market movements.
Understand that no trading strategy, indicator, or tool can guarantee profits, and losses can occur.
Important: The creator, TenAMTrader, and TradingView are not responsible for any financial losses resulting from the use of this script. Always trade responsibly, and ensure you fully understand the risks involved in any trading strategy.
seekho roj kamao trendline indicatorThe Auto Trendline Indicator is a powerful technical analysis tool designed to automatically detect and plot dynamic trendlines based on recent price action. Using pivot-based logic, it identifies significant swing highs and lows and connects them to draw trendlines that visually represent market trends and potential support or resistance areas. The indicator continuously scans the chart for new pivots, updating trendlines in real-time to reflect the latest market structure. This helps traders quickly identify the direction and strength of a trend without manually drawing lines.
The trendlines offer a visual framework for traders to plan entries, exits, and risk management strategies. When price approaches these levels, it often signals a critical point of interest where breakouts, bounces, or reversals may occur. Because it reacts to actual price pivots, the indicator remains responsive to changing market conditions, making it suitable for trending and consolidating markets alike.
Ideal for traders of all levels, this indicator simplifies chart analysis by automating a traditionally manual process. It enhances decision-making by reducing subjectivity and providing clear visual cues. Whether used standalone or in conjunction with other tools, the Auto Trendline Indicator is a reliable assistant for mapping out price structure and market momentum.
Seekho roj kamaoVery accurate buy and sell entries.This custom trading indicator delivers powerful market insights by combining price action, volume trends, and momentum shifts. Designed for precision, it identifies high-probability entry and exit points, minimizing noise and maximizing clarity. Whether you're day trading or swing trading, it enhances decision-making and adapts seamlessly to various market conditions
[blackcat] L3 Twin Range Filter ProOVERVIEW
The L3 Twin Range Filter Pro indicator enhances trading strategies by filtering out market noise through a sophisticated dual-range approach. Unlike previous versions, this script not only provides clear visual indications of buy/sell signals but also incorporates a dynamic trend range filter line. By averaging two smoothed exponential moving averages—one fast and one slow—the indicator generates upper and lower range boundaries that adapt to changing market conditions. Traders can easily spot buy/sell opportunities when the closing price crosses these boundaries, supported by configurable alerts for real-time notifications.
FEATURES
Dual-Range Calculation: Combines fast and slow moving averages to create adaptive range boundaries.
Customizable Parameters:
Periods: Adjustable lengths for fast (default 9 bars) and slow (default 34 bars) moving averages.
Multipliers: Coefficients to modify the distance of the trailing lines from the price.
Dynamic Trend Range Filter Line: Visually displays buy/sell signals directly on the chart.
Trailing Stop Loss Logic: Automatically follows price movements to act as a trailing stop loss indicator.
Trade Signals: Clearly indicates buy/sell points with labeled signals.
Alerts: Configurable notifications for buy/sell signals to keep traders informed.
Visual Enhancements: Colored fills and dynamic boundary lines for easy interpretation.
HOW TO USE
Add the L3 Twin Range Filter Pro indicator to your TradingView chart.
Customize the input parameters:
Price Source: Choose the desired price source (e.g., Close).
Show Trade Signals: Toggle on/off for displaying buy/sell labels.
Fast Period: Set the period for the fast moving average (default 9 bars).
Slow Period: Set the period for the slow moving average (default 34 bars).
Fast Range Multiplier: Adjust the multiplier for the fast moving average.
Slow Range Multiplier: Adjust the multiplier for the slow moving average.
Monitor the plotted trend range filter and dynamic boundaries on the chart.
Identify buy/sell signals based on the crossing of price and range boundaries.
Configure alerts for real-time notifications when signals are triggered.
TRADE LOGIC
BUY Signal: Triggered when the price is higher than or equal to the upper range level. The indicator line will trail just below the price, acting as a trailing stop loss.
SELL Signal: Triggered when the price is lower than or equal to the lower range level. The indicator line will trail just above the price, serving as a trailing stop loss.
LIMITATIONS
The performance of this indicator relies on the selected periods and multipliers.
Market volatility can impact the accuracy of the signals.
Always complement this indicator with other analytical tools for robust decision-making.
NOTES
Experiment with different parameter settings to optimize the indicator for various market conditions.
Thoroughly backtest the indicator using historical data to ensure its compatibility with your trading strategy.
THANKS
A big thank you to Colin McKee for his foundational work on the Twin Range Filter! Your contributions have paved the way for enhanced trading tools. 🙏📈🔍
Heikin Ashi Colored Regular OHLC CandlesHeikin Ashi Colored Regular OHLC Candles
In the world of trading, Heikin Ashi candles are a popular tool for smoothing out price action and identifying trends more clearly. However, Heikin Ashi candles do not reflect the actual open, high, low, and close prices of a market. They are calculated values that change the chart’s structure. This can make it harder to see precise price levels or use standard price-based tools effectively.
To get the best of both worlds, we can apply the color logic of Heikin Ashi candles to regular OHLC candles. This means we keep the true market data, but show the trend visually in the same smooth way Heikin Ashi candles do.
Why use this approach
Heikin Ashi color logic filters out noise and helps provide a clearer view of the current trend direction. Since we are still plotting real OHLC candles, we do not lose important price information such as actual highs, lows, or closing prices. This method offers a hybrid view that combines the accuracy of real price levels with the visual benefits of Heikin Ashi trend coloring. It also helps maintain visual consistency for traders who are used to Heikin Ashi signals but want to see real price action.
Advantages for scalping
Scalping requires fast decisions. Even small price noise can lead to hesitation or bad entries. Coloring regular candles based on Heikin Ashi direction helps reduce that noise and makes short-term trends easier to read. It allows for faster confirmation of momentum without switching away from real prices. Since the candles are not modified, scalpers can still place tight stop-losses and targets based on actual price structure. This approach also avoids clutter, keeping the chart clean and focused.
How it works
We calculate the Heikin Ashi values in the background. If the Heikin Ashi close is higher than the Heikin Ashi open, the trend is considered bullish and the candle is colored green. If the close is lower than the open, it is bearish and the candle is red. If they are equal, the candle is gray or neutral. We then use these colors to paint the real OHLC candles, which are unchanged in shape or position.
Fair Value Gap Retest DetectorFair Value Gaps (FVGs) represent price inefficiencies where buying and selling volumes are imbalanced, creating gaps between the wicks of consecutive candles. These gaps often act as magnets for price, as markets tend to "fill" these gaps before resuming their trend.
FVGs can signal potential entry or exit points, making them a valuable tool for traders looking to exploit these price inefficiencies.
Burr ORB RSIRSI To monitor overbought or oversold conditions. Prevents staying in a trade when price is likely to reverse.
Burr ORB MomentumShows momentum in seperate pane. Useful when trading ORB breakout to determine strength of trend and probability of continuation or reversal.
Burr Orb VolumeVolume Histogram used to confirm strong Breakouts of the ORB. Highlights Volume Spikes for added confirmation.
Burr ORBMarks the ORB on desired timeframe. Also marks the previous days High and Low for reference during Session
Kijun-Sen Filter for ScalpingThis is designed to assist lower time framed trading strategies with general trend sentiment. The baseline indicator used in this script is the trust Kijun-Sen. The baseline is best to be used on the daily timeframe however you can select whichever you prefer the same applies to the period as well.
You will see a table in the top right of the screen letting you know the trend direction.
Bullish
Bearish
Vortex SMA StrategyThere are two components to this script:
- Vortex Indicator (This will signal the long and short entries)
- SMA (This acts as a filter when price is above the SMA it only signals longs, when the price is below the SMA it only signals shorts)
Examples of longs and shorts
It's best to use a volume indicator paired with this to further filter losing trades.
If you have any ideas send me a message please!
Marubozu + Clean Wick Edge (Toggleable)📊 Marubozu + Wickless Edge Highlighter (w/ Toggles & Alerts)
This indicator identifies and visually highlights strong momentum candles using a combination of classic candlestick logic and precision wick analysis:
🔹 Features:
✅ Bullish Marubozu (green): Candles that open near their low and close near their high, indicating strong buying pressure
✅ Bearish Marubozu (red): Candles that open near their high and close near their low, signaling aggressive selling
🟪 Wickless Edge Candles (purple): Any candle with a flat top or bottom (no wick on at least one end), often representing clean institutional activity or high conviction
🛠️ Fully Customizable:
Toggle each candle type on/off (Bullish, Bearish, Wickless)
Adjust detection tolerances for wick length precision
Color-coded bars for easy visual scanning
🔔 Built-In Alerts:
Receive alerts the moment a Bullish or Bearish Marubozu prints
📈 Ideal For:
Momentum traders
Breakout or breakdown entries
Spotting institutional-style candles with clean conviction
FVG Alerts (Vortus)Fair Value Gaps (FVGs) represent price inefficiencies where buying and selling volumes are imbalanced, creating gaps between the wicks of consecutive candles. These gaps often act as magnets for price, as markets tend to "fill" these gaps before resuming their trend.
FVGs can signal potential entry or exit points, making them a valuable tool for traders looking to exploit these price inefficiencies.
Volume Peak Bars 3.0Indicator highlights the range starting at the highest volume bar. Customizable to your desired time frame. High volume bars tend to give good levels of liquidity ie. Support/Resistance. This indicator follows the same idea as Opening Range Breakout theories - Break Outs of this area with retests or entries into this range tend to give good trade ideas.
ConeCastConeCast is a forward-looking projection indicator that visualizes a future price range (or "cone") based on recent trend momentum and adaptive volatility. Unlike lagging bands or reactive channels, this tool plots a predictive zone 3–50 bars ahead, allowing traders to anticipate potential price behavior rather than merely react to it.
How It Works
The core of ConeCast is a dynamic trend-slope engine derived from a Linear Regression line fitted over a user-defined lookback window. The slope of this trend is projected forward, and the cone’s width adapts based on real-time market volatility. In calm markets, the cone is narrow and focused. In volatile regimes, it expands proportionally, using an ATR-based % of price to scale.
Key Features
📈 Predictive Cone Zone: Visualizes a forward range using trend slope × volatility width.
🔄 Auto-Adaptive Volatility Scaling: Expands or contracts based on market quiet/chaotic states.
📊 Regime Detection: Identifies Bull, Bear, or Neutral states using a tunable slope threshold.
🧭 Multi-Timeframe Compatible: Slope and volatility can be calculated from higher timeframes.
🔔 Smart Alerts: Detects price entering the cone, and signals trend regime changes in real time.
🖼️ Clean Visual Output: Optionally includes outer cones, trend-trail marker, and dashboard label.
How to Use It
Use on 15m–4H charts for best forward visibility.
Look for price entering the cone as a potential trend continuation setup.
Monitor regime changes and volatility expansion to filter choppy market zones.
Tune the slope sensitivity and ATR multiplier to match your symbol's behavior.
Use outer cones to anticipate aggressive swings and wick traps.
What Makes It Unique
ConeCast doesn’t follow price — it predicts a possible future price envelope using trend + volatility math, without relying on lagging indicators or repainting logic. It's a hybrid of regression-based forecasting and dynamic risk zoning, designed for swing traders, scalpers, and algo developers alike.
Limitations
ConeCast projects based on current trend and volatility — it does not "know" future price. Like all projection tools, accuracy depends on trend persistence and market conditions. Use this in combination with confirmation signals and risk management.
MA Crossover with Adaptive Trend Strength📘 MA Crossover with Adaptive Trend Strength —
📌 Overview
This TradingView indicator plots two moving averages (Fast & Slow) with user-selected types (T3, EMA, SMA, HMA), visual crossovers, and dynamically calculates an adaptive trend strength score using Z-scores of multiple features. Optional higher timeframe (HTF) confirmation is supported. A color-filled region between the MAs visually indicates momentum direction.
⚙️ Inputs & Controls
📈 Moving Average Settings
Fast MA Length: Length of the fast-moving average (default: 9).
Slow MA Length: Length of the slow-moving average (default: 21).
MA Type: Type of moving average used (T3, EMA, SMA, HMA).
Source: Input data source (default: close).
T3 Volume Factor: Only used when T3 is selected, controls smoothing (range: 0–1).
🎨 Visual Controls
Bullish Fill Color: Fill color when Fast MA is above Slow MA.
Bearish Fill Color: Fill color when Fast MA is below Slow MA.
Show Gradient Fill: Enable or disable the colored area between Fast & Slow MAs.
Trend Label Position: Choose where the trend strength label appears (top or bottom).
Label Update Interval: Number of bars between label updates (reduces clutter).
⏱ Multi-Timeframe Support
Higher Timeframe: Timeframe used for confirmation (default: 60 min).
Use HTF Confirmation: Enables filtering of trend score by higher timeframe trend direction.
📊 Lookback Configuration
Auto Lookback Based on Timeframe: Dynamically adapts scoring lookback period per chart timeframe.
Manual Lookback: Manual fallback lookback length when auto is off.
🧮 MA Calculation Options
T3 MA: Custom T3 function with exponential moving averages and volume factor.
EMA/SMA: Built-in Pine functions (ta.ema, ta.sma).
HMA: Hull Moving Average using WMA calculations.
📉 Trend Strength Calculation
🧠 Z-Score Inputs
Distance between MAs (zDist)
Slope of the Fast MA (zSlope)
Volume (zVol)
ATR (zATR)
📏 Choppiness & Adaptive Weighting
A Choppiness Index (based on ATR & price range) reduces score impact in sideways markets.
Dynamically adjusts Z-score weights:
W1: Distance
W2: Slope
W3: Volume
W4: ATR
🔁 HTF Confirmation
Optionally multiplies the trend score by the direction of the higher timeframe trend to filter noise.
🟩 Plot & Visual Elements
📊 MA Lines
Plots Fast and Slow MA lines in colors based on selected MA type.
🌈 Gradient Fill
Fills the area between Fast and Slow MAs with opacity proportional to their difference.
Colors based on bullish/bearish condition.
🏷️ Trend Strength Label
Updates every n bars (Label Update Interval).
Shows:
Trend Classification: Weak, Moderate, Strong
Numerical Score
Label position (top or bottom) is configurable.
🔔 Crossover Signals
Bullish Crossover ("B"): Fast MA crosses above Slow MA.
Bearish Crossover ("S"): Fast MA crosses below Slow MA.
Labels are plotted at crossover points.
Old labels are removed after a threshold (100) to reduce chart clutter.
📋 Score Summary Table
A table showing:
Max Score within the lookback period
Min Score
HTF Confirmation Status (ON / OFF)
Updates on the same user-defined interval as the trend label.
🚨 Alerts
Condition Description
Bullish MA Cross Fast MA crosses above Slow MA
Bearish MA Cross Fast MA crosses below Slow MA
These are provided via alertcondition() for use in alert creation.
📌 Customization Tips
Turn off the gradient fill for a cleaner chart.
Use HTF confirmation to reduce false positives in ranging markets.
Adjust label update frequency to prevent visual clutter on faster timeframes.
Use T3 MA with volume factor for smoother signals in volatile markets.