Volume with number spikesThis Volume Indicator shows unusual volume on the candle on any time frame.
Indicadores y estrategias
THAI TRENDINGVolume is the total amount of assets traded in a specific period of time. The 24-hour Volume indicator is used to measure the total volume of a symbol traded in the last 24 hours, expressed as in currency. It can be used to measure the market's interest in a particular symbol.
Std Dev Channel [fmb]What it is
A professional regression channel that combines standard deviation divisions, an extreme price envelope, and a trend quality gauge. It is designed for fast read-and-act decisions on any timeframe, with sensible presets and log-space math for instruments that trend exponentially.
Why it’s different
Most channels draw fixed ±1σ and ±2σ around a regression line. This tool adds:
- Fibonacci-spaced σ divisions for precise scaling
- An objective MaxEnvelope of actual extremes with optional 1.272 and 1.618 extensions
- Pearson’s R labelling that classifies the trend as Strong Up, Moderate, Weak, or Strong Down
- A log-space option so channels behave correctly on long trends and high beta charts
How it works
Base line
- Linear regression of the last Length bars, drawn as a ray.
- Optional colour change by regime using Pearson’s R.
Divisions (StdDev or MaxEnvelope)
- StdDev basis: σ of residuals around the regression line.
- MaxEnvelope basis: distances from the base line to the farthest highs and lows in the lookback.
- Divisions can be Fibonacci multiples (0.382, 0.618, 1.000, 1.272 by default) or uniform steps.
Outer rails
- ENV 1.0 touches the farthest highs and lows within the window.
- Optional extensions at 1.272 and 1.618 highlight stretch and breakout zones.
Trend quality (Pearson’s R)
- R is computed on the same series and window.
- Default thresholds: Strong when |R| ≥ 0.70, Weak when |R| < 0.40.
- The label reads: R 0.XXX • Class, plotted near the most recent base value.
Log-space math
- When enabled, the model runs on ln(price) and converts the outputs back to price.
- Safer on multi-year charts and large percentage trends.
Presets
- Swing: Length 125, StdDev basis, Fib divisions, ENV 1.0 and 1.272 on
- Intraday: Length 240, StdDev basis, simple ±1 and ±2 style divisions, ENV off by default
- Position: Length 200, StdDev basis, compact Fib set for higher timeframes
You can turn preset overrides off to make every input respond instantly.
Inputs you will actually use
- Length, Source, Log-space ON or OFF
- Basis: StdDev or MaxEnvelope
- Divisions: Fib list or Step and Max multiple
- Outer rails: show ENV 1.0, show 1.272, show 1.618
- Labels and sizes, extend left or right
- Hide divisions or outer rails automatically when the regime is Weak
Alerts included
- Close crosses above or below ENV 1.0
- Close crosses above or below ENV 1.272 and 1.618 (if enabled)
Practical playbook
Trend following
- In Strong Uptrend: buy pullbacks near 0.382 to 0.618 above the base with stops just beyond the next lower division.
- In Strong Downtrend: sell bounces into 0.382 to 0.618 below the base with stops just beyond the next upper division.
Mean reversion
- When R is Moderate or Weak, fade moves that tag ENV 1.0 back toward the base.
- If price closes through an ENV extension, treat it as potential regime change and stand down on fades.
Breakouts
- A close through ENV 1.0 with R rising toward Strong often precedes trend acceleration.
- Use the next division or the 1.272 rail as the first target and trail on the base.
Tips
- Keep Length stable across symbols you compare. Consistency beats curve fitting.
- Use log-space on multi-year equities and crypto. Use linear for short intraday work.
- If you want a classic look, disable Fib and rails, set Step 1.0 and Max 2.0.
Notes
- The tool draws more lines when Fib divisions are active. If it feels busy, show divisions only and hide labels, or keep ENV 1.0 plus one extension.
- Pearson’s R is descriptive, not predictive. Combine with price structure and volume for entries.
Multi-Sigma Bands [fmb]Multi-Sigma Bands plots standard deviation (sigma) bands around a selectable basis (SMA, EMA, RMA, or Linear Regression). It’s designed to help you spot when price is behaving “normally” versus when it’s stretching into statistically extended territory.
What it shows
- Basis: the central reference line (your chosen basis type)
- ±1σ zone: the common range where price spends much of its time
- ±2σ zone: extended range where moves often become more emotional or trend-driven
- ±3σ zone: extreme range where price is statistically stretched (risk increases)
How to read it
- Inside ±1σ
- Often normal behaviour and mean-reverting price action around the basis.
- Between ±1σ and ±2σ
- A meaningful extension. In trends, price can “walk” these areas for longer than expected.
- Between ±2σ and ±3σ
- Rare extension. Can signal exhaustion, blow-off behaviour, or capitulation depending on direction and context.
How traders typically use it
- Trend context
- In strong uptrends, price may ride the upper bands (+1σ to +2σ) repeatedly.
- In strong downtrends, the lower bands (-1σ to -2σ) can act the same way.
- Bands show statistical stretch, not automatic reversal signals.
- Extension and risk framing
- The farther price is from the basis, the more “stretched” it is.
- That usually means chasing becomes riskier and entries require tighter confirmation.
- Range behaviour
- Ranges often oscillate around the basis, with frequent returns toward the middle zone.
Settings
- Source: what price series to use (Close by default)
- Length: lookback used for both basis and standard deviation
- Basis: SMA, EMA, RMA, or LinReg
- Stdev smoothing: optional smoothing on standard deviation for cleaner bands
- σ multipliers: customise σ1, σ2, σ3 (defaults: 1, 2, 3)
- Force Monthly Data (optional): calculate bands using a higher-timeframe source to reduce noise and focus on macro structure
Disclaimer
This indicator is for informational and educational purposes only and is not financial advice. Always use risk management and confirm with market structure and trend context.
BTC Accumulation Bands Long-only spot accumulation strategy on daily BTC bars. Buys at percentage deviation bands
below the 200-day SMA with geometric scaling. Trims as price returns toward/above fair value.
Weekly RSI gate filters slow grinds.
ChunkbrAI-NN INDIChunkbrAI-NN INDI: The Neural Network Odyssey
A Native Pine Script Neural Network Research Engine
Welcome to ChunkbrAI-NN 5.3. This is not a standard technical indicator; it is a proof-of-concept Artificial Intelligence engine built entirely from scratch within Pine Script.
Neural Networks typically require iterating over massive datasets, a task that usually times out on TradingView. ChunkbrAI solves this by introducing a novel "Chunking Architecture"—a system that breaks history into digestible learning blocks and trains a Multilayer Perceptron (MLP) using a "Chunking" approach.
It features a living ecosystem where neurons have "genes," grow mature, and adapt to market regimes using a highly sophisticated Context-Aware normalization engine.
-----------------------------------------------------------
The Core Concept: "The Time Wheel"
To bypass Pine Script's execution limits, this script does not train linearly from the beginning of time. Instead, it operates like a spinning wheel of experience.
* The Chunk System: On every bar update, the engine reaches back into history (up to 5000 bars) and grabs random or sequential "Chunks" of data. It treats these chunks as isolated training samples.
* Experience Replay: By constantly revisiting past market scenarios (Chunks), the network slowly converges its weights, learning to recognize patterns across different eras of price action.
-----------------------------------------------------------
Architecture & Modules
A. The Neural Core (MLP)
At the heart is a raw neural network built with arrays:
* Topology: A dense network with a customizable Hidden Layer (Default: 60 Neurons).
* Timewarp (Stride): When enabled, the network uses "dilated" inputs (skipping bars, e.g., 1, 3, 5...). This increases the network's Field of View without increasing computational load.
* Forecasting: The network outputs a standardized prediction which is then de-normalized to project the future price path on your chart.
B. The Context System (The "Eyes")
Raw prices confuse neural networks. A $1000 move in Bitcoin is massive in 2016 but noise in 2024. ChunkbrAI uses a relativistic Context System:
* Regime Detection: It uses a Zero-Lag Moving Average (ZLMA) and Non-Linear Regression to measure the current market "Vibe" (Volatility & Trend).
* Dynamic Normalization: The inputs are scaled based on this context. If the market is volatile, the data is compressed; if calm, it is expanded. This ensures the brain receives consistent signal patterns regardless of the absolute price.
C. The Gene System (Neuro-Plasticity)
This is the experimental "biology" layer. Neurons are not just static math; they have life cycles.
* Maturity: Neurons start "Young" (highly plastic, high mutation rate). As they successfully reduce error, they become "Wise" (stable, low mutation).
* Mutation: If a "Wise" neuron begins failing (high error), it is demoted and forced to mutate. This allows the brain to "forget" obsolete behaviors and adapt to new market paradigms automatically.
* Profiles: You can initialize the brain with different personalities (e.g., Dreamer, Young Chaos, Zen Monk).
D. The Brain Scheduler (Adaptive Learning)
A static Learning Rate (LR) is inefficient. The Brain Scheduler acts as the heartbeat:
* Panic vs. Flow: It monitors the derivative of the error. If the error spikes (Panic), the Scheduler slows down learning to prevent the model from exploding. If the error smooths out (Flow), it accelerates learning (Infinite LR Mode).
-----------------------------------------------------------
Forecasting Modes
The script provides two distinct ways to visualize the future:
1. Direct Projection (Green Line):
The network takes the current window of price action and predicts the immediate next step. If Timewarp is active, it interpolates the result to draw a smooth curve.
2. Autoregression (Cyan Line):
Available in "Auto" mode. The network feeds its *own* predictions back into itself as inputs to generate multi-step forecasts.
* Wave Segmentation: The script intelligently guesses the current market cycle length and attempts to project that specific duration forward.
-----------------------------------------------------------
Operation Manual
The script has two distinct training loops: first, when you add it to a chart, Pine runs through the available historical bars once, and this initial history pass is the main training phase where the network iterates chunk-by-chunk using your configured chunk count/iterations (e.g., if chunk count is 3, it performs 3 chunk updates per step), but pushing chunk count, iterations, or model sizing too high can hit Pine’s execution limits; after that, once real-time candles start printing, the script can either keep training (weights continue updating) or freeze the weights and run inference only, producing predictions from the learned parameters, and if live training is enabled it can also simulate “bars-back” style training during live mode by iterating across prior bars as if doing another history pass—which again can run into limits if chunks/iterations/sizing are too heavy—so when changing parameters to evaluate behavior you change them carefully and individually, because multiple simultaneous increases make it hard to attribute effects and can more easily trigger those execution constraints.
Weight Persistence (Save/Load):
Pine Script can’t write files or persist weights directly, so ChunkbrAI uses a library-based workaround that’s honestly tricky and kind of a pain: you enable the weight-export alerts so the script emits the weights (W1/W2/biases etc.) as text, and those payloads are chunked as well; then, outside TradingView, I use a separate Python script to parse the alert emails, reconstruct and format the chunked weights properly, and generate the corresponding library code files; after that, the libraries have to be published/updated, and only then can the main script “restore” by reading the published lib constants on chart load, effectively starting with the pre-trained weights instead of relying purely on the fresh history-run training pass. I don’t recommend this process unless you really have to—it’s fragile and high-effort—but until TradingView implements some simple built-in data storage for scripts, it’s basically the only practical way to save and reload your models.
-----------------------------------------------------------
Limitations & Notes
* Calculation Limits: This script pushes Pine Script to its absolute edge. If you increase Chunk Size or Hidden Size too much, you WILL hit execution limits. Use the defaults as a baseline.
* Non-Deterministic: Because the "Wheel" picks random chunks for training, two instances of this script might evolve slightly different brains unless you use the Restore Weights feature.
* Experimental: This is a research tool designed to explore Neural Networks and Genetic Algorithms on the chart. Treat it as an educational engine, not financial advice.
Credits: Concept and Engineering by funkybrown.
BTC/M2 Fire Sniffer (Liquidity Range Z-Score)Howdy Fella. Great to see you here, exploring the true data in CRYPTOCAP:BTC analysis.
To ensure a perfect view on the markets, here are a few tips on how to fine tune the Fire Sniffer:
- Z-Score Lookback: 40
- Liquidity Ratio SuperSmoother Length: 8
- Z-score SuperSmoother Length: 132
Set the ranges as following:
Mean: -0.53
Liquidity Cycle Top: 0.8
Liquidity Cycle Bottom: -0.65
With that, you are set to go. Enjoy and make sure to let me know your thoughts on the script. You can contact me on X: @thebitcoinfrontier
Cup & Handle Visual Pattern Cup & Handle – Visual Breakout Strategy (with Buy/Sell Signals)
Strategy Objective
This strategy helps traders visually identify and trade bullish Cup & Handle patterns by:
Drawing the Cup and Handle structure directly on the chart
Highlighting key support and resistance zones
Providing clear BUY and SELL signals
Assisting decision-making without repainting
🔧 Concept Behind the Strategy
The Cup & Handle is a bullish continuation pattern:
The Cup shows long consolidation and accumulation
The Handle shows short-term profit booking
A breakout above resistance signals trend continuation
This script approximates the pattern using price structure and volatility logic and draws it visually, instead of trying to mathematically force a perfect pattern.
🟠 Cup Formation Logic
The script finds the highest high and lowest low over a fixed lookback period
The depth of the cup must exceed a minimum percentage, ensuring a meaningful base
Two horizontal lines are drawn:
Top line → Cup resistance
Bottom line → Cup base (support)
📌 This creates a visible U-shaped price zone
⬜ Handle Formation Logic
After the cup forms, price must consolidate in a narrow range below resistance
A box is drawn on the chart showing the handle area
This represents short-term pullback before breakout
📌 The handle must:
Stay above the cup low
Stay below the cup resistance
🟢 BUY Signal Logic
A BUY signal is generated when:
Cup depth condition is valid
Handle consolidation is confirmed
Price breaks above cup resistance
📌 A green ▲ arrow appears below the breakout candle.
🔴 SELL Signal Logic
A SELL signal is generated when:
Price breaks below the handle support
📌 A red ▼ arrow appears above the breakdown candle.
🛑 Risk Management (Manual / Trader-Controlled)
This strategy is visual-assisted, not auto-exit based:
Stop Loss: Below handle low
Target:
Measure cup depth and project upward
Or trail using Supertrend / Moving Average
⏱️ Best Usage
Style Timeframe
Swing Trading 1H / Daily
Positional Daily / Weekly
Best suited for:
Strong trending stocks
Breakout candidates
Post-consolidation markets
⭐ Strengths of This Strategy
✔ Visual pattern drawing (easy to understand)
✔ Avoids over-complicated math
✔ Clear breakout levels
✔ Non-repainting logic
✔ Works as a decision-support tool
⚠️ Important Notes
Cup & Handle cannot be perfectly automated
This strategy assists, not replaces, trader judgment
Works best when combined with:
RSI above 50
Volume expansion
Market trend confirmation.
Educational Trend Direction (Up & Down)🔍 Overview
This indicator is designed to visually represent trend direction and trend transitions using a simple moving-average relationship. It is built strictly for educational and analytical purposes, allowing users to observe how price behaves during upward and downward market phases without relying on trading signals or predictions.
The indicator focuses on trend context, not trade execution.
⚙️ How the Indicator Works
The script calculates two exponential moving averages:
A fast trend line that reacts quickly to recent price changes
A slow trend line that represents broader market direction
Trend direction is determined by the relative position of these two lines.
When the fast line moves above the slow line, the market is considered to be in an upward trend phase
When the fast line moves below the slow line, the market is considered to be in a downward trend phase
This relationship helps visualize trend shifts and momentum changes in a simple and intuitive way.
🎨 Visual Components Explained
🟢 Green Trend Line
Represents the fast moving average during upward trend phases
Indicates that price is maintaining strength relative to the broader trend
Color reflects trend direction only, not confirmation or entry
🔴 Red Trend Line
Represents the fast moving average during downward trend phases
Indicates sustained weakness relative to the broader trend
Color does not imply selling or future continuation
⚪ Grey Trend Line
Represents the slow moving average
Acts as a baseline trend reference
Helps distinguish between short-term fluctuations and broader direction
🎨 Background Shading
Light green shading appears during upward trend environments
Light red shading appears during downward trend environments
Background color provides context only and does not signal market actions
🎯 Purpose & Benefits
Helps identify trend phases in a clear and minimal way
Improves understanding of trend transitions and momentum shifts
Reduces visual noise compared to raw price data
Encourages context-based analysis instead of signal dependency
Suitable for all markets and timeframes
⚠️ Important Notes
This indicator does not generate buy or sell signals
No targets, stop levels, or performance metrics are included
Trend conditions are descriptive, not predictive
Past behavior does not guarantee future outcomes
Users should always apply their own analysis and risk management when interpreting market data.
📚 Intended Use
This tool is intended for:
Market trend study
Educational demonstrations
Visual analysis of trend direction
Long-term chart structure awareness
It is not intended for automated trading or decision-making.
QuCap Pure Liquidity: Untouched Liquidity PoolsOverview Most liquidity indicators on the Public Library suffer from "Chart Noise." They often leave levels on the chart long after they have been "wicked out," simply because the candle didn't manage to close past the level.
QuCap Pure Liquidity is designed for the precision trader who only cares about Intact Liquidity. This script identifies pivot-based liquidity pools and monitors them in real-time. If price wicks through a level by even a single tick, the level is immediately invalidated and removed from your chart.
Key Features
Instant Invalidation: Levels are deleted on wick touch (High/Low), not candle close.
Intact Levels Only: What you see on the chart is "Fresh" and has not been mitigated.
Memory Management: Includes customizable limits for Buy-Side and Sell-Side levels to keep your chart clean and your browser running fast.
Fully Customizable: Adjust pivot strength (Left/Right bars) and visual styles to match your personal template.
How to Use
Draw on Liquidity: Use the remaining lines as a magnet for price action.
Stop Runs: Observe how price reacts when it clears these levels.
Clean Charts: Perfect for traders who follow SMC or ICT concepts and need to see where the real "resting" orders are.
Settings
Pivot Strength: Increase these values (e.g., 5, 5) to find more significant historical levels, or keep them low (2, 2) for scalp targets.
Max Levels: Keeps the chart from showing lines from weeks ago that are no longer relevant to current intraday price action.
Daily 10 & 20 EMA (Shown on All Timeframes)The 10-day EMA is the quicker one. It hugs price closely, reacting fast to every twitch and hesitation. When price respects it, momentum feels alive. When price slices through it, you sense hesitation before it shows up elsewhere.
The 20-day EMA moves with more weight. It doesn’t flinch at noise. It represents the market’s short-term memory, the line price keeps returning to when trends are healthy. Above it, bias feels constructive. Below it, gravity takes over.
Together, they form a rhythm pair:
When the 10 EMA rides above the 20 EMA, the market is leaning forward.
When the 10 EMA sinks below the 20 EMA, momentum is cooling or rolling over.
When price compresses between them, indecision is building energy.
Across all timeframes, they scale like a fractal:
On lower timeframes, they act as tactical guides for entries, pullbacks, and exits.
On higher timeframes, they define structure, trend health, and whether moves are worth trusting.
They don’t predict. They contextualize.
They don’t command. They frame the battlefield
MTF EMA Traffic Light System Trend Alignment for ScalpersMTF EMA Traffic Light – Trend Bias System
This indicator is designed to help traders quickly identify high-probability trend alignment using multiple timeframes and EMAs.
It analyzes price relative to the 13 EMA and 55 EMA on:
1 Minute
5 Minute
15 Minute
1 Hour
4 Hour
Then it converts that data into a simple Traffic Light system to guide trade decisions.
🚦 How It Works
Each timeframe is classified as:
🟢 BULL – Price above both EMAs
🔴 BEAR – Price below both EMAs
🟡 MIXED – No clear direction
The system focuses on lower-timeframe alignment:
When 1m + 5m + 15m are aligned → Strong setup
When mixed → Caution
When misaligned → Stand aside
🟢 GREEN State (Full Trade Mode)
Triggered when:
✔ 1m, 5m, and 15m are all BULL → Long Bias
✔ 1m, 5m, and 15m are all BEAR → Short Bias
Rules:
Full position size
Trade with trend
Look for EMA pullbacks
Let winners run
🟡 YELLOW State (Caution Mode)
Triggered when:
✔ Lower timeframes are mixed
Rules:
Reduce size
Take quick profits
No holding
Defensive trading
🔴 RED State (No Trade)
Triggered when:
✔ No clear alignment
Rules:
Stay out
Mark key levels
Protect capital
📋 Dashboard Panel
The indicator displays a real-time table showing:
Each timeframe’s bias
Overall market state
Trade rules
This allows you to read market structure in seconds without switching charts.
🎯 Best Use
This tool works best for:
✔ Scalping
✔ Intraday trading
✔ Trend continuation setups
✔ EMA pullback strategies
Recommended for:
Forex
Indices
Gold
Crypto
⚠️ Risk Disclaimer
This indicator is a decision-support tool, not a guarantee of profits.
Always use:
Proper risk management
Stop losses
Personal trade rules
Never risk more than you can afford to lose.
Overnight Mid-point v2Same idea as first script, just refined so it takes candlesticks and not swings.
EMA20 and 10 PullbackStrategy Logic
Uses EMA 10, EMA 20, and VWAP for trend filtering
Identifies strong bullish and bearish trends
Waits for controlled pullbacks (1–3 candles) near EMA20
Triggers entries only on engulfing confirmation candles
Generates BUY signals in uptrends and SELL signals in downtrends
Key Features
Works best on NIFTY and liquid stocks
Avoids sideways markets by using EMA alignment + VWAP
Non-repainting, rule-based logic
Suitable for manual trading or alert-based automation
Alerts compatible with webhooks (n8n / Google Sheets)
Recommended Usage
Timeframe: 5-minute
Market: Trending sessions
Stop-loss: Below EMA20 or engulfing candle
Target: 1:1.5 – 1:2 R:R or EMA10 trailing
Pivot Points Detector - ATR basedThis pivot points detector is a precision-tuned momentum and structural pivot detector designed specifically for high-frequency scalpers (like those trading ES or NQ on the 15-second timeframe).
By combining dynamic volatility filters with structural displacement requirements, it isolates high-conviction reversal points while filtering out the "noise" of lower-timeframe chop.
How It Works
This indicator utilizes a three-gate logic system to ensure that only the most significant market turns are highlighted:
Gate 1: The ATR Momentum Break
The system monitors an ATR (12 / 2.0) trailing stop. A potential pivot is only identified when the price successfully closes across this volatility line, proving that immediate momentum has shifted.
Gate 2: Absolute Structural Anchor
Once a trend change is triggered, the indicator performs a 60-bar retrospective scan (approximately 15 minutes of data) to identify the absolute Highest High or Lowest Low that initiated the move. This pins the marker to the "Source" of the trend rather than the signal bar itself.
Gate 3: The Persistence Proof (Faded vs. Solid)
To prevent "fake outs," the indicator uses a unique faded logic:
Faded Triangle: Appears instantly at the pivot source as a "potential" setup.
12-Tick Run: The triangle only turns Solid if the price travels 12 ticks from that absolute pivot without crossing back over the ATR trail.
Auto-Deletion: If the momentum fails and the ATR trail is breached before the 12-tick target is hit, the faded triangle is automatically wiped from the chart.
Key Features
Clean Visuals: Triangles are printed with a 2-tick offset from the candle wicks for maximum readability.
Label Memory Management: The script maintains a history of the last 200 triangles, ensuring performance stability during long trading sessions.
Fully Customizable: Users can adjust the ATR multiplier, the structural lookback window, the tick-confirmation target, and all visual colors directly from the settings menu.
Trend-Change Focus: Unlike standard Zig-Zags that repainting or mark every wiggle, this tool only prints a marker when a formal ATR trend flip occurs.
Best Use Case: This tool is built for the scalper who needs a reliable "Hard Level" for stop-loss management and re-entry identification. When a triangle turns Solid, it represents a verified structural floor or ceiling that has shown displacement strength.
DR Pattern Strategy Beta1DR Pattern Strategy Beta1
Test only
DR Pattern Strategy Beta1
Test only
DR Pattern Strategy Beta1
Test only
Advanced Position Sizer With RROne can add fund size and Risk % and it will calculate SL And TPs as per recent Price
Ctrace Silver Recovery Setup (EMA + BB + RSI Alert)Custom indicator for Silver trading. This script includes 50 EMA & 200 EMA for trend direction, Bollinger Bands for volatility, and a custom Yellow Candle Alert when RSI drops below 30 (Oversold) to signal potential recovery.
Buyer/Seller Winner Volume MegartVolume.
Shows the predominance of Buyers/Sellers.
Displays the average volume line.
The candle body color indicates a winner, the candle axis color indicates a loser.
Total height indicates total volume.
Educational Market Structure & Trend Context🔍 Overview
This time-limited indicator is designed for educational and analytical purposes only. It helps users visually study price structure behavior and trend context by marking key structural points on the chart and overlaying a trend reference line. The indicator does not generate trading signals, predictions, or recommendations.
⚙️ How the Indicator Works
The script analyzes price action over a user-defined lookback period to identify local structural points:
Higher Highs within the selected range
Lower Lows within the selected range
These points are plotted as simple visual markers to help users understand how price is evolving over time.
In addition, a moving average is applied to provide broader trend context.
🟢 Green Markers (Structure Strength)
Appear when price forms a local higher high within the lookback window
Represent relative strength in price structure
They are not buy signals and do not indicate future movement
🔴 Red Markers (Structure Weakness)
Appear when price forms a local lower low within the lookback window
Represent relative weakness in price structure
They are not sell signals and do not indicate reversals
➖ Grey Line (Trend Context Line)
This line is a moving average calculated over a fixed period
It provides trend context only, helping users visually distinguish between upward and downward environments
It does not act as support, resistance, or entry guidance
🎨 Background Shading (Optional Context)
A subtle background color may appear depending on price position relative to the trend line
This shading is purely visual context, not a signal or confirmation
🎯 Purpose & Benefits
Helps users study market structure in a clean and simple way
Encourages price-action awareness instead of signal dependency
Supports manual analysis, learning, and chart reading skills
Keeps the chart minimal, non-predictive, and professional
⚠️ Important Notes
This indicator does not provide buy/sell signals
No targets, stop levels, or profit expectations are included
Past structure points do not predict future outcomes
Users should apply their own analysis and risk management
Donchian Channels (Closing Price)The original Donchian Channel uses the highs and lows to plot.
For this indicator, it's based on the closing price. Useful for those who want to identify a breakout that's based on the closing price.
Altangadas Megad //@version=5
indicator("VWAP/MVWAP/EMA Precise Final", overlay = true)
// --- 1. Signal Settings ---
vwapLength = input.int(1, title="VWAP Length", minval=1)
emaLength1 = input.int(7, title="Signal EMA 1 (7)", minval=1)
emaLength2 = input.int(25, title="Signal EMA 2 (25)", minval=1)
mvwapLength = input.int(21, title="MVWAP Length", minval=1)
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- 2. Trend EMA Settings ---
ema50Length = input.int(50, title="Trend EMA 50")
ema100Length = input.int(100, title="Trend EMA 100")
ema200Length = input.int(200, title="Trend EMA 200")
ema800Length = input.int(800, title="Institutional EMA 800")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, ema50Length)
ema100 = ta.ema(close, ema100Length)
ema200 = ta.ema(close, ema200Length)
ema800 = ta.ema(close, ema800Length)
// --- Plotting Lines ---
plot(cvwap, color=color.blue, linewidth=2, title="VWAP", style=plot.style_linebr)
plot(mvwap, color=color.fuchsia, linewidth=2, title="MVWAP", style=plot.style_linebr)
plot(ema1, color=color.new(color.yellow, 50), title="EMA 7")
plot(ema2, color=color.new(color.orange, 50), title="EMA 25")
plot(ema50, color=color.green, linewidth=1, title="EMA 50")
plot(ema100, color=color.blue, linewidth=1, title="EMA 100")
plot(ema200, color=color.gray, linewidth=2, title="EMA 200")
plot(ema800, color=color.yellow, linewidth=4, title="EMA 800")
// --- Signal Logic (Анхны огтлолцол дээр нэг удаа сигнал өгөх) ---
// LONG: EMA болон VWAP бүгд MVWAP-аас дээш гарахад
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
// SHORT: EMA болон VWAP бүгд MVWAP-аас доош ороход
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Зөвхөн төлөв өөрчлөгдөх мөчийг барих
longTrigger = longCond and not longCond and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond and (rsiValue > (100 - rsiLimit))
// --- Tiny Signals ---
plotshape(longTrigger, title="L", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny, text="L")
plotshape(shortTrigger, title="S", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny, text="S")
// --- Alerts ---
alertcondition(longTrigger, title="Long Alert", message="XAUUSD: LONG!")
alertcondition(shortTrigger, title="Short Alert", message="XAUUSD: SHORT!")
Position Size Gev_Risk ($)
The amount of money you are willing to lose if the stop-loss is hit.
Base Stop Price
The stop-loss price you set. The stop is recalculated in real time as price moves.
Fee (%) round-trip
Estimated total trading fees for opening and closing the position.
Stop Mode
With Buffer: adds extra distance to the stop, resulting in a smaller position size
No Buffer: uses the Base Stop Price exactly as entered
Stop Buffer (%)
The percentage added to the stop distance when Stop Mode is set to With Buffer.
Live adjustment behavior
The stop price updates continuously as price moves, and the position size is recalculated live to stay aligned with the selected Risk ($).






















