MS TRADING (STRATEGY)This indicator is designed to help traders identify market trend, key support & resistance levels, and high-probability trade zones.
It combines moving averages and price structure to provide clear visual signals directly on the chart.
This tool can be used for scalping, intraday, and swing trading across Forex, Crypto, and Indices.
⚠️ Disclaimer: This indicator is for educational purposes only and should not be considered financial advice. Always use proper risk management.
Индикаторы и стратегии
Gartley + RSI Div + CDC ActionZone Alert//@version=5
indicator("Gartley + RSI Div + CDC ActionZone Alert", overlay=true)
// --- 1. CDC Action Zone Logic ---
ema12 = ta.ema(close, 12)
ema26 = ta.ema(close, 26)
isBlue = close > ema12 and ema12 < ema26
isGreen = ema12 > ema26
cdcSignal = isBlue or isGreen
// --- 2. RSI Bullish Divergence Logic ---
rsiVal = ta.rsi(close, 14)
lbR = 5 // Lookback Left
rbR = 5 // Lookback Right
minLow = ta.pivotlow(rsiVal, lbR, rbR)
isDiv = false
if not na(minLow)
prevLow = ta.valuewhen(not na(minLow), minLow , 0)
prevPrice = ta.valuewhen(not na(minLow), low , 0)
if rsiVal > prevLow and low < prevPrice
isDiv := true
// --- 3. Gartley Approximation (D-Point Focus) ---
// ส่วนนี้ใช้ ZigZag พื้นฐานเพื่อหาจุดกลับตัว (Simplified for Alert)
sz = input.int(10, "ZigZag Sensitivity")
ph = ta.pivothigh(high, sz, sz)
pl = ta.pivotlow(low, sz, sz)
// เงื่อนไขรวม (Combo Strategy)
// ราคาอยู่ที่จุดต่ำสุดใหม่ (Potential D) + RSI ขัดแย้ง + CDC เริ่มเปลี่ยนสี
buyAlert = isDiv and cdcSignal and not na(pl)
// --- การแสดงผลบนกราฟ ---
plotshape(buyAlert, title="Gartley-CDC Buy", style=shape.labelup, location=location.belowbar, color=color.green, text="BUY SETUP", textcolor=color.white, size=size.small)
// วาดเส้น EMA สำหรับ CDC
plot(ema12, color=color.red, linewidth=1)
plot(ema26, color=color.blue, linewidth=1)
// --- ระบบการแจ้งเตือน (Alerts) ---
if buyAlert
alert("SPA Style Setup Found: Gartley D-Point + RSI Div + CDC Signal!", alert.freq_once_per_bar)
SMC Structure + HTF Levels + VolatilityDescription: This script is a comprehensive "Smart Money Concepts" (SMC) toolkit designed to filter out market noise and focus only on the Major Market Structure. It combines structural analysis, multi-timeframe key levels, and volatility tracking into a single chart overlay.
Unlike standard fractal indicators that clutter the chart with every minor pivot, this script uses a "Retroactive" logic system to only mark significant Higher Highs (HH), Higher Lows (HL), Lower Lows (LL), and Lower Highs (LH) that confirm a trend break.
Key Features
1. Major Structure Mapping (Retroactive Logic)
The Problem: Standard indicators often mark a "Lower High" too early, only for price to continue higher.
The Solution: This script waits for a Major Low to be broken (confirmed break of structure) before identifying the peak that caused it. It then "looks back" and retroactively labels that peak as the valid Lower High (LH).
Result: You get a clean chart that shows only the true structural legs of the trend, filtering out internal sub-swings and fake-outs.
2. Multi-Timeframe (MTF) Steplines
Automatically plots the previous highs and lows from higher timeframes:
PDH / PDL: Previous Day High & Low (Blue)
PWH / PWL: Previous Week High & Low (Orange)
PMH / PML: Previous Month High & Low (Purple)
These act as major magnet levels for price targets or reversal zones.
3. Volatility Regimes (Expansion vs. Consolidation)
Uses Bollinger Band Width to analyze market energy.
Green Background (Expansion): Volatility is above average. The market is moving fast (breakout or trend).
Gray Background (Consolidation): Volatility is below average. The market is squeezing, indicating a potential big move is building up.
How to Use It
Trend Following: Look for price to form a HL (Higher Low) in an uptrend. Wait for the background to turn Gray (Consolidation), then enter when it turns Green (Expansion) as price breaks upward.
Reversals: Watch for price to hit a PWH (Previous Week High). If a LH (Lower High) label appears shortly after, it confirms the reversal is valid.
Stop Placement: Use the most recent HL or LH labels as safe zones for stop-loss placement, as these represent protected structural points.
Settings
Swing Length: Adjusts how sensitive the structure detection is (Default: 5). Increase this number to see even longer-term structure.
Colors: Fully customizable colors for Bullish/Bearish structure, HTF lines, and Volatility zones.
Show/Hide: You can toggle off any element (like the Monthly levels or Volatility background) to keep your chart clean.
Daily Weekly Monthly Highs & Lows [Line breaks]This indicator, "Daily Weekly Monthly Highs & Lows ", is an advanced technical analysis tool designed to identify and project historical liquidity levels (Highs and Lows) from multiple timeframes directly onto the current chart.
1. Main Purpose
The indicator automates the plotting of previous Daily (D), Weekly (W), and Monthly (M) highs and lows. It not only marks the level but also offers future projections and a visual breakout system, allowing the trader to quickly identify which levels are still "virgin" and which have already been mitigated by price.
2. Features and Settings
A. Timeframe Segmentation
Each period (Daily, Weekly, Monthly) has its own independent set of settings:
Enable/Disable: Enables or disables the visualization for each specific timeframe.
Lookback: Defines how many previous periods will be plotted (e.g., the last 5 daily highs).
Visual Customization: Allows you to change colors, widths, and line styles (Solid, Dotted, Dashed) individually for active and broken levels.
B. Projection System and Style
Show Projections: Extends lines ahead of the current price (offset to the right), making it easier to visualize future targets or support/resistance zones.
Show Gradient: Applies a transparency effect based on the age of the level. Newer levels are more opaque, while older levels gradually become more transparent.
Hide Broken Levels Entirely: A "cleanup" option that completely removes the line and label from the chart as soon as the price reaches it, leaving only the unmitigated levels.
C. Label Management
Labels identify levels (e.g., PDH1 for Previous Daily High 1).
Anti-Overlap Offset: Intelligent logic that shifts labels from different timeframes to prevent them from overlapping each other. 3. Internal Logic and Processing
The script uses a function to accurately retrieve the Maximum, Minimum, and Time data from the upper periods, ensuring that the level is drawn correctly as soon as the new period begins.
Break Monitoring: For each candle, the script checks if the current price has exceeded the line. If there is a break: The original line is closed and a new line (with a "Break" style) is started from that point.
Memory Management: Automatically removes older objects that exceed the user-defined lookback limit, keeping the chart lightweight and performant.
4. Practical Visualization
Active Level: Line with a solid/strong color and identified label.
Broken Level: The line changes to a softer color (usually dark gray/transparent) and the label follows this change, signaling that the liquidity of that point has already been captured.
Break Point: The indicator visually marks the exact moment (candle) when the level was invalidated.
________________________________________________________________________________
🎯 Practical Manual: Previous DWM HL
This guide will help you configure the indicator for maximum visual clarity and understand the signals it plots on the chart.
1. Visibility Settings (Timeframes)
The indicator is intelligent and adapts to your current chart to avoid clutter:
Daily: Visible only on intraday timeframes (e.g., 1 min to 4 h).
Weekly: Visible on intraday charts and the Daily chart.
Monthly: Visible on all timeframes except the Monthly chart itself.
2. Understanding the Visual Controls
Lookback: Defines the indicator's "memory." If you set it to 5 on the Daily, you will see the highs/lows of the last 5 days.
Show Projections: When activated, extends the lines to the right (empty space on the chart), allowing you to see support/resistance levels before the price reaches them.
Show Gradient: Older levels become more transparent. This helps you focus on what is recent and relevant.
Hide Broken Levels Entirely: If you want a "clean" chart, enable this option. It automatically deletes any line touched by the price.
3. Anatomy of a Level
Continuous/Original Line: Represents a level that has not yet been mitigated (pending liquidity).
Post-Break Line (Color After Break): When the price crosses a level, the line changes color and style (e.g., from solid to dotted) to show that that level has already been "tested" or liquidity has been captured.
Labels (PDH, PWH, PMH):
PDH/PDL: Previous Daily High/Low.
PWH/PWL: Previous Weekly High/Low.
PMH/PML: Previous Monthly High/Low.
The number next to it (e.g., PDH1) indicates the distance: 1 is the previous day, 2 is two days ago, and so on.
Common Strategies with the Indicator
A. Liquidity Sweeps
Many traders look for reversals after the price "clears" a previous high or low.
How to see it on the indicator: The price rises above a PWH (Weekly High), the line changes to the "Break" color, and the price quickly returns below the level. This suggests a buy liquidity capture to initiate a sell movement.
B. Trend Continuation (Break & Retest)
How to see it on the indicator: The price breaks a PMH (Monthly High) strongly and then returns to test exactly the "Break" line as support before continuing to rise.
C. Take Profit Targets
How to see it on the indicator: If you are long, the Previous High Projections (PDH or PWH) serve as natural price "magnets" and great points to take profit, as there are usually stop orders above these levels.
Pro Tip: Use "Anti-Overlap Offset" if you are using many Lookbacks at the same time. It will organize the level names in a staggered fashion so you can read them all without them overlapping.
Relevant Levels RitradeOverview This indicator plots key price levels (Daily, Weekly, Monthly) with a unique "Smart Overlap" system. It is designed to keep charts clean by offsetting lines to the right of the price action and preventing labels from covering each other when price levels are identical.
Key Features
Smart Overlap Prevention: If two levels (e.g., Previous Day High and Weekly High) are at the exact same price, the script automatically shifts the second line to the right so both are visible side-by-side.
Origin Trace Lines: Faint, dotted grey lines connect the floating labels back to the specific candle where that High, Low, or Open actually occurred. This helps visualize exactly when the level was created.
Future Offset: Lines are drawn into the future (offset from the current bar) to avoid cluttering your analysis on current candles.
Exact Timing: The trace lines use precise time coordinates to find the exact swing high/low candle.
Included Levels (Toggleable)
PDH / PDL: Previous Day High & Low
PWH / PWL: Previous Week High & Low
DO / WO / MO: Daily, Weekly, and Monthly Opens
Settings You can customize the line colors, the offset distance (how far right the lines sit), the length of the lines, and the gap between overlapping lines.
Prime Minute MarkerPrime Minute Marker – Description
This script marks specific prime-numbered minutes directly on the chart using clean, plain text (no boxes or shapes).
It is designed for time-based market observation, helping traders spot recurring reactions, swings, and behavioral patterns that tend to appear at specific minutes within the hour.
The marker:
Displays only selected prime minutes
Uses simple text labels for a clutter-free chart
Does not interfere with price action
Works on any intraday timeframe
Is especially useful for swing points, liquidity reactions, and auction-based analysis
This tool is meant for observation and confluence, not as a standalone trading signal.
Prime Minute Marker (Selected)Prime Minute Marker – Description
This script marks specific prime-numbered minutes directly on the chart using clean, plain text (no boxes or shapes).
It is designed for time-based market observation, helping traders spot recurring reactions, swings, and behavioral patterns that tend to appear at specific minutes within the hour.
The marker:
Displays only selected prime minutes
Uses simple text labels for a clutter-free chart
Does not interfere with price action
Works on any intraday timeframe
Is especially useful for swing points, liquidity reactions, and auction-based analysis
This tool is meant for observation and confluence, not as a standalone trading signal.
Global OrderFlow CVD Div (USDT+USD + Multi-OI) [TheActualSnail]Global OrderFlow CVD Div (USDT+USD + Multi-OI)
Global OrderFlow CVD Div is a multi-venue order flow proxy that aggregates CVD (Cumulative Volume Delta) from several exchanges (USDT perpetuals + USD spot) and prints pivot-based divergence labels on the price chart. Optionally, it can filter those divergence labels using Open Interest (OI) trend for extra confluence.
This is designed as a “global read” of participation: perps for positioning, spot for real flow, and OI for leverage context.
What this indicator shows
1) Delta (Orderflow proxy)
Because true bid/ask orderflow isn’t available natively in Pine for most markets, this script uses an intrabar OHLCV proxy:
If intrabar close > open → volume counted as “buy”
If intrabar close < open → volume counted as “sell”
If doji → it falls back to close vs previous close
This happens on a Lower TF (intrabar timeframe), then sums intrabar volume inside each chart candle.
2) CVD (Cumulative Volume Delta)
CVD is the cumulative sum of Delta:
Positive CVD suggests net aggressive buying (proxy)
Negative CVD suggests net aggressive selling (proxy)
You can plot:
AVG CVD (aggregated signal)
Optionally each exchange’s CVD separately (debug / comparison)
3) Divergence labels (pivot-based)
The script marks divergences at confirmed pivots:
Regular Bullish Divergence (Bull Div)
Price makes a Lower Low
CVD makes a Higher Low
Regular Bearish Divergence (Bear Div)
Price makes a Higher High
CVD makes a Lower High
Optional:
Hidden Bullish Divergence (trend continuation type)
Price makes a Higher Low
CVD makes a Lower Low
Hidden Bearish Divergence (trend continuation type)
Price makes a Lower High
CVD makes a Higher High
All labels are drawn at the pivot candle (the pivot is confirmed after Pivot length bars).
Inputs & settings explained
Calculation
Lower TF for intrabars
Sets the timeframe used to build the intrabar delta proxy (ex: 30s / 1m / 3m).
Smaller = more precise, but heavier CPU.
Delta mode
Delta = raw (buy vol − sell vol)
Delta % = delta normalized by total intrabar volume (helps when mixing sources with different volume scales)
CVD reset
Controls when CVD is reset back to 0:
None = continuous cumulative
Daily / Weekly / Monthly = resets at timeframe boundary
Fixed time = resets at a specific hour/min in your chart’s timezone
Session (regular) = uses TradingView’s regular session start
Fixed time hour / min (only used when reset = Fixed time)
CVD Sources (USDT perps + USD spot)
Each source has two controls:
✅ Checkbox = enable/disable that venue in the aggregation
Symbol picker = the actual TradingView symbol used
Defaults include:
USDT perps (Binance/Bybit/OKX/Bitget)
USD spot (Binance USD, Coinbase USD, optionally Kraken/Bitstamp)
Blend method
Average = normalizes by number of enabled sources (recommended for “global” confluence)
Sum = adds them directly (can overweight high-volume venues)
Tip: If a symbol is invalid on your TradingView plan/region, just disable it or change it to a valid ticker.
Open Interest (Perps only)
OI is optional and used as a divergence “filter” (not required).
Enable OI filter = turn OI logic on/off
Per-exchange OI toggles + symbol pickers (Binance/Bybit/OKX/Bitget)
OI blend
Average = average OI from enabled sources (recommended)
Sum = summed OI
OI trend length
Lookback for rising/falling detection
Filter labels by OI
None = no filter
Require OI Rising = only show divergence labels when blended OI is rising
Require OI Falling = only show divergence labels when blended OI is falling
Note: Coinbase has no OI feed here, so OI is perps-only by design.
Divergences
Enable divergence labels = on/off
Pivot length = pivot strength (higher = fewer, stronger signals; lower = more signals)
Use wicks for pivots
ON = pivots use High/Low (more sensitive)
OFF = pivots use Close (more conservative)
Min CVD difference (filter)
Requires the CVD pivot value to differ from the previous CVD pivot by at least this amount.
Also show hidden divergences
Enables hidden divergence labels.
Visuals
Show AVG Delta histogram (pane) = plots aggregated delta columns
Show AVG CVD (pane) = plots the aggregated CVD line
Show each CVD (pane) = plots each venue’s CVD line (useful for checking alignment)
Show AVG OI (pane) = plots blended OI (if enabled)
Show zero line (pane) = plots the 0 baseline
Up/Bear colors = colors used for plots and labels
“Icons” you see in the Inputs panel
TradingView uses common UI controls:
✅ Checkbox → enable/disable a feature or a specific exchange/OI feed
🔽 Dropdown → choose modes like Reset type / Delta mode / Blend method / OI filter
🕒 Timeframe selector → choose Lower TF for intrabars
🎨 Color swatch → change label/plot colors
✏️ Symbol picker → choose the exact exchange ticker used by the script
How to use it (practical workflow)
Pick your sources
Keep 2–4 major venues enabled for clean signal (ex: Binance/Bybit/OKX + Coinbase).
If you see “Invalid symbol”, replace the symbol or turn that source off.
Set intrabar precision
Start with 1m lower TF.
If you need more detail and your chart is smooth, try 30s.
Tune divergence sensitivity
Pivot length 5–10 is a good range.
Use wicks ON for earlier signals; OFF for stricter confirmation.
Add confluence
Use the OI filter to avoid divergences that occur with the “wrong” leverage context.
Combine with HTF levels, market structure, liquidity zones, VWAP/POC/NPOC, etc.
Important notes / limitations
This is a proxy, not true bid/ask delta.
Different exchanges report volume differently; aggregation helps but won’t be perfect.
Pivots are confirmed, so labels appear after the pivot is formed (pivotLen bars later).
More enabled sources + smaller intrabar TF = heavier calculations.
Not financial advice
This indicator is for educational/informational purposes only and does not constitute financial advice. Markets are risky. Always validate signals with other confluences, use proper risk management, and make your own decisions.
Cloud Levels Pro Live - XAUUSD 1mFree to try. This indicator connects to an automated trading system that executes trades for you.
Setup:
Add this indicator
Sign up free at cloudlevelspro.com
Connect your broker
Trades execute automatically
You get: Auto-trading dashboard, broker integration, alerts and analytics.
👉 Start free:
cloudlevelspro.com
No analysis. No chart watching. Just results.
1 minute ago
Release Notes
Cloud Levels Pro Live: The Ultimate Prop Firm Automation Engine
STOP TRADING ALONE. START EXECUTING WITH INSTITUTIONAL POWER. 🚀
Cloud Levels Pro Live is not just an indicator—it is a full-scale Automated Trading Ecosystem. We have decoded the market maker's playbook to bring you a system that identifies high-probability reversals, liquidity sweeps, and institutional kill zones in real-time.
🔥 WHY THIS IS DIFFERENT: Most indicators just draw lines. Cloud Levels Pro Live executes. When paired with our custom Bridge, this system automates your TradingView alerts directly to your cTrader account with sub-second latency.
💎 CORE FEATURES:
Institutional Confluence Matrix: 8-factor analysis including Order Flow, Momentum, and Volatility scores (-100 to +100).
"Nuclear" Signals: High-conviction setups that filter out market noise.
Dynamic Cloud Structure: Visualizes real-time support/resistance zones based on volume profile.
Prop Firm Ready: Built-in risk management and execution speeds designed to pass challenges.
⚙️ AUTOMATION CAPABILITY: Unlock the full power of "Auto-Pilot" mode. No more staring at charts for 12 hours a day. Let the math do the work.
👇 UNLOCK THE AUTOMATION BRIDGE 👇 To connect this indicator to your live or prop firm broker, access the Command Center & Bridge here: 👉 cloudlevelspro.com
Cloud Levels Pro Live - BTCUSD 1mFree to try. This indicator connects to an automated trading system that executes trades for you.
Setup:
Add this indicator
Sign up free at cloudlevelspro.com
Connect your broker
Trades execute automatically
You get: Auto-trading dashboard, broker integration, alerts and analytics.
👉 Start free:
cloudlevelspro.com
No analysis. No chart watching. Just results.
1 minute ago
Release Notes
Cloud Levels Pro Live: The Ultimate Prop Firm Automation Engine
STOP TRADING ALONE. START EXECUTING WITH INSTITUTIONAL POWER. 🚀
Cloud Levels Pro Live is not just an indicator—it is a full-scale Automated Trading Ecosystem. We have decoded the market maker's playbook to bring you a system that identifies high-probability reversals, liquidity sweeps, and institutional kill zones in real-time.
🔥 WHY THIS IS DIFFERENT: Most indicators just draw lines. Cloud Levels Pro Live executes. When paired with our custom Bridge, this system automates your TradingView alerts directly to your cTrader account with sub-second latency.
💎 CORE FEATURES:
Institutional Confluence Matrix: 8-factor analysis including Order Flow, Momentum, and Volatility scores (-100 to +100).
"Nuclear" Signals: High-conviction setups that filter out market noise.
Dynamic Cloud Structure: Visualizes real-time support/resistance zones based on volume profile.
Prop Firm Ready: Built-in risk management and execution speeds designed to pass challenges.
⚙️ AUTOMATION CAPABILITY: Unlock the full power of "Auto-Pilot" mode. No more staring at charts for 12 hours a day. Let the math do the work.
👇 UNLOCK THE AUTOMATION BRIDGE 👇 To connect this indicator to your live or prop firm broker, access the Command Center & Bridge here: 👉 cloudlevelspro.com
Drawdown MDD desde ATH (close)Drawdown indicator from ATH wtih maximum drawdown.
Indicates the current percentage of both
Reliable 4H EST Candle Marker (All Timeframes)plots out 4 hour candle if you trying to mark out 2am, 6am, 10am etc
Session Time Lines (NY Time)This clean indicator draws vertical dashed lines on the chart at key session times in New York time:
7:00 PM – Previous day session start
3:00 AM – Overnight session
9:30 AM – NY market open
It automatically removes the previous session’s lines when a new 7:00 PM occurs, keeping the chart clean. Lines are drawn directly on the price chart (overlay), making it easy to see market session transitions.
Works on intraday charts
Time-based vertical lines in New York time (DST-safe)
Shows only one cycle at a time for clarity
Non-intrusive, no calculations or trading signals
bezgincan_BPA Integrated Market Analyzer (V6) -
Why?
This is an advanced oscillator powered by the v6 engine that combines the four main pillars of technical analysis —Volume, Trend, Volatility , and Momentum —into a single mathematical model. It eliminates chart clutter, allowing you to monitor market strength, speed, and saturation from a single panel.
Fourfold Analysis Logic:
Trend: Calculates the main direction and slope of the price using linear regression slope.
Momentum: Measures the strength of price movement using RSI-based normalized momentum data.
Volatility: Compares current volatility to historical averages via the ATR ratio.
Volume: By relating volume increases to momentum, it confirms the reality of the motion.
How to Use?
The display operates on a fixed, normalized scale between -100 and +100 :
Zero Line Intersections: When the BPA line crosses above 0 (Green Area) , it indicates increased buying pressure, and when it crosses below 0 (Red Area), it indicates increased selling pressure.
Extremes (Yellow Background): When the indicator rises above +70 or falls below -70 , it means the market is "overheated". These zones signal that the trend is exhausted and a correction (or profit-taking) may be imminent.
Signal Labels: The triangles on the chart represent zero-line intersections (trend reversal confirmation).
Why this indicator?
Normalized Scale: Unlike classic indicators, it always stays within the -100/+100 range, providing visual consistency.
Filtered Data: It doesn't just look at price; it incorporates volume and volatility to help filter out "fake" patterns.
Pine Script v6: Performs fast and optimized calculations with the latest Pine Script engine.
kalp 2trPeriodPrimary = input.int(18, 'Primary ST ATR Period', group="SuperTrend")
multiplierPrimary = input.float(4.0, 'Primary ST Multiplier', group="SuperTrend")
atrPeriodSecondary = input.int(9, 'Secondary ST ATR Period', group="SuperTrend")
multiplierSecondary = input.float(2.0, 'Secondary ST Multiplier', group="SuperTrend")
atrPeriodTertiary = input.int(12, 'Tertiary ST ATR Period', group="SuperTrend")
multiplierTertiary = input.float(3.0, 'Tertiary ST Multiplier', group="SuperTrend")
// MACD Group
fastLength = input.int(24, 'MACD Fast Length', group="MACD")
slowLength = input.int(52, 'MACD Slow Length', group="MACD")
signalLength = input.int(9, 'MACD Signal Smoothing', group="MACD")
// EMA Group
tfEMA = input.timeframe("60", "EMA Timeframe (Global)", group="EMAs")
ema1Len = input.int(9, 'EMA 1 Length', group="EMAs")
ema2Len = input.int(21, 'EMA 2 Length', group="EMAs")
ema3Len = input.int(27, 'EMA 3 Length', group="EMAs")
ema4Len = input.int(50, 'EMA 4 Length', group="EMAs")
ema5Len = input.int(100, 'EMA 5 Length', group="EMAs")
ema6Len = input.int(150, 'EMA 6 Length', group="EMAs")
ema7Len = input.int(200, 'EMA 7 Length', group="EMAs")
// Visuals & ORB Group
showVwap = input.bool(true, 'Show VWAP?', group="Visuals")
showORB = input.bool(true, "Show ORB (Current Day Only)", group="ORB Settings")
orbTime = input.string("0930-1000", "ORB Time Range", group="ORB Settings")
orbTargetMult1 = input.float(1.0, "Target 1 Mult", group="ORB Settings")
Manus KI TradingManus Machiene Learning Beast – Indicator Description
Settings
Use 1h Chart
Use Regime filter: 0.5
Use ADX 20
Use SMA 200
and be happy...
Overview
Manus Machiene Learning Beast is an advanced TradingView indicator that combines Machine Learning (Lorentzian Classification) with trend, volatility, and market regime filters to generate high-quality long and short trade signals.
The indicator is designed for rule-based, disciplined trading and works especially well for set-and-forget, semi-automated, or fully automated execution workflows.
⸻
Core Concept
At its core, the indicator uses a machine-learning model based on a modified K-Nearest Neighbors (KNN) approach.
Instead of standard Euclidean distance, it applies Lorentzian distance, which:
• Reduces the impact of outliers
• Accounts for market distortions caused by volatility spikes and major events
• Produces more robust predictions in real market conditions
The model does not attempt to predict exact tops or bottoms.
Instead, it estimates the probable price direction over the next 4 bars.
⸻
Signal Logic
Long Signals
A long signal is generated when:
• The ML model predicts a positive directional bias
• All enabled filters are satisfied
• A new directional change is detected (non-repainting)
• Optional trend filters (EMA / SMA) confirm the direction
• Optional kernel regression confirms bullish momentum
📍 Displayed as a green label below the bar
Short Signals
A short signal is generated when:
• The ML model predicts a negative directional bias
• Filters confirm bearish conditions
• A new directional change occurs
• Trend and kernel filters align
📍 Displayed as a red label above the bar
⸻
Filters & Components
All filters are modular and can be enabled or disabled individually.
1. Volatility Filter
• Avoids trading during extremely low or chaotic volatility conditions
2. Regime Filter (Trend vs Range)
• Attempts to filter out sideways markets
• Especially important for ML-based systems
3. ADX Filter (Optional)
• Trades only when sufficient trend strength is present
4. EMA / SMA Trend Filters
• Classic trend confirmation (e.g., 200 EMA / 200 SMA)
• Ensures trades are aligned with the higher-timeframe trend
5. Kernel Regression (Nadaraya-Watson)
• Smooths price behavior
• Acts as a momentum and trend confirmation filter
• Can be used in standard or smoothed mode
⸻
Moving Average Overlays
For visual market context, the indicator includes optional overlays:
• ✅ SMA 200
• ✅ HMA 200
Both can be toggled via checkboxes and are visual aids only, unless explicitly enabled as filters.
⸻
Exit Logic
Two exit methods are available:
1. Fixed Exit
• Trades close after 4 bars
• Matches the ML model’s training horizon
2. Dynamic Exit
• Uses kernel regression and signal changes
• Designed to let profits run in strong trends
⚠️ Recommended only when no additional trend filters are active.
⸻
Backtesting & Trade Statistics
The indicator includes an on-chart statistics panel showing:
• Win rate
• Total trades
• Win/Loss ratio
• Early signal flips (useful for identifying choppy markets)
⚠️ This is intended for calibration and optimization only, not as a replacement for full strategy backtesting.
⸻
Typical Use Cases
• Swing trading (M15 – H4)
• Rule-based discretionary trading
• Set-and-forget trading
• TradingView alerts → MT4/MT5 → EA execution
• Prop-firm trading (e.g. FTMO), with proper risk management
⸻
Important Disclaimer
This indicator:
• ❌ does not guarantee profits
• ❌ is not a “holy grail”
• ✅ is a decision-support and structure tool
It performs best when:
• Combined with strict risk management (e.g. ATR-based stops)
• Used in trending or expanding markets
• Executed with discipline and consistency
MIZAN v11: L-Score ResonanceTitle: MIZAN v11: L-Score Resonance Engine
Description:
MIZAN-L is a next-generation oscillator developed by Mizan Lab, designed to solve the shortcomings of traditional RSI. It utilizes the L-Score Formula, which calculates the "Ontological Consistency" (OCC) of a price movement by synthesizing three dimensions of market physics:
Velocity (CCI): The speed of the price action.
Position (RSI): The relative saturation level.
Fuel (CMF): The volume/mass behind the move.
Unlike standard oscillators that only look at price, MIZAN-L weighs Volume (Fuel) heavily (default 45%). This means a price rise without volume will NOT spike the oscillator, filtering out fake-outs and "bull traps."
Key Features:
L-Score Algorithm: A weighted average of CCI (35%), RSI (20%), and CMF (45%).
Mizan Smoothing: Uses a proprietary WMA filter to eliminate noise, resulting in a smooth, easy-to-read line that changes color based on trend direction (Cyan = Bullish, Orange = Bearish).
The SMC Floor (Level 43):
Through extensive analysis, we have identified Level 43 as the "Institutional Cost Basis" or "Whale Floor."
When the oscillator drops to the green 43 line and bounces, it often signals that Smart Money (SMC) is accumulating positions.
Dynamic Background Zones:
Green Background: Price is in the bottom 20% of its global range (Cheap/Accumulation Zone).
Red Background: Price is in the top 20% of its global range (Expensive/Distribution Zone).
How to Use:
BUY Signal: Watch for the line to touch or dip below the Green Line (43) and turn Cyan. This is the high-probability SMC entry zone.
SELL Signal: When the line enters the Red Background zone and turns Orange.
Trend Confirmation: If the line is Thick Cyan, the trend is fueled by volume. If it is Thick Orange, distribution is active.
Disclaimer: This tool is for educational purposes only. Developed by Mizan Lab.
Commodities vs Securities RotationAre commodities leading securities (real-asset / inflation tilt), or are securities leading commodities (growth / disinflation tilt)?
It is designed for macro trend context and regime confirmation, not for precise entries.
What it measures
The indicator compares Commodities vs Securities using two selectable modes:
1) Price mode (default)
Securities leg:
- SP:SPX (S&P 500 index) for long history.
Commodities leg:
- A synthetic commodity basket built from long-history futures prices:
- COMEX:GC1! (Gold)
- NYMEX:CL1! (Crude oil)
- NYMEX:NG1! (Natural gas)
- CBOT:ZC1! (Corn)
- CBOT:ZS1! (Soybeans)
How the basket is built:
- Compute log returns for each component.
- Take the average of the enabled component log returns (equal-weight by default).
- Build a cumulative performance index by cumulatively summing the averaged log returns.
Plotted signal:
- Relative performance level: commPerf - spxPerf
- Relative performance change: 1-bar change of that series
You can disable the basket and use a single commodity symbol fallback (default AMEX:DBC) if you prefer.
2) ETF flows mode
The script attempts to compute fund flows as a percent of AUM for a commodity ETF and a securities ETF:
flowPercent = (FUND_FLOWS / AUM) * 100
If that fundamentals data is unavailable for a ticker, the indicator automatically falls back to a realtime proxy:
- OBV, or
- Dollar-volume pressure
The dashboard clearly labels when proxy fallback is active.
How to interpret the signal
- Signal > 0: commodities leading securities.
- Signal < 0: securities leading commodities.
Z-score normalization helps compare regimes across long histories. Often the most useful information is the transition from negative to positive (or vice versa) and sustained regimes rather than small fluctuations around zero.
Recommended starting settings
- Timeframe: D (or W for smoother macro regimes)
- Normalization: Z-score
- Smoothing: 10 to 20
- Commodity basket: ON
- Visual mode: Minimal for a clean signal; Dashboard when validating data status
Visual modes
- Minimal: clean signal + zero line
- Atmosphere: soft shading around the signal for regime feel
- Dashboard: compact table with mode, data status, inversion state, value, and regime label
- Components: plots the two legs (commodity performance vs SPX performance, or flows legs)
Alerts
- Cross above/below 0
- Cross above/below a user threshold
- ETF flows: alert when switching from fundamentals to proxy fallback and when fundamentals are restored
Limitations and caveats
- The synthetic basket is a proxy for broad commodity beta, not a standardized index (equal weights by default).
- Continuous futures (GC1!, CL1!, etc.) can have roll effects; use for regime context rather than precise valuation.
- Fundamentals availability varies by ticker and TradingView data plan; proxy fallback is not the same as true fund flows.
Educational use only. Not financial advice.
Precious Matrix Dynamic Days Script with Net📊 Precious Matrix – Dynamic Days with Net
Precious Matrix – Dynamic Days with Net is a multi-symbol dashboard indicator for TradingView that shows recent daily closes, day-to-day change, and net performance for up to 9 scripts in one clean, compact table.
It’s designed for quick market scanning, relative strength comparison, and short-term trend awareness — without switching charts.
🔹 What This Indicator Does
Displays up to 9 symbols in a single table
Shows:
Last N trading days closes
Daily change (Δ) for each day
Net change + % change over the selected period
Uses color coding:
🟢 Green = Positive move
🔴 Red = Negative move
⚫ Black = Flat / No change
Fully customizable table position, size, borders, and colors
Works on any chart timeframe (data is fetched from Daily timeframe internally)
⚙️ Key Features
✅ Choose number of days back (1 to 5)
✅ Toggle each symbol ON/OFF
✅ Supports up to 9 symbols
✅ Customizable:
Font size (Small / Medium / Large)
Table position (Top/Bottom – Left/Right)
Border width, border color, background color
Vertical offset (move table up/down)
✅ Shows:
Date + Day (Mo, Tu, We, etc.)
Close price
Daily change
Net change + Net %
🧭 How to Use
Add the indicator to any chart.
In settings:
Set “No. of Days Back” (e.g., 3 days)
Choose your symbols (NSE stocks, futures, or any TradingView symbol)
Enable/disable rows using Show Script 1–9
Adjust:
Table position
Font size
Colors and borders
Use the NET Δ column to quickly spot:
Strong performers
Weak performers
Flat / sideways instruments
📈 Who This Is For
Swing traders tracking short-term performance
Intraday traders doing pre-market or watchlist scanning
Investors comparing relative strength across multiple stocks
Anyone who wants a clean, fast, no-chart-switch dashboard
📝 Notes
All values are calculated from the Daily timeframe
Works on any chart timeframe
Net % is calculated from the oldest day in the selected range
Table updates on the last bar
⚠️ Disclaimer
This indicator is for educational and informational purposes only.
It does not provide buy/sell signals and should not be considered financial advice.
Always do your own analysis and risk management.
kalpppppp sirviral mithani
18:05 (7 minutes ago)
to guruji.om@gmail.com
//@version=6
indicator('Triple ST + MACD + 7x MTF EMA + VWAP + ORB + Lux Pivots + AMA', overlay = true, max_labels_count = 500)
//━━━━━━━━━━━━━━━━━━━
// INPUTS
//━━━━━━━━━━━━━━━━━━━
// AMA Signals Group (Zeiierman Style)
showAMA = input.bool(true, "Show AMA Signals", group="AMA Signals")
amaLength = input.int(10, "AMA Length", group="AMA Signals")
amaFast = input.int(2, "AMA Fast Period", group="AMA Signals")
amaSlow = input.int(30, "AMA Slow Period", group="AMA Signals")
// SuperTrend Group
atrPeriodPrimary = input.int(18, 'Primary ST ATR Period', group="SuperTrend")
multiplierPrimary = input.float(4.0, 'Primary ST Multiplier', group="SuperTrend")
// MACD Group
fastLength = input.int(24, 'MACD Fast Length', group="MACD")
slowLength = input.int(52, 'MACD Slow Length', group="MACD")
signalLength = input.int(9, 'MACD Signal Smoothing', group="MACD")
// EMA Group
tfEMA = input.timeframe("60", "EMA Timeframe (Global)", group="EMAs")
ema1Len = input.int(9, 'EMA 1 Length', group="EMAs"), ema2Len = input.int(21, 'EMA 2 Length', group="EMAs")
ema3Len = input.int(27, 'EMA 3 Length', group="EMAs"), ema4Len = input.int(50, 'EMA 4 Length', group="EMAs")
ema5Len = input.int(100, 'EMA 5 Length', group="EMAs"), ema6Len = input.int(150, 'EMA 6 Length', group="EMAs")
ema7Len = input.int(200, 'EMA 7 Length', group="EMAs")
// LuxAlgo Style Pivots (50 Lookback)
showPivots = input.bool(true, "Show Pivot High/Low", group="LuxAlgo Pivots")
pivotLen = input.int(50, "Pivot Lookback", group="LuxAlgo Pivots")
showMissed = input.bool(true, "Show Missed Reversal Levels", group="LuxAlgo Pivots")
// Previous OHLC Group
showPrevOHLC = input.bool(true, "Show Previous Day OHLC?", group="Previous OHLC")
// Visuals & ORB Group
showVwap = input.bool(true, 'Show VWAP?', group="Visuals")
showORB = input.bool(true, "Show ORB", group="ORB Settings")
orbTime = input.string("0930-1000", "ORB Time Range", group="ORB Settings")
//━━━━━━━━━━━━━━━━━━━
// CALCULATIONS
//━━━━━━━━━━━━━━━━━━━
// 1. AMA Calculation (Zeiierman Logic)
fastAlpha = 2.0 / (amaFast + 1)
slowAlpha = 2.0 / (amaSlow + 1)
efficiencyRatio = math.sum(math.abs(close - close ), amaLength) != 0 ? math.abs(close - close ) / math.sum(math.abs(close - close ), amaLength) : 0
scaledAlpha = math.pow(efficiencyRatio * (fastAlpha - slowAlpha) + slowAlpha, 2)
var float amaValue = na
amaValue := na(amaValue ) ? close : amaValue + scaledAlpha * (close - amaValue )
// 2. Pivot Points & Missed Reversals (RECTIFIED: Bool Fix)
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float lastMissedHigh = na
var float lastMissedLow = na
if not na(ph)
lastMissedHigh := ph
if not na(pl)
lastMissedLow := pl
// 3. Custom SuperTrend Function (RECTIFIED: Parenthesis Fix)
f_supertrend(_atrLen, _mult) =>
atr_ = ta.atr(_atrLen)
upperBasic = hl2 + _mult * atr_
lowerBasic = hl2 - _mult * atr_
var float upperFinal = na
var float lowerFinal = na
upperFinal := na(upperFinal ) ? upperBasic : (upperBasic < upperFinal or close > upperFinal ? upperBasic : upperFinal )
lowerFinal := na(lowerFinal ) ? lowerBasic : (lowerBasic > lowerFinal or close < lowerFinal ? lowerBasic : lowerFinal )
var int dir = 1
if not barstate.isfirst
dir := dir
if dir == 1 and close < lowerFinal
dir := -1
else if dir == -1 and close > upperFinal
dir := 1
= f_supertrend(atrPeriodPrimary, multiplierPrimary)
// 4. MACD & 7 MTF EMAs
macdLine = ta.ema(close, fastLength) - ta.ema(close, slowLength)
signal = ta.ema(macdLine, signalLength)
ema1 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema1Len), gaps = barmerge.gaps_on)
ema2 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema2Len), gaps = barmerge.gaps_on)
ema3 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema3Len), gaps = barmerge.gaps_on)
ema4 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema4Len), gaps = barmerge.gaps_on)
ema5 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema5Len), gaps = barmerge.gaps_on)
ema6 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema6Len), gaps = barmerge.gaps_on)
ema7 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema7Len), gaps = barmerge.gaps_on)
// 5. ORB Logic
is_new_day = ta.change(time("D")) != 0
in_orb = not na(time(timeframe.period, orbTime))
var float orbHigh = na, var float orbLow = na
if is_new_day
orbHigh := na, orbLow := na
if in_orb
orbHigh := na(orbHigh) ? high : math.max(high, orbHigh)
orbLow := na(orbLow) ? low : math.min(low, orbLow)
//━━━━━━━━━━━━━━━━━━━
// PLOTTING
//━━━━━━━━━━━━━━━━━━━
// AMA Plots
plot(showAMA ? amaValue : na, "AMA Line", color=amaValue > amaValue ? color.lime : color.red, linewidth=2)
plotshape(showAMA and ta.crossover(amaValue, amaValue ), "AMA BUY", shape.labelup, location.belowbar, color.lime, 0, "BUY", color.black, size=size.small)
plotshape(showAMA and ta.crossunder(amaValue, amaValue ), "AMA SELL", shape.labeldown, location.abovebar, color.red, 0, "SELL", color.white, size=size.small)
Rolling VWAP + Bands (Tighter Option) + 2.35/3.0 Re-entry AlertsRolling VWAP + σ Bands — How to Trade It
This indicator plots a Rolling VWAP (a volume-weighted mean over a fixed bar window) along with standard deviation (σ) bands around that VWAP. The goal is simple:
Quantify “normal” price distance from value (VWAP)
Highlight statistical extremes and pullback zones
Trigger re-entry signals when price returns from extreme deviation back inside key bands (±2.35σ and ±3σ)
It’s designed for scalping and short-term decision support, especially on lower timeframes.
What the Lines Mean
VWAP (Rolling Window)
The VWAP line represents the rolling “fair value” of price, weighted by volume across the lookback window.
In ranges: VWAP acts like a gravity center
In trends: VWAP acts like a dynamic mean that price may pull back toward before continuing
σ Bands (Standard Deviation)
The σ bands show how far price is from VWAP in statistical terms:
±1σ: Normal variation
±1.5σ: Common pullback / continuation zone in trends
±2σ: Extended move / trend stress
±2.35σ: Deep extension (often a “stretched” market)
±3σ: Rare extreme (often emotional moves / liquidation wicks)
The Most Important Feature: 2.35σ and 3σ Re-entry Signals
A Re-entry signal fires when price was outside a band on the previous bar and closes back inside that band on the current bar.
Why this matters:
The market pushed into an extreme zone…
…then failed to stay there
That “failure” often leads to a snap-back toward value (VWAP) or at least toward inner bands.
In general, a 3σ re-entry is stronger than a 2.35σ re-entry, because it represents a more statistically extreme excursion that couldn’t hold.
These are not “magic reversal calls” — they’re high-quality mean-reversion triggers when conditions favor mean reversion.
Regime 1: Contracting Bands = Mean Reversion Environment
What contracting bands imply
When the bands tighten / contract, volatility is compressed. In this environment:
Price tends to oscillate around VWAP
Deviations are more likely to mean revert
Extremes are clearer and usually followed by a return toward value
How to trade mean reversion with this indicator
Core idea: fade extremes and target VWAP / inner bands.
A) Highest quality setups: 2.35σ and 3σ re-entries
These are your “strongest” mean reversion events.
Short bias setup
Price closes outside +2.35σ or +3σ
Then re-enters back below that band (signal)
Typical targets: +2σ → +1.5σ → VWAP (depending on momentum)
Long bias setup
Price closes outside −2.35σ or −3σ
Then re-enters back above that band (signal)
Typical targets: −2σ → −1.5σ → VWAP
Why these work best in contraction:
The market is statistically “stretched”
With low volatility, it’s harder for price to stay extended
Re-entry often starts the “snap-back” leg
B) Scaling / partial targets (optional approach)
If you manage positions actively:
Take partial profits at inner bands
Use VWAP as the “magnet” target when conditions remain range-bound
Risk framing for mean reversion
Mean reversion fails when price keeps walking the band and volatility expands.
Common failure clues:
Bands begin to widen aggressively
Price repeatedly holds outside outer bands
VWAP slope starts to accelerate in one direction
If that starts happening, the market is likely shifting to a trend regime.
Regime 2: Expanding Bands + VWAP Slope = Trending Environment
What trending conditions look like
Trends typically show:
VWAP sloping consistently
Bands expanding (higher volatility)
Price spending more time on one side of VWAP
Pullbacks that stall near inner/mid bands instead of reverting fully
In this environment, fading outer bands becomes lower probability because price can “ride” deviations during strong directional flow.
How to trade continuation with this indicator
Core idea: use VWAP and inner bands as pullback zones, then trade in the direction of the VWAP slope.
A) Trend continuation zones (most practical)
VWAP: first pullback level in mild trends
±1σ: shallow pullback continuation
±1.5σ: higher-quality pullback depth in stronger trends
±2σ: deep pullback / trend stress (more caution)
Example (uptrend):
VWAP rising
Price pulls down into VWAP / +1σ / +1.5σ area
Continuation entries are considered when price stabilizes and pushes back with the trend
Example (downtrend):
VWAP falling
Price pulls up into VWAP / −1σ / −1.5σ area
Continuation entries are considered when price rejects and rotates back down
What to do with 2.35σ / 3σ re-entry signals in trends
Re-entry signals can still occur in trends, but they should be interpreted differently:
In strong trends, an outer-band re-entry may only produce a brief bounce/rotation, not a full mean reversion to VWAP.
Targets may be more realistic at inner bands rather than expecting VWAP every time.
In other words:
Range: outer-band re-entries often aim toward VWAP.
Trend: outer-band re-entries often aim toward 2σ / 1.5σ / 1σ first.
Practical Regime Filter (simple visual read)
This script intentionally doesn’t hard-code a “trend/range detector,” but you can visually infer regime quickly:
Mean reversion bias
Bands contracting or stable
VWAP mostly flat
Price crossing VWAP frequently
Trend continuation bias
Bands expanding
VWAP clearly sloped
Price holding mostly on one side of VWAP
Notes on σ Calculation Options
This indicator includes σ mode toggles:
Unweighted σ (tighter): treats price deviations more “purely” and often gives bands that react more tightly to price behavior.
Volume-weighted σ: emphasizes high-volume price action in the deviation calculation.
Both are valid — test based on your market and timeframe.
Summary Cheat Sheet
Contracting bands (range / compression)
Favor: mean reversion
Best signals: 2.35σ and 3σ re-entry
Typical targets: inner bands → VWAP
Expanding bands + sloped VWAP (trend)
Favor: continuation
Use pullbacks to: VWAP / 1σ / 1.5σ as entry zones
Outer-band re-entries: treat as rotation opportunities, not guaranteed full reversals
EMA 9 & 26 Crossover by SN TraderEMA 9 & 26 Crossover by SN Trader – Clean Trend Signal Indicator |
The EMA 9 & 26 Cross (+ Marker) indicator is a lightweight and effective trend-direction and momentum-shift tool that visually marks EMA crossover events using simple “+” symbols placed directly above or below price candles.
This indicator is ideal for scalping, intraday trading, and swing trading across Forex, Crypto, Stocks, Indices, and Commodities.
🔹 Indicator Logic
EMA 9 (Green) → Fast momentum
EMA 26 (Red) → Trend direction
🟢 Green “+” (Below Candle)
Appears when EMA 9 crosses ABOVE EMA 26
Indicates bullish momentum or trend continuation
🔴 Red “+” (Above Candle)
Appears when EMA 26 crosses ABOVE EMA 9
Indicates bearish momentum or potential trend reversal
📈 How to Use
✔ Look for Green “+” for bullish bias
✔ Look for Red “+” for bearish bias
✔ Trade in the direction of higher-timeframe trend
✔ Combine with RSI, UT Bot, VWAP, MACD, Support & Resistance for confirmation
✅ Best For
Trend identification
Momentum confirmation
Scalping & intraday entries
Swing trade timing
Multi-timeframe analysis
⚙️ Features
✔ Clean & minimal design
✔ Non-repainting crossover signals
✔ Works on all timeframes & markets
✔ Pine Script v6 compliant
✔ Beginner & professional friendly
⚠️ Disclaimer
This indicator is for educational purposes only and does not provide financial advice. Always use risk management and additional confirmation before trading.
Triple ST + MACD + 7x MTF EMA + VWAP + ORB + Lux Pivots + AMA//@version=6
indicator('Triple ST + MACD + 7x MTF EMA + VWAP + ORB + Lux Pivots + AMA', overlay = true, max_labels_count = 500)
//━━━━━━━━━━━━━━━━━━━
// INPUTS
//━━━━━━━━━━━━━━━━━━━
// AMA Signals Group (Zeiierman Style)
showAMA = input.bool(true, "Show AMA Signals", group="AMA Signals")
amaLength = input.int(10, "AMA Length", group="AMA Signals")
amaFast = input.int(2, "AMA Fast Period", group="AMA Signals")
amaSlow = input.int(30, "AMA Slow Period", group="AMA Signals")
// SuperTrend Group
atrPeriodPrimary = input.int(18, 'Primary ST ATR Period', group="SuperTrend")
multiplierPrimary = input.float(4.0, 'Primary ST Multiplier', group="SuperTrend")
// MACD Group
fastLength = input.int(24, 'MACD Fast Length', group="MACD")
slowLength = input.int(52, 'MACD Slow Length', group="MACD")
signalLength = input.int(9, 'MACD Signal Smoothing', group="MACD")
// EMA Group
tfEMA = input.timeframe("60", "EMA Timeframe (Global)", group="EMAs")
ema1Len = input.int(9, 'EMA 1 Length', group="EMAs"), ema2Len = input.int(21, 'EMA 2 Length', group="EMAs")
ema3Len = input.int(27, 'EMA 3 Length', group="EMAs"), ema4Len = input.int(50, 'EMA 4 Length', group="EMAs")
ema5Len = input.int(100, 'EMA 5 Length', group="EMAs"), ema6Len = input.int(150, 'EMA 6 Length', group="EMAs")
ema7Len = input.int(200, 'EMA 7 Length', group="EMAs")
// LuxAlgo Style Pivots (50 Lookback)
showPivots = input.bool(true, "Show Pivot High/Low", group="LuxAlgo Pivots")
pivotLen = input.int(50, "Pivot Lookback", group="LuxAlgo Pivots")
showMissed = input.bool(true, "Show Missed Reversal Levels", group="LuxAlgo Pivots")
// Previous OHLC Group
showPrevOHLC = input.bool(true, "Show Previous Day OHLC?", group="Previous OHLC")
// Visuals & ORB Group
showVwap = input.bool(true, 'Show VWAP?', group="Visuals")
showORB = input.bool(true, "Show ORB", group="ORB Settings")
orbTime = input.string("0930-1000", "ORB Time Range", group="ORB Settings")
//━━━━━━━━━━━━━━━━━━━
// CALCULATIONS
//━━━━━━━━━━━━━━━━━━━
// 1. AMA Calculation (Zeiierman Logic)
fastAlpha = 2.0 / (amaFast + 1)
slowAlpha = 2.0 / (amaSlow + 1)
efficiencyRatio = math.sum(math.abs(close - close ), amaLength) != 0 ? math.abs(close - close ) / math.sum(math.abs(close - close ), amaLength) : 0
scaledAlpha = math.pow(efficiencyRatio * (fastAlpha - slowAlpha) + slowAlpha, 2)
var float amaValue = na
amaValue := na(amaValue ) ? close : amaValue + scaledAlpha * (close - amaValue )
// 2. Pivot Points & Missed Reversals (RECTIFIED: Bool Fix)
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float lastMissedHigh = na
var float lastMissedLow = na
if not na(ph)
lastMissedHigh := ph
if not na(pl)
lastMissedLow := pl
// 3. Custom SuperTrend Function (RECTIFIED: Parenthesis Fix)
f_supertrend(_atrLen, _mult) =>
atr_ = ta.atr(_atrLen)
upperBasic = hl2 + _mult * atr_
lowerBasic = hl2 - _mult * atr_
var float upperFinal = na
var float lowerFinal = na
upperFinal := na(upperFinal ) ? upperBasic : (upperBasic < upperFinal or close > upperFinal ? upperBasic : upperFinal )
lowerFinal := na(lowerFinal ) ? lowerBasic : (lowerBasic > lowerFinal or close < lowerFinal ? lowerBasic : lowerFinal )
var int dir = 1
if not barstate.isfirst
dir := dir
if dir == 1 and close < lowerFinal
dir := -1
else if dir == -1 and close > upperFinal
dir := 1
= f_supertrend(atrPeriodPrimary, multiplierPrimary)
// 4. MACD & 7 MTF EMAs
macdLine = ta.ema(close, fastLength) - ta.ema(close, slowLength)
signal = ta.ema(macdLine, signalLength)
ema1 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema1Len), gaps = barmerge.gaps_on)
ema2 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema2Len), gaps = barmerge.gaps_on)
ema3 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema3Len), gaps = barmerge.gaps_on)
ema4 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema4Len), gaps = barmerge.gaps_on)
ema5 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema5Len), gaps = barmerge.gaps_on)
ema6 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema6Len), gaps = barmerge.gaps_on)
ema7 = request.security(syminfo.tickerid, tfEMA, ta.ema(close, ema7Len), gaps = barmerge.gaps_on)
// 5. ORB Logic
is_new_day = ta.change(time("D")) != 0
in_orb = not na(time(timeframe.period, orbTime))
var float orbHigh = na, var float orbLow = na
if is_new_day
orbHigh := na, orbLow := na
if in_orb
orbHigh := na(orbHigh) ? high : math.max(high, orbHigh)
orbLow := na(orbLow) ? low : math.min(low, orbLow)
//━━━━━━━━━━━━━━━━━━━
// PLOTTING
//━━━━━━━━━━━━━━━━━━━
// AMA Plots
plot(showAMA ? amaValue : na, "AMA Line", color=amaValue > amaValue ? color.lime : color.red, linewidth=2)
plotshape(showAMA and ta.crossover(amaValue, amaValue ), "AMA BUY", shape.labelup, location.belowbar, color.lime, 0, "BUY", color.black, size=size.small)
plotshape(showAMA and ta.crossunder(amaValue, amaValue ), "AMA SELL", shape.labeldown, location.abovebar, color.red, 0, "SELL", color.white, size=size.small)
// Pivots
plotshape(showPivots ? ph : na, "PH", shape.labeldown, location.abovebar, color.red, -pivotLen, "PH", color.white)
plotshape(showPivots ? pl : na, "PL", shape.labelup, location.belowbar, color.green, -pivotLen, "PL", color.white)
// Missed Reversal Lines
var line hLine = na, var line lLine = na
if showMissed and barstate.islast
line.delete(hLine), line.delete(lLine)
hLine := line.new(bar_index - pivotLen, lastMissedHigh, bar_index + 10, lastMissedHigh, color=color.new(color.red, 50), style=line.style_dashed)
lLine := line.new(bar_index - pivotLen, lastMissedLow, bar_index + 10, lastMissedLow, color=color.new(color.green, 50), style=line.style_dashed)
// Previous Day OHLC
= request.security(syminfo.tickerid, "D", [high , low ], lookahead=barmerge.lookahead_on)
plot(showPrevOHLC ? pdH : na, "PDH", color.gray, style=plot.style_stepline)
plot(showPrevOHLC ? pdL : na, "PDL", color.gray, style=plot.style_stepline)
// 7 EMAs & VWAP
plot(ema1, "E1", color.new(color.white, 50)), plot(ema7, "E7", color.new(color.gray, 50))
plot(showVwap ? ta.vwap : na, "VWAP", color.orange, 2)
plot(stPrimary, 'Primary ST', dirPrimary == 1 ? color.green : color.red, 2)
// MACD (RECTIFIED: Named arguments)
plotshape(ta.crossover(macdLine, signal), title="MACD+", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(ta.crossunder(macdLine, signal), title="MACD-", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
// Global Trend Background
bgcolor(dirPrimary == 1 ? color.new(color.green, 97) : color.new(color.red, 97))






















