Volume Profile + Pivot Levels [ChartPrime]⯁ OVERVIEW
Volume Profile + Pivot Levels combines a rolling volume profile with price pivots to surface the most meaningful levels in your selected lookback window. It builds a left-side profile from traded volume, highlights the session’s Point of Control (PoC) , and then filters pivot highs/lows so only those aligned with significant profile volume are promoted to chart levels. Each promoted level extends forward until price retests it—so your chart stays focused on levels that actually matter.
⯁ KEY FEATURES
Rolling Volume Profile (Period & Resolution)
Calculates a profile over the last Period bars (default 200). The profile is discretized into Volume Profile Resolution bins (default 50) between the highest high and lowest low inside the window. Each bin accumulates traded volume and is drawn as a smooth left-side polyline for compact, lightweight rendering.
HL = array.new()
// collect highs/lows over 'start' bars to define profile range
for i = 0 to start - 1
HL.push(high ), HL.push(low )
H = HL.max(), L = HL.min()
bin_size = (H - L) / bins
// accumulate per-bin volume
for i = 0 to bins - 1
for j = 0 to start - 1
if close >= (L + bin_sizei) - bin_size and close < (L + bin_size*(i+1)) + bin_size
Bins += volume
Delta-Aware Coloring
The script tracks up-minus-down volume across all period to compute a net Delta . The profile, PoC line, and PoC label adopt a teal tone when net positive, and maroon when net negative—an immediate read on buyer/seller dominance inside the window.
Point of Control (PoC) + Volume Label
Automatically marks the highest-volume bin as the PoC . A horizontal PoC line extends to the last bar, and a label shows the absolute volume at the PoC. Toggle visibility via PoC input.
Pivot Detection with Volume Filter
Identifies raw pivots using Length (default 10) on both sides of the bar. Each candidate pivot is then validated against the profile: only pivots that land within their bin and meet or exceed the Filter % threshold (percentage of PoC volume) are promoted to chart levels. This removes weak, low-participation pivots.
// pivot promotion when volume% >= pivotFilter
if abs(mid - p.value) <= bin_size and volPercent >= pivotFilter
// draw labeled pivot level
line.new(p.index - pivotLength, p.value, p.index + pivotLength, p.value, width = 2)
Forward-Extending, Self-Stopping Levels
Promoted pivot levels extend forward as dotted rays. As soon as price intersects a level (high/low straddles it), that level stops extending—so your chart doesn’t clutter with stale zones.
Concise Level Labels (Volume + %)
Each promoted pivot prints a compact label at the pivot bar with its bin’s absolute volume and percentage of PoC volume (ordering flips for highs vs. lows for quick read).
Lightweight Visuals
The volume profile is rendered as a smooth polyline rather than dozens of boxes, keeping charts responsive even at higher resolutions.
⯁ SETTINGS
Volume Profile → Period : Lookback window used to compute the profile (max 500).
Volume Profile → Resolution : Number of bins; higher = finer structure.
Volume Profile → PoC : Toggle PoC line and volume label.
Pivots → Display : Show/hide volume-validated pivot levels.
Pivots → Length : Pivot detection left/right bars.
Pivots → Filter % 0–100 : Minimum bin strength (as % of PoC) required to promote a pivot level.
⯁ USAGE
Read PoC direction/color for a quick net-flow bias within your window.
Prioritize promoted pivot levels —they’re backed by meaningful participation.
Watch for first retests of promoted levels; the line will stop extending once tested.
Adjust Period / Resolution to match your timeframe (scalps → higher resolution, shorter period; swings → lower resolution, longer period).
Tighten or loosen Filter % to control how selective the level promotion is.
⯁ WHY IT’S UNIQUE
Instead of plotting every pivot or every profile bar, this tool cross-checks pivots against the profile’s internal volume weighting . You only see levels where price structure and liquidity overlap—clean, data-driven levels that self-retire after interaction, so you can focus on what the market actually defends.
المؤشرات والاستراتيجيات
Wick Pressure Zones [BigBeluga]
The Wick Pressure Zones indicator highlights areas where extreme wick activity occurred, signaling strong buy or sell pressure. By measuring unusually long upper or lower wicks and mapping them into gradient volume zones , the tool helps traders identify levels where liquidity was absorbed, leaving behind footprints of supply and demand imbalances. These zones often act as support, resistance, or liquidity sweep magnets .
🔵 CONCEPTS
Extreme Wicks : Large upper or lower shadows indicate aggressive rejection — upper wicks suggest selling pressure, lower wicks suggest buying pressure.
Volumatic Gradient Zones : From each detected wick, the indicator projects a layered gradient zone, proportional to the wick’s size, showing where most pressure occurred.
Liquidity Footprints : These zones mark levels where significant buy/sell volume was executed, often becoming reaction points on future retests.
Automatic Expiration : Zones persist until price decisively trades through them, after which they are cleared to keep the chart clean.
🔵 FEATURES
Automatic Wick Detection : Identifies extreme upper and lower wick events using percentile filtering and Realative Strength Index.
Gradient Zone Visualization : Builds a 10-layer zone from the wick top/bottom, shading intensity according to pressure strength.
Volume Labels : Each zone is annotated with the bar’s volume at the origin point for added context.
Dynamic Zone Extension : Zones extend to the right as long as they remain relevant; once price closes through them, they are removed.
Support & Resistance Mapping : Upper wick zones (red) behave like supply/resistance, lower wick zones (green) like demand/support.
Clutter Control : Limits the number of active zones (default 10) to keep charts responsive.
Background Highlighting : Optional background shading when new wick zones appear (red for sell, green for buy).
🔵 HOW TO USE
Look for Upper Wick Zones (red) : Indicate strong selling pressure; watch for resistance, reversals, or liquidity sweeps above.
Look for Lower Wick Zones (green) : Indicate strong buying pressure; watch for support or liquidity sweeps below.
Trade Retests : When price returns to a zone, expect a reaction (bounce or rejection) due to leftover liquidity.
Combine with Context : Align wick pressure zones with HTF support/resistance, order blocks, or volume profile for stronger signals.
Use Volume Labels : High-volume wicks indicate more significant liquidity events, making the zone more likely to act as a strong reaction point.
🔵 CONCLUSION
The Wick Pressure Zones is a powerful way to visualize hidden liquidity and aggressive rejections. By mapping extreme wick events into dynamic, volume-annotated zones, it shows traders where the market absorbed heavy buy/sell pressure. These levels frequently act as magnets or turning points, making them valuable for timing entries, stop placement, or fade strategies.
Advanced Pattern Detection System [50+ Patterns]【Advanced Pattern Detection System - Auto-detects 50+ Chart Patterns】
Introducing the most powerful pattern detection indicator for TradingView!
◆ What is this?
An automated tool that finds and displays over 50 chart patterns on your charts. It detects all the patterns professional traders use - Double Tops, Triangles, Head & Shoulders, and more - all in ONE indicator.
◆ Main Features
・Detects 50+ patterns in real-time
・Shows visual explanation of WHY each pattern was identified
・Automatically calculates theoretical target prices
・Displays confidence levels in % (60-95%)
・Choose panel position from 9 locations
・Works on all timeframes (1min to Monthly)
◆ Detectable Patterns
1. Classic Patterns (Double Top/Bottom, Head & Shoulders, etc.)
2. Triangle Patterns (Ascending, Descending, Symmetrical, Expanding)
3. Continuation Patterns (Flags, Pennants, Wedges, etc.)
4. Harmonic Patterns (Gartley, Butterfly, Bat, etc.)
5. Price Action (Pin Bar, Engulfing, Hammer, etc.)
6. Special Patterns (Cup & Handle, V-formations, etc.)
◆ What Makes It Different
・Not just detection - shows the reasoning behind it
・Auto-draws pivot points and necklines
・Displays target prices with % gain/loss from current price
・Detects multiple patterns simultaneously, sorted by confidence
・Available in both Japanese and English versions
◆ Perfect For
✓ Anyone tired of using multiple indicators
✓ Beginners wanting to learn pattern trading
✓ Traders who don't want to miss entry points
✓ Those looking to improve discretionary trading accuracy
◆ How to Use (Easy 3 Steps)
1. Open TradingView and paste code in Pine Editor
2. Click "Add to Chart"
3. Enable only the patterns you need in settings
◆ Color Meanings
Green → Bullish potential (Buy signal)
Red → Bearish potential (Sell signal)
Yellow → Neutral direction (Wait and see)
◆ Recommended Settings
Scalping: Detection period 20, Sensitivity 0.0025
Day Trading: Detection period 50, Sensitivity 0.002
Swing Trading: Detection period 100, Sensitivity 0.0015
◆ Real Trading Example
"Detects Double Bottom → 85% confidence → Enter on neckline break → Take profit at displayed target price"
This is how you can use it in practice.
◆ Important Notes
・This is an analysis tool, not investment advice
・Always combine with other indicators
・Always set stop losses
・Practice on demo account before live trading
◆ Performance
If running slow, turn OFF unused pattern categories. Reducing max display count to 3 also helps.
◆ Summary
This single tool provides functionality that would normally require multiple paid indicators (worth $100-200 total). It's the ultimate pattern detection system recommended for all traders, from beginners to professionals.
Give it a try if interested! Feel free to ask questions in the comments.
Moon Scalper v3 + VSAMoon Scalper v3 is a high-precision scalping indicator optimized for the 15-minute chart. It delivers clean buy/sell signals with TP1 (1:1 risk-reward) exits using layered confirmations:
• **Volatility Bands** — SMA + multiplier detect expansion zones
• **EMA Filter (200)** — ensures trades align with trend
• **RSI Range Filter** — avoids extreme overbought/oversold traps (buy: 52–62, sell: 38–48)
• **Volume Spike Filter** — filters for institutional activity (vol > 1.4×SMA)
• **VSA Confirmation** — requires wide-spread, high-volume bars with reclaim (volume × 1.4, spread × 1.5, reclaim 50%)
**Usage Notes:**
Best used on 15m timeframe for liquid pairs (e.g., BTCUSDT, ETHUSDT). Signals appear as “BUY” / “SELL” labels on chart. Defaults yield high TP1 hit rate; use only during active sessions (e.g., London/NY) for best accuracy.
**Disclaimer:**
This indicator is for educational purposes only. Past performance is not a guarantee of future results. Always backtest before live trading and manage risk responsibly.
Trend Fibo 1.618FIBONACCI TRENDLINE BREAKOUT SYSTEM
Advanced indicator combining dynamic trendlines with ZigZag-based Fibonacci projections for precise entry and exit points.
KEY FEATURES:
- Dynamic trendline detection using pivot analysis
- ZigZag-based Fibonacci level calculations
- Multiple take profit targets (1.618, 2.618, 3.618, 4.618)
- Automatic breakout signal generation
- Historical price level visualization
METHODOLOGY:
Detects trendline breakouts and automatically draws Fibonacci retracements/extensions based on recent ZigZag swing points. Provides clear entry zones and multiple profit targets.
USAGE:
Best suited for swing trading on higher timeframes (4H-Daily). Combine with trend analysis for optimal results.
DISCLAIMER: Educational purposes only. Past performance doesn't guarantee future results.
Quantum Edge Scalper - Adaptive Precision Trading [KedArc Quant]Strategy Overview
Quantum Edge Scalper is a multi-regime intraday strategy engineered for adaptability across equities. It fuses EMA trend & slope, RSI sanity checks, ATR-based volatility gating, and candle-shape filters. Regime detection (ATR%% z-score) tunes thresholds on-the-fly, while an optional OSS — Oversold Short Override captures late-session breakdowns. Robust day-level controls include trade caps, cooldowns, and loss-streak stops. A compact panel summarizes live session stats.
Key Features
• Preset modes: Aggressive / Aggressive+ / Conservative / Hybrid / Custom.
• EMA Fast/Slow trend filter + EMA-separation slope gate.
• ATR volatility floor (percent-of-price) to avoid dead markets.
• Candle-shape and wick-ratio filters to curb false breakouts.
• Regime adaptation using ATR% z-score (HIGH / LOW / NEUTRAL).
• Hybrid+ LOW-regime extras: tighter SL, adaptive TP, mid-session pause, loss-streak blocker.
• OSS (Oversold Short Override): validators for micro-pullback, range expansion, structure break, and time window.
• Daily caps & loss-streak protection; cooldown management post wins/losses.
• Clean summary labels + compare panel; optional debug labels.
Algo + Trendlines :: Medium PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
Very important: sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
Usual colored line = 3+ "collision" points (= confirmed)
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos: www.reddit.com
Smart Money Footprint & Cost Basis Engine [AlgoPoint]Smart Money Footprint & Cost Basis Engine
This indicator is a comprehensive market analysis tool designed to identify the "footprints" of Smart Money (institutions, whales) and pinpoint high-probability reaction zones. Instead of relying on lagging averages, this engine analyzes the very structure of the market to find where large players have shown their hand.
How It Works: The Core Logic
The indicator operates on a multi-stage confirmation process to identify and validate Smart Money zones:
Smart Money Detection (The Trigger): The engine first scans the chart for signs of intense, urgent buying or selling. It does this by identifying Fair Value Gaps (FVGs) created by large, high-volume Displacement Candles. This is our initial Point of Interest (POI).
Cost Basis Calculation (The Average Price): Once a potential Smart Money move is detected, the indicator calculates the Volume-Weighted Average Price (VWAP) for that specific move. This gives us a highly accurate estimate of the average price at which the large players entered their positions.
Historical Confirmation (The "Memory"): This is the indicator's most unique feature. It checks its historical database to see if a similar Smart Money move (in the same direction) has occurred in the same price area in the past. If a match is found, the zone's significance is confirmed.
Verified Cost Basis Zone (The Final Output): A zone that passes all the above checks is drawn on the chart as a high-probability Verified Cost Basis Zone. These are the "memory zones" where the market is likely to react upon a re-visit.
How to Use This Indicator
Cost Basis Zones (The Boxes):
Green Boxes: Bullish zones where Smart Money likely accumulated positions. When the price returns here, a BUY reaction is expected.
Red Boxes: Bearish zones where Smart Money likely distributed positions. When the price returns here, a SELL reaction is expected.
Zone Strength (★★★): Each zone is created with a star rating. More stars indicate a higher-confidence zone (based on factors like volume intensity and historical confirmation).
BUY/SELL Signals: A signal is only generated when the price enters a zone AND the confirmation filters (if enabled in the settings) are passed.
Zone Statuses:
Green/Red: Active and waiting to be tested.
Gray: The zone has been tested, and a signal was produced.
Dark Gray (Invalidated): The zone was broken decisively and is no longer considered valid support/resistance.
Key Settings
Signal Accuracy Filters: You can enable/disable three powerful filters to balance signal quantity and quality:
Momentum Confirmation (Stoch): Waits for momentum to align with the zone's direction.
Candlestick Confirmation (Engulfing): Waits for a strong reversal candle inside the zone.
Lower Timeframe MSS Confirmation: The most advanced filter; waits for a trend shift on a lower timeframe before giving a signal.
Historical Confirmation:
Require Historical Confirmation: Toggle the "Memory" feature on/off. Turn it off to see all potential SM zones.
Tolerance Calculation Method: Choose between a dynamic ATR Multiplier (recommended for all-around use) or a fixed Percentage to define the zone size.
RSI Divergence Indicator with Strength and LabelsHere's a complete Pine Script (version 5) for a TradingView indicator that detects and plots bullish and bearish RSI divergences. This is based on a proven method that tracks price and RSI swings while RSI is in oversold/overbought territories, then checks for mismatched highs/lows within a configurable bar distance.
Advanced Range Analyzer ProAdvanced Range Analyzer Pro – Adaptive Range Detection & Breakout Forecasting
Overview
Advanced Range Analyzer Pro is a comprehensive trading tool designed to help traders identify consolidations, evaluate their strength, and forecast potential breakout direction. By combining volatility-adjusted thresholds, volume distribution analysis, and historical breakout behavior, the indicator builds an adaptive framework for navigating sideways price action. Instead of treating ranges as noise, this system transforms them into opportunities for mean reversion or breakout trading.
How It Works
The indicator continuously scans price action to identify active range environments. Ranges are defined by volatility compression, repeated boundary interactions, and clustering of volume near equilibrium. Once detected, the indicator assigns a strength score (0–100), which quantifies how well-defined and compressed the consolidation is.
Breakout probabilities are then calculated by factoring in:
Relative time spent near the upper vs. lower range boundaries
Historical breakout tendencies for similar structures
Volume distribution inside the range
Momentum alignment using auxiliary filters (RSI/MACD)
This creates a live probability forecast that updates as price evolves. The tool also supports range memory, allowing traders to analyze the last completed range after a breakout has occurred. A dynamic strength meter is displayed directly above each consolidation range, providing real-time insight into range compression and breakout potential.
Signals and Breakouts
Advanced Range Analyzer Pro includes a structured set of visual tools to highlight actionable conditions:
Range Zones – Gradient-filled boxes highlight active consolidations.
Strength Meter – A live score displayed in the dashboard quantifies compression.
Breakout Labels – Probability percentages show bias toward bullish or bearish continuation.
Breakout Highlights – When a breakout occurs, the range is marked with directional confirmation.
Dashboard Table – Displays current status, strength, live/last range mode, and probabilities.
These elements update in real time, ensuring that traders always see the current state of consolidation and breakout risk.
Interpretation
Range Strength : High scores (70–100) indicate strong consolidations likely to resolve explosively, while low scores suggest weak or choppy ranges prone to false signals.
Breakout Probability : Directional bias greater than 60% suggests meaningful breakout pressure. Equal probabilities indicate balanced compression, favoring mean-reversion strategies.
Market Context : Ranges aligned with higher timeframe trends often resolve in the dominant direction, while counter-trend ranges may lead to reversals or liquidity sweeps.
Volatility Insight : Tight ranges with low ATR imply imminent expansion; wide ranges signal extended consolidation or distribution phases.
Strategy Integration
Advanced Range Analyzer Pro can be applied across multiple trading styles:
Breakout Trading : Enter on probability shifts above 60% with confirmation of volume or momentum.
Mean Reversion : Trade inside ranges with high strength scores by fading boundaries and targeting equilibrium.
Trend Continuation : Focus on ranges that form mid-trend, anticipating continuation after consolidation.
Liquidity Sweeps : Use failed breakouts at boundaries to capture reversals.
Multi-Timeframe : Apply on higher timeframes to frame market context, then execute on lower timeframes.
Advanced Techniques
Combine with volume profiles to identify areas of institutional positioning within ranges.
Track sequences of strong consolidations for trend development or exhaustion signals.
Use breakout probability shifts in conjunction with order flow or momentum indicators to refine entries.
Monitor expanding/contracting range widths to anticipate volatility cycles.
Custom parameters allow fine-tuning sensitivity for different assets (crypto, forex, equities) and trading styles (scalping, intraday, swing).
Inputs and Customization
Range Detection Sensitivity : Controls how strictly ranges are defined.
Strength Score Settings : Adjust weighting of compression, volume, and breakout memory.
Probability Forecasting : Enable/disable directional bias and thresholds.
Gradient & Fill Options : Customize range visualization colors and opacity.
Dashboard Display : Toggle live vs last range, info table size, and position.
Breakout Highlighting : Choose border/zone emphasis on breakout events.
Why Use Advanced Range Analyzer Pro
This indicator provides a data-driven approach to trading consolidation phases, one of the most common yet underutilized market states. By quantifying range strength, mapping probability forecasts, and visually presenting risk zones, it transforms uncertainty into clarity.
Whether you’re trading breakouts, fading ranges, or mapping higher timeframe context, Advanced Range Analyzer Pro delivers a structured, adaptive framework that integrates seamlessly into multiple strategies.
Crypto Perp Calc v1Advanced Perpetual Position Calculator for TradingView
Description
A comprehensive position sizing and risk management tool designed specifically for perpetual futures trading. This indicator eliminates the confusion of calculating leveraged positions by providing real-time position metrics directly on your chart.
Key Features:
Interactive Price Selection: Click directly on chart to set entry, stop loss, and take profit levels
Accurate Lot Size Calculation: Instantly calculates the exact position size needed for your margin and leverage
Multiple Entry Support: DCA into positions with up to 3 entry points with customizable allocation
Multiple Take Profit Levels: Scale out of positions with up to 3 TP targets
Comprehensive Risk Metrics: Shows dollar P&L, account risk percentage, and liquidation price
Visual Risk/Reward: Color-coded boxes and lines display your trade setup clearly
Real-time Info Table: All critical position data in one organized panel
Perfect for traders using perpetual futures who need precise position sizing with leverage.
---------
How to Use
Quick Start (3 Clicks)
1. Add the indicator to your chart
2. Click three times when prompted:
First click: Set your entry price
Second click: Set your stop loss
Third click: Set your take profit
3. Read the TOTAL LOTS value from the info table (highlighted in yellow)
4. Use this lot size in your exchange when placing the trade
Detailed Setup
Step 1: Configure Your Account
Enter your account balance (total USDT in account)
Set your margin amount (how much USDT to risk on this trade)
Choose your leverage (1x to 125x)
Select Long or Short position
Step 2: Set Price Levels
Main levels use interactive clicking (Entry, SL, TP)
For multiple entries or TPs, use the settings panel to manually input prices and percentages
Step 3: Read the Results
The info table shows:
TOTAL LOTS - The position size to enter on your exchange
Margin Used - Your actual capital at risk
Notional - Total position value (margin × leverage)
Max Risk - Dollar amount you'll lose at stop loss
Total Profit - Dollar amount you'll gain at take profit
R:R Ratio - Risk to reward ratio
Account Risk - Percentage of account at risk
Liquidation - Price where position gets liquidated
Step 4: Advanced Features (Optional)
Multiple Entries (DCA):
Enable "Use Multiple Entries"
Set up to 3 entry prices
Allocate percentage for each (must total 100%)
See individual lot sizes for each entry
Multiple Take Profits:
Enable "Use Multiple TPs"
Set up to 3 TP levels
Allocate percentage to close at each level (must total 100%)
View profit at each target
Visual Elements
Blue lines/labels: Entry points
Red lines/labels: Stop loss
Green lines/labels: Take profit targets
Colored boxes: Visual risk (red) and reward (green) zones
Info table: Can be positioned anywhere on screen
Alerts
Set price alerts for:
Entry zones reached
Stop loss approached
Take profit levels hit
Works with TradingView's alert system
Tips for Best Results
Always verify the lot size matches your intended risk
Check the liquidation price stays far from your stop loss
Monitor the account risk percentage (recommended: keep under 2-3%)
Use the warning indicators if risk exceeds margin
For quick trades, use single entry/TP; for complex strategies, use multiple levels
Example Workflow
Find your trade setup using your analysis
Add this indicator and click to set levels
Check risk metrics in the table
Copy the TOTAL LOTS value
Enter this exact position size on your exchange
Set alerts for key levels if desired
This tool bridges the gap between TradingView charting and exchange execution, ensuring your position sizing is always accurate when trading with leverage.
Disclaimer, this was coded with help of AI, double check calculations if they are off.
Market Spiralyst [Hapharmonic]Hello, traders and creators! 👋
Market Spiralyst: Let's change the way we look at analysis, shall we? I've got to admit, I scratched my head on this for weeks, Haha :). What you're seeing is an exploration of what's possible when code meets art on financial charts. I wanted to try blending art with trading, to do something new and break away from the same old boring perspectives. The goal was to create a visual experience that's not just analytical, but also relaxing and aesthetically pleasing.
This work is intended as a guide and a design example for all developers, born from the spirit of learning and a deep love for understanding the Pine Script™ language. I hope it inspires you as much as it challenged me!
🧐 Core Concept: How It Works
Spiralyst is built on two distinct but interconnected engines:
The Generative Art Engine: At its core, this indicator uses a wide range of mathematical formulas—from simple polygons to exotic curves like Torus Knots and Spirographs—to draw beautiful, intricate shapes directly onto your chart. This provides a unique and dynamic visual backdrop for your analysis.
The Market Pulse Engine: This is where analysis meets art. The engine takes real-time data from standard technical indicators (RSI and MACD in this version) and translates their states into a simple, powerful "Pulse Score." This score directly influences the appearance of the "Scatter Points" orbiting the main shape, turning the entire artwork into a living, breathing representation of market momentum.
🎨 Unleash Your Creativity! This Is Your Playground
We've included 25 preset shapes for you... but that's just the starting point !
The real magic happens when you start tweaking the settings yourself. A tiny adjustment can make a familiar shape come alive and transform in ways you never expected.
I'm genuinely excited to see what your imagination can conjure up! If you create a shape you're particularly proud of or one that looks completely unique, I would love to see it. Please feel free to share a screenshot in the comments below. I can't wait to see what you discover! :)
Here's the default shape to get you started:
The Dynamic Scatter Points: Reading the Pulse
This is where the magic happens! The small points scattered around the main shape are not just decorative; they are the visual representation of the Market Pulse Score.
The points have two forms:
A small asterisk (`*`): Represents a low or neutral market pulse.
A larger, more prominent circle (`o`): Represents a high, strong market pulse.
Here’s how to read them:
The indicator calculates the Pulse Strength as a percentage (from 0% to 100%) based on the total score from the active indicators (RSI and MACD). This percentage determines the ratio of circles to asterisks.
High Pulse Strength (e.g., 80-100%): Most of the scatter points will transform into large circles (`o`). This indicates that the underlying momentum is strong and It could be an uptrend. It's a visual cue that the market is gaining strength and might be worth paying closer attention to.
Low Pulse Strength (e.g., 0-20%): Most or all of the scatter points will remain as small asterisks (`*`). This suggests weak, neutral, or bearish momentum.
The key takeaway: The more circles you see, the stronger the bullish momentum is according to the active indicators. Watch the artwork "breathe" as the circles appear and disappear with the market's rhythm!
And don't worry about the shape you choose; the scatter points will intelligently adapt and always follow the outer boundary of whatever beautiful form you've selected.
How to Use
Getting started with Spiralyst is simple:
Choose Your Canvas: Start by going into the settings and picking a `Shape` and `Palette` from the "Shape Selection & Palette" group that you find visually appealing. This is your canvas.
Tune Your Engine: Go to the "Market Pulse Engine" settings. Here, you can enable or disable the RSI and MACD scoring engines. Want to see the pulse based only on RSI? Just uncheck the MACD box. You can also fine-tune the parameters for each indicator to match your trading style.
Read the Vibe: Observe the scatter points. Are they mostly small asterisks or are they transforming into large, vibrant circles? Use this visual feedback as a high-level gauge of market momentum.
Check the Dashboard: For a precise breakdown, look at the "Market Pulse Analysis" table on the top-right. It gives you the exact values, scores, and total strength percentage.
Explore & Experiment: Play with the different shapes and color palettes! The core analysis remains the same, but the visual experience can be completely different.
⚙️ Settings & Customization
Spiralyst is designed to be highly customizable.
Shape Selection & Palette: This is your main control panel. Choose from over 25 unique shapes, select a color palette, and adjust the line extension style ( `extend` ) or horizontal position ( `offsetXInput` ).
scatterLabelsInput: This setting controls the total number of points (both asterisks and circles) that orbit the main shape. Think of it as adjusting the density or visual granularity of the market pulse feedback.
The Market Pulse engine will always calculate its strength as a percentage (e.g., 75%). This percentage is then applied to the `scatterLabelsInput` number you've set to determine how many points transform into large circles.
Example: If the Pulse Strength is 75% and you set this to `100` , approximately 75 points will become circles. If you increase it to `200` , approximately 150 points will transform.
A higher number provides a more detailed, high-resolution view of the market pulse, while a lower number offers a cleaner, more minimalist look. Feel free to adjust this to your personal visual preference; the underlying analytical percentage remains the same.
Market Pulse Engine:
`⚙️ RSI Settings` & `⚙️ MACD Settings`: Each indicator has its own group.
Enable Scoring: Use the checkbox at the top of each group to include or exclude that indicator from the Pulse Score calculation. If you only want to use RSI, simply uncheck "Enable MACD Scoring."
Parameters: All standard parameters (Length, Source, Fast/Slow/Signal) are fully adjustable.
Individual Shape Parameters (01-25): Each of the 25+ shapes has its own dedicated group of settings, allowing you to fine-tune every aspect of its geometry, from the number of petals on a flower to the windings of a knot. Feel free to experiment!
For Developers & Pine Script™ Enthusiasts
If you are a developer and wish to add more indicators (e.g., Stochastic, CCI, ADX), you can easily do so by following the modular structure of the code. You would primarily need to:
Add a new `PulseIndicator` object for your new indicator in the `f_getMarketPulse()` function.
Add the logic for its scoring inside the `calculateScore()` method.
The `calculateTotals()` method and the dashboard table are designed to be dynamic and will automatically adapt to include your new indicator!
One of the core design philosophies behind Spiralyst is modularity and scalability . The Market Pulse engine was intentionally built using User-Defined Types (UDTs) and an array-based structure so that adding new indicators is incredibly simple and doesn't require rewriting the main logic.
If you want to add a new indicator to the scoring engine—let's use the Stochastic Oscillator as a detailed example—you only need to modify three small sections of the code. The rest of the script, including the adaptive dashboard, will update automatically.
Here’s your step-by-step guide:
#### Step 1: Add the User Inputs
First, you need to give users control over your new indicator. Find the `USER INTERFACE: INPUTS` section and add a new group for the Stochastic settings, right after the MACD group.
Create a new group name: `string GRP_STOCH = "⚙️ Stochastic Settings"`
Add the inputs: Create a boolean to enable/disable it, and then add the necessary parameters (`%K`, `%D`, `Smooth`). Use the `active` parameter to link them to the enable/disable checkbox.
// Add this code block right after the GRP_MACD and MACD inputs
string GRP_STOCH = "⚙️ Stochastic Settings"
bool stochEnabledInput = input.bool(true, "Enable Stochastic Scoring", group = GRP_STOCH)
int stochKInput = input.int(14, "%K Length", minval=1, group = GRP_STOCH, active = stochEnabledInput)
int stochDInput = input.int(3, "%D Smoothing", minval=1, group = GRP_STOCH, active = stochEnabledInput)
int stochSmoothInput = input.int(3, "Smooth", minval=1, group = GRP_STOCH, active = stochEnabledInput)
#### Step 2: Integrate into the Pulse Engine (The "Factory")
Next, go to the `f_getMarketPulse()` function. This function acts as a "factory" that builds and configures the entire market pulse object. You need to teach it how to build your new Stochastic indicator.
Update the function signature: Add the new `stochEnabledInput` boolean as a parameter.
Calculate the indicator: Add the `ta.stoch()` calculation.
Create a `PulseIndicator` object: Create a new object for the Stochastic, populating it with its name, parameters, calculated value, and whether it's enabled.
Add it to the array: Simply add your new `stochPulse` object to the `array.from()` list.
Here is the complete, updated `f_getMarketPulse()` function :
// Factory function to create and calculate the entire MarketPulse object.
f_getMarketPulse(bool rsiEnabled, bool macdEnabled, bool stochEnabled) =>
// 1. Calculate indicator values
float rsiVal = ta.rsi(rsiSourceInput, rsiLengthInput)
= ta.macd(close, macdFastInput, macdSlowInput, macdSignalInput)
float stochVal = ta.sma(ta.stoch(close, high, low, stochKInput), stochDInput) // We'll use the main line for scoring
// 2. Create individual PulseIndicator objects
PulseIndicator rsiPulse = PulseIndicator.new("RSI", str.tostring(rsiLengthInput), rsiVal, na, 0, rsiEnabled)
PulseIndicator macdPulse = PulseIndicator.new("MACD", str.format("{0},{1},{2}", macdFastInput, macdSlowInput, macdSignalInput), macdVal, signalVal, 0, macdEnabled)
PulseIndicator stochPulse = PulseIndicator.new("Stoch", str.format("{0},{1},{2}", stochKInput, stochDInput, stochSmoothInput), stochVal, na, 0, stochEnabled)
// 3. Calculate score for each
rsiPulse.calculateScore()
macdPulse.calculateScore()
stochPulse.calculateScore()
// 4. Add the new indicator to the array
array indicatorArray = array.from(rsiPulse, macdPulse, stochPulse)
MarketPulse pulse = MarketPulse.new(indicatorArray, 0, 0.0)
// 5. Calculate final totals
pulse.calculateTotals()
pulse
// Finally, update the function call in the main orchestration section:
MarketPulse marketPulse = f_getMarketPulse(rsiEnabledInput, macdEnabledInput, stochEnabledInput)
#### Step 3: Define the Scoring Logic
Now, you need to define how the Stochastic contributes to the score. Go to the `calculateScore()` method and add a new case to the `switch` statement for your indicator.
Here's a sample scoring logic for the Stochastic, which gives a strong bullish score in oversold conditions and a strong bearish score in overbought conditions.
Here is the complete, updated `calculateScore()` method :
// Method to calculate the score for this specific indicator.
method calculateScore(PulseIndicator this) =>
if not this.isEnabled
this.score := 0
else
this.score := switch this.name
"RSI" => this.value > 65 ? 2 : this.value > 50 ? 1 : this.value < 35 ? -2 : this.value < 50 ? -1 : 0
"MACD" => this.value > this.signalValue and this.value > 0 ? 2 : this.value > this.signalValue ? 1 : this.value < this.signalValue and this.value < 0 ? -2 : this.value < this.signalValue ? -1 : 0
"Stoch" => this.value > 80 ? -2 : this.value > 50 ? 1 : this.value < 20 ? 2 : this.value < 50 ? -1 : 0
=> 0
this
#### That's It!
You're done. You do not need to modify the dashboard table or the total score calculation.
Because the `MarketPulse` object holds its indicators in an array , the rest of the script is designed to be adaptive:
The `calculateTotals()` method automatically loops through every indicator in the array to sum the scores and calculate the final percentage.
The dashboard code loops through the `enabledIndicators` array to draw the table. Since your new Stochastic indicator is now part of that array, it will appear automatically when enabled!
---
Remember, this is your playground! I'm genuinely excited to see the unique shapes you discover. If you create something you're proud of, feel free to share it in the comments below.
Happy analyzing, and may your charts be both insightful and beautiful! 💛
Extreme Zone Volume ProfileExtreme Zone Volume Profile (EZVP)
Originality & Innovation
The Extreme Zone Volume Profile (EZVP) revolutionizes traditional volume profile analysis by applying statistical zone classification to volume distribution. Unlike standard volume profiles that display raw volume data, EZVP segments the price range into statistically meaningful zones based on percentile thresholds, allowing traders to instantly identify where volume concentration suggests strong support/resistance versus areas of potential breakout.
Technical Methodology
Core Algorithm:
Distributes volume across user-defined bins (20-200) over a lookback period
Calculates volume-weighted price levels for each bin
Applies percentile-based zone classification to the price range (not volume ranking)
Zone B (extreme zones): Outer percentile tails representing potential rejection areas
Zone A (significant zones): Secondary percentile bands indicating strong interest levels
Center Zone: Bulk trading range where most price discovery occurs
Mathematical Foundation:
The script uses price-range percentiles rather than volume percentiles. If the total price range is divided into 100%, Zone B captures the extreme price tails (default 2.5% each end ≈ 2 standard deviations), Zone A captures the next significant bands (default 14% each ≈ 1 standard deviation), leaving the center for normal distribution trading.
Key Calculations:
POC (Point of Control): Price level with maximum volume accumulation
Volume-weighted mean price: Total volume × price / total volume
Median price: Geometric center of the price range
Rightward-projected bars: Volume bars extend forward from current time to avoid historical chart clutter
Trading Applications
Zone Interpretation:
Zone B (Red/Green): Extreme price levels where volume suggests strong rejection potential. Price reaching these zones often indicates overextension and possible reversal points.
Zone A (Orange/Teal): Significant support/resistance areas with substantial volume interest. These levels often act as intermediate targets or consolidation zones.
Center (Gray): Fair value area where most trading occurs. Price tends to return to this range during normal market conditions.
Strategic Usage:
Reversal Trading: Look for rejection signals when price enters Zone B areas
Breakout Confirmation: Volume expansion beyond Zone B boundaries suggests genuine breakouts
Support/Resistance: Zone A boundaries often provide reliable entry/exit levels
Mean Reversion: Price tends to gravitate toward the volume-weighted mean and POC lines
Unique Value Proposition
EZVP addresses three key limitations of traditional volume profiles:
Visual Clarity: Standard profiles can be cluttered and difficult to interpret quickly. EZVP's color-coded zones provide instant visual feedback about price significance.
Statistical Framework: Rather than relying on subjective interpretation of volume nodes, EZVP applies objective percentile-based classification, making support/resistance identification more systematic.
Forward-Looking Display: Rightward-projecting bars keep historical price action clean while maintaining current market structure visibility.
Configuration Guide
Lookback Period (10-1000): Controls the historical depth of volume calculation. Shorter periods for intraday scalping, longer for swing trading.
Number of Bins (20-200): Resolution of volume distribution. Higher values provide more granular analysis but may create noise on lower timeframes.
Zone Percentages:
Zone B: Extreme threshold (default 2.5% = ~2σ statistical significance)
Zone A: Significant threshold (default 14% = ~1σ statistical significance)
Visual Controls: Toggle individual elements (POC, median, mean, zone lines) to customize display complexity for your trading style.
Technical Requirements
Pine Script v6 compatible
Maximum bars back: 5000 (ensures sufficient historical data)
Maximum boxes: 500 (supports high-resolution bin counts)
Maximum lines: 50 (accommodates all zone and reference lines)
This indicator synthesizes volume profile theory with statistical zone analysis, providing a quantitative framework for identifying high-probability support/resistance levels based on volume distribution patterns rather than arbitrary price levels.
VXN Net VolumeThis indicator is based on other open source scripts. It displays net volume (buying minus selling) approximated from lower timeframe data, helping traders gauge buying/selling pressure.
It uses the CBOE Nasdaq Volatility Index (VXN) to color the chart background: green for low volatility (bullish) when VXN's short-term EMA is below its long-term SMA, and red for high volatility (bearish) when above.
The net volume color is not filtered by the VXN Index trend direction (background color). It’s highly recommended to align with the VXN Index trend direction when using net volume to confirm your entry. A red net volume with a red background or a green net volume with a green background provides a high-probability setup.
A moving average of net volume is optionally plotted as a blue area to highlight significant volume levels.
Enjoy this indicator? Consider a donation to support development! buymeacoffee.com
PT FinderThis is mostly helpful to find potential price targets for Daytrades on the daily chart (if stronger resistances / supports are too far away).
Shows highs / lows of nearby "pivot" candles (higher high / lower low than both candles around) - depending on expected trade direction. Based on my experience these can be potential (albeit weak) resistance / support.
If it shows values only in the wrong trade direction: set a checkmark at "Invert bullish / bearish price targets" in the indicator settings
Also shows the ADR (blue line = yesterday's close MINUS Average Day Range) - which is helpful for Daytrades to see what price movement you could potentially expect for the day!
As a nice bonus it also shows gaps as yellow areas - in case you maybe missed them because you zoomed in / out too much on your daily chart.
More infos: www.reddit.com
Ai Golden Support and Resistance Adaptive Support & Resistance (ADR-scaled ABCD + Breakout/Retest Zones)
What it does
This indicator detects actionable support/resistance zones from swing structure and breakout events, then keeps each zone active until it’s invalidated by price. It adapts zone sensitivity using Average Daily Range (ADR) so the same rules scale across symbols and vol regimes.
Core Logic (high level)
Swing & ABCD pattern seed
Detects alternating pivots (high–low–high–low or low–high–low–high) using a user-selected lookback.
Validates basic AB–BC–CD proportions: BC must retrace a portion of AB; CD must extend BC within a set range.
From a valid sequence, sets a candidate level (top for bearish, bottom for bullish).
Breakout confirmation
A level becomes confirmed when price closes beyond it (crossover/crossunder).
On confirmation, the script draws a dotted reference line and records how many bars elapsed from the seed pivot to breakout. That count defines the lookback window used for local extremes.
Zone construction
Supply (bearish): builds a box around the most recent local range near the bearish seed;
Demand (bullish): builds a box around the most recent local range near the bullish seed.
Each zone’s height is derived from nearby extremes and the seed swing, so boxes reflect local structure rather than fixed pip widths.
Volatility normalization (ADR%)
ADR is computed from daily candles.
The Risk Profile input (“High/Medium/Low”) scales required move sizes using ADR%, and adjusts pivot sensitivity (fewer/more bars).
Higher risk → more sensitive (smaller ADR %, tighter pivot lookback).
Lower risk → stricter filters (larger ADR %, wider pivot lookback).
Explosive-move filter (streak logic)
Searches the seeded lookback for consecutive same-color candles (config via the risk profile).
Requires the cumulative % move of that streak to exceed an ADR-scaled threshold.
When found, the zone is tagged as originating from an “explosive” move (potentially higher reaction probability).
Zone persistence & invalidation
Zones persist and auto-extend to the right until invalidated.
Invalidation occurs when price closes through a rule-based threshold derived from the seed structure (stored per zone).
Once invalidated, the zone is marked inactive and stops updating.
Inputs & Controls
Risk Profile: High / Medium / Low (sets pivot lookback, streak length, and ADR% thresholds).
Labels & Visuals: Toggle labels and level lines; set line width.
Colors/Boxes: Supply (red), Demand (green); dotted breakout references.
No broker/session settings are required; the script adapts per symbol via ADR.
On-Chart Elements
Dotted breakout lines at confirmed levels (with measured bars-to-breakout).
Supply/Demand boxes that extend until invalidation.
Optional labels for clarity; minimal clutter by default.
How to Use
Context: Use higher-TF context for bias; apply zones on your trading TF.
Confluence: Combine zones with your own triggers (structure breaks, rejection wicks, momentum shifts).
Invalidation: If price closes beyond a zone’s invalidation threshold, treat that zone as inactive.
Sensitivity: If too many zones appear, switch to Medium/Low Risk (stricter ADR% & pivots); if too few, use High Risk.
Notes & Limitations
Logic is rule-based; there is no machine learning.
Daily ADR is computed from D timeframe, so intraday charts inherit daily volatility context.
Results vary by symbol and timeframe; validate settings per market.
This is an indicator (no orders or P/L).
Multi-Timeframe Support & Resistance Lines with alerts🚨 New Early Warning Alerts:
⚡ Approaching Resistance Alert
Triggers when: High gets within your specified distance of resistance (but hasn't touched yet)
Message: "Price approaching resistance level - watch for reaction"
Use case: Get ready for potential rejection or breakout
⚡ Approaching Support Alert
Triggers when: Low gets within your specified distance of support (but hasn't touched yet)
Message: "Price approaching support level - watch for reaction"
Use case: Get ready for potential bounce or breakdown
⚙️ New Setting:
Alert Distance (%): How close price needs to get before alerting (default: 0.1%)
0.1% = Very close, fewer false alerts
0.5% = Medium distance, more advance warning
1.0% = Far distance, maximum advance warning
📊 Complete Alert System:
"Approaching Resistance" - Early warning before touch
"Approaching Support" - Early warning before touch
"Resistance Breakout" - Actual break above
"Support Breakdown" - Actual break below
Position Size CalculatorPosition Size Calculator
This open-source Pine Script® indicator helps traders manage risk by calculating position size, margin, and risk/reward based on account size, leverage, entry, stop-loss, and take-profit. It features a customizable table and optional chart lines/labels for clear trade planning across stocks, forex, crypto, and futures.
What It Does
- Position Size: Computes units to trade based on risk percentage and stop-loss distance, capped by leverage.
- Margin: Calculates initial margin in base currency and USD, with account size percentage.
- Risk/Reward: Shows risk-reward ratio, percentage price movements, and USD gains/losses.
- Visualization: Displays results in a table and optional chart lines/labels with customizable styles.
How It Works
- Precision: Adjusts price formatting using syminfo.mintick for accuracy across assets.
- Calculations: Position size = accountSize * (riskPercent / 100) / |entry - stoploss|, capped by accountSize * leverage / entry. Margin = positionSize / leverage. Risk-reward = |takeprofit - entry| / |stoploss - entry|.
- Display: Table shows metrics; optional lines/labels plot entry, stop-loss, and take-profit with percentage and USD details.
How to Use
- Set Inputs:
1- Account Size (USD): Your capital (e.g., 1000).
2- % Risk per Trade: Risk tolerance (e.g., 1%).
3- Leverage: Broker leverage (e.g., 1x, 10x).
4- Entry, Stop Loss, Take Profit: Trade prices.
5- Show Lines and Labels: Enable chart overlays.
- Customize: Adjust table position, colors, and line styles (Solid, Dashed, Dotted).
- View Results: Table shows position size, margin, and risk/reward. Chart lines/labels (if enabled) display prices, percentages, and USD outcomes.
- Apply: Use metrics for trade execution; modify code for custom features.
Notes
- Ensure valid inputs (entry ≠ stop-loss, both positive) to avoid “N/A”.
- Open-source: Inspect or extend the code for your needs.
- Contact the author via TradingView for feedback.
RSI Price overlay on chartThie Indicator plots buy and sell signals on the chart using the 28 period RSI with overbought areas at 65 and oversold at 35
TMA +BB Bands Indicator//@version=5
indicator(shorttitle="BB", title="Bollinger Bands", overlay=true, timeframe="", timeframe_gaps=true)
length = input.int(20, minval=1)
maType = input.string("SMA", "Basis MA Type", options = )
src = input(close, title="Source")
mult = input.float(2.0, minval=0.001, maxval=50, title="StdDev")
ma(source, length, _type) =>
switch _type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
basis = ma(src, length, maType)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input.int(0, "Offset", minval = -500, maxval = 500, display = display.data_window)
plot(basis, "Basis", color=#2962FF, offset = offset)
p1 = plot(upper, "Upper", color=#F23645, offset = offset)
p2 = plot(lower, "Lower", color=#089981, offset = offset)
fill(p1, p2, title = "Background", color=color.rgb(33, 150, 243, 95))
FVG SuiteSupercharge your charts with FVG Suite! Detect Smart Money structures, Fair Value Gaps, and key Multi-Timeframe levels—all in one powerful indicator. Perfect for both intraday and swing traders.
⚡ Highlights:
📈 Smart Money Structure: BoS & CHoCH signals with customizable colors and sensitivity.
💎 Fair Value Gaps: Bullish & Bearish FVGs with filters, max extension, and automatic cleanup.
🕒 Multi-Timeframe Levels: Daily, Weekly, and Monthly Highs & Lows with solid/dashed/dotted lines.
📊 Volume Activity: Real-time 4H & 24H volume analysis in a neat table.
🎨 Fully Customizable: Colors, transparency, and labels for a clean, easy-to-read chart.
Make smarter trade decisions with clear market structure insights and gap detection! 🚀
SMA MAD SuperTrend | OquantThe SMA MAD SuperTrend | Oquant is an trend-following indicator designed to help traders identify potential trend directions and reversals using a unique combination of a Simple Moving Average (SMA), Mean Absolute Deviation (MAD), and a SuperTrend mechanism. This script aims to provide clear visual signals for trend entries and exits, making it suitable for traders looking to capture trends.
This indicator innovatively combines the smoothing properties of an SMA with the volatility-adaptive qualities of MAD to create dynamic SuperTrend bands. Unlike traditional SuperTrend indicators that rely on Average True Range (ATR) for volatility, this script uses Mean Absolute Deviation(MAD) to measure the average absolute deviation from the mean price, providing a different perspective on price volatility. The result is a SuperTrend system that adapts to market conditions with a focus on price deviation, offering a unique tool for trend detection.
Components and Calculations
Simple Moving Average (SMA):
The SMA is a widely used indicator that calculates the average of a specified number of closing prices. It smooths price data to identify the overall trend direction. In this script, the SMA serves as the baseline for calculating dynamic upper and lower bands.
Mean Absolute Deviation (MAD):
MAD measures the average absolute deviation of the price from its mean. It quantifies volatility by calculating how far prices deviate from the mean price, offering an alternative to ATR.
SuperTrend Mechanism:
This SuperTrend indicator generates dynamic upper and lower bands around the Simple Moving Average (SMA) using mean absolute deviation as measure of volatility.
It tracks trend direction by comparing the close price to the bands:
If the price crosses above the upper band, the trend turns bullish, and the SuperTrend follows the lower band.
If the price crosses below the lower band, the trend turns bearish, and the SuperTrend follows the upper band.
The bands adjust based on their previous values, updating only when the price crosses a band or the band shifts in the correct direction, reducing false signals and ensuring stable trend detection.
How to Use the Indicator
Trend Signals:
Green Line: Indicates a bullish trend (price above the SuperTrend line).
Purple Line: Indicates a bearish trend (price below the SuperTrend line).
Bar and Candle Coloring: Bars and candles are colored green for bullish trends and purple for bearish trends, making it easy to visualize trend direction.
Filled Areas: The area between the price and the SuperTrend line is filled with transparent colors (green for bullish, purple for bearish) to highlight trend.
Inputs:
Source: Choose the price data for calculations.
SMA Length: Adjust the period for the SMA. Longer periods smooth the trend further.
MAD Length: Set the period for MAD calculation. Shorter periods make the MAD more sensitive.
Factor: Control the distance of the SuperTrend bands from the SMA. Higher values widen the bands, reducing sensitivity to price fluctuations.
Alerts:
The script includes alert conditions for trend changes:
SMA MAD SuperTrend Long: Triggered when the trend turns bullish.
SMA MAD SuperTrend Short: Triggered when the trend turns bearish.
Set up alerts in TradingView to receive notifications for these conditions.
Why Use This Script?
The SMA MAD SuperTrend | Oquant offers a fresh take on trend-following by integrating SMA as baseline and MAD for volatility measurement, providing an alternative to ATR-based SuperTrend indicators. Its clear visual signals, customizable inputs, and alert conditions make it versatile for traders of all levels.
⚠️ Disclaimer: This indicator is intended for educational and informational purposes only. Trading/investing involves risk, and past performance does not guarantee future results. Always test and evaluate indicators/strategies before applying them in live markets. Use at your own risk.