CCI Crossover AlertThis very simple indicator will give you a blue background where the CCI crossed from below -100 to above -100, and a red background where it crossed from above 100 to below 100.
Cari dalam skrip untuk "马斯克+100万"
[AA] - Market Valuation (Mean Based) - Market Valuation (Mean Based)
What it does
This indicator estimates whether price is overvalued, undervalued, or fairly valued relative to its structural mean across multiple lookback windows. It builds a single normalized oscillator from short-, mid-, and long-term ranges so traders can quickly see when price is stretched away from equilibrium.
This is not a mashup of existing tools. It’s a custom mean-deviation model that aggregates multi-window range positioning into one score.
How it works (concepts)
For each lookback length (13, 25, 30, 50, 100, 200):
Range & midpoint:
Highest high H and lowest low L.
Structural midpoint Mid = (H + L)/2.
Normalized deviation:
Dev = (Close − Mid) / (H − L) → location of price within its own range.
Aggregation:
The oscillator z_struct is the average of the deviations from the five windows.
Result: a smoothed, dimensionless value (roughly −1 to +1 in typical markets) showing multi-horizon displacement from the mean.
Plots & levels
Oscillator (area): z_struct
Reference lines: +0.40 (OB), 0.00 (equilibrium), −0.30 (OS)
Coloring:
Red when z_struct > OB (extended above mean)
Blue when z_struct < OS (extended below mean)
White in between
Suggested use
Mean reversion context: Fade extremes in range-bound conditions; take profits into OB/OS.
Trend awareness: In strong trends, extremes can persist—use levels as exhaustion context rather than standalone entry.
Filter/confirm: Combine with your trend filter or structure tools to time pullbacks and avoid chasing extended moves.
Inputs
Lookbacks: 13, 25, 30, 50, 100, 200
Thresholds: OB = 0.40, OS = −0.30
Notes & limitations
Works on the current symbol/timeframe only; no security() calls and no repainting beyond normal bar completion.
In very tight or flat ranges (H ≈ L), normalized deviations can become sensitive; consider longer windows or higher timeframes.
This is an indicator, not a strategy. No signals are generated; use with risk management.
Originality statement
This script implements an original, multi-window mean-deviation aggregation. It does not replicate a built-in or a public indicator; its purpose is to quantify cross-horizon valuation in a single, normalized measure.
MPO4 Lines – Modal Engine█ OVERVIEW
MPO4 Lines – Modal Engine is an advanced multi-line modal oscillator for TradingView, designed to detect momentum shifts, trend strength, and reversal points through candle-based pressure analysis with multiple fast lines and a reference slow line. It features divergence detection on Fast Line A, overbought/oversold return signals, dynamic coloring modes, and layered gradient visualizations for enhanced clarity and decision-making.
█ CONCEPT
The indicator is built upon the Market Pressure Oscillator (MPO) and serves as its expanded evolution, aimed at enabling broader market analysis through multiple lines with varying parameters. It calculates modal pressure using candle body size and direction, weighted against average body size over a lookback period, then normalized and smoothed via EMA. It generates four distinct oscillator lines: a heavily smoothed Slow Line (trend reference), two Fast Lines (A & B) for momentum and support/resistance, and an optional Line 4 for additional confirmation. Divergence is calculated solely on Fast Line A, with visual gradients between lines and bands for intuitive interpretation.
█ WHY USE IT?
- Multi-Layer Momentum: Combines slow trend reference with dual fast lines for precise entry/exit timing.
- Divergence Precision: Bullish/bearish divergences on Fast Line A with labeled confirmation.
- OB/OS Return Signals: Clear buy/sell markers when Fast Line A exits oversold/overbought zones.
- Dynamic Visuals: Gradient fills, line-to-line shading, and band gradients for instant market state recognition.
- Flexible Coloring: Slow Line color by direction or zero-position; fast lines by sign.
- Full Customization: Independent lengths, smoothing, visibility, and transparency — by adjusting the lengths of different lines, you can tailor results for various strategies; for example, enabling Line 4 and tuning its length allows trading based on crossovers between different lines.
█ HOW IT WORKS?
- Candle Pressure Calculation: Body = math.abs(close - open); avgBody = ta.sma(body, len). Direction = +1 (bull), –1 (bear), 0 (neutral). Weight = body / avgBody. Contribution = direction × weight.
- Rolling Sum & Normalization: Sums contributions over lookback, normalizes to ±100 scale (÷ (len × 2) × 100).
Smoothing: Applies primary EMA (smoothLen), with extra EMA on Slow Line for stability.
Line Structure:
- Slow Line = calcCPO(len1=20, smoothLen1=5) → extra EMA (5)
- Fast Line A = calcCPO(len2=6, smoothLen2=7)
- Fast Line B = calcCPO(len3=6, smoothLen3=10)
- Line 4 = calcCPO(len4=14, smoothLen4=1)
Divergence Detection: Uses ta.pivothigh/low on price and Fast Line A (pivotLength left/right). Bullish: lower price low + higher osc low. Bearish: higher price high + lower osc high. Valid within 5–60 bar window.
Signals:
- Buy: Fast Line A crosses above oversold (–30)
- Sell: Fast Line A crosses below overbought (+30)
- Slow Line color flip (direction or zero-cross)
- Divergence labels ("Bull" / "Bear")
- Band Coloring as Momentum Signal:
When Fast Line A ≤ Fast Line B → Overbought band turns red (bearish pressure building)
When Fast Line A > Fast Line B → Oversold band turns green (bullish pressure building) This dynamic coloring serves as visual confirmation of momentum shift following fast line crossovers
Visualization:
- Gradients: Fast B → Zero (multi-layer fade), Fast A ↔ B fill, OB/OS bands
- Dynamic colors: Green/red based on sign or trend
- Zero line + dashed OB/OS thresholds
Alerts: Trigger on OB/OS returns, Slow Line changes, and divergences.
█ SETTINGS AND CUSTOMIZATION
- Line Visibility: Toggle Slow, Fast A, Fast B, Line 4 independently.
Line Lengths:
- Slow Line: Base (20), Primary EMA (5), Extra EMA (5)
- Fast A: Lookback (6), EMA (7)
- Fast B: Lookback (6), EMA (10)
- Line 4: Lookback (14), EMA (1)
- Slow Line Coloring Mode: “Direction” (trend-based) or “Position vs Zero”.
- Bands & Thresholds: Overbought (+30), Oversold (–30), step 0.1.
- Signals: Enable Fast A OB/OS return markers (default: on).
- Divergence: Enable/disable, Pivot Length (default: 2, min 1).
- Colors & Appearance: Full control over bullish/bearish hues for all lines, zero, bands, divergence, and text.
Gradients & Transparency:
- Fast B → Zero: 75 (default)
- Fast A ↔ B fill: 50
- Band gradients: 40
- Toggle each gradient independently
█ USAGE EXAMPLES
The indicator allows users to configure various strategies manually, though no built-in alerts exist for them. Entry signals can include color of fast lines, crossovers between different lines, alignment of colors across lines, or consistency in direction.
- Trend Confirmation: Slow Line above zero + green = bullish bias; below + red = bearish.
- Entry Timing: Buy on Fast A crossing above –30 (circle marker), especially if Slow Line is rising or near zero.
- Reversal Setup: Bullish divergence (“Bull” label) + Fast A in oversold + green gradient band = high-probability long.
- Scalping: Fast A vs Fast B crossover in direction of Slow Line trend.
- Noise Reduction: Increase extraSmoothLen on Slow Line
█ USER NOTES
- Best combined with volume, support/resistance, or trend channels.
- Adjust lookback and smoothing to asset volatility.
- Divergence delay = pivotLength; plan entries accordingly.
Sigma Trinity ModelAbstract
Sigma Trinity Model is an educational framework that studies how three layers of market behavior interact within the same trend: (1) structural momentum (Rasta), (2) internal strength (RSI), and (3) continuation/compounding structure (Pyramid). The model deliberately combines bar-close momentum logic with intrabar, wick-aware strength checks to help users see how reversals form, confirm, and extend. It is not a signal service or automation tool; it is a transparent learning instrument for chart study and backtesting.
Why this is not “just a mashup”
Many scripts merge indicators without explaining the purpose. Sigma Trinity is a coordinated, three-engine study designed for a specific learning goal:
Rasta (structure): defines when momentum actually flips using a dual-line EMA vs smoothed EMA. It gives the entry/exit framework on bar close for clean historical study.
RSI (energy): measures internal strength with wick-aware triggers. It uses RSI of LOW (for bottom touches/reclaims) and RSI of HIGH (for top touches/exhaustion) so users can see intrabar strength/weakness that the close can hide.
Pyramid (progression): demonstrates how continuation behaves once momentum and strength align. It shows the logic of adds (compounding) as a didactic layer, also on bar close to keep historical alignment consistent.
These three roles are complementary, not redundant: structure → strength → progression.
Architecture Overview
Execution model
Rasta & Pyramid: bar close only by default (historically stable, easy to audit).
RSI: per tick (realtime) with bar-close backup by default, using RSI of LOW for entries and RSI of HIGH for exits. This makes the module sensitive to intra-bar wicks while still giving a close-based safety net for backtests.
Stops (optional in strategy builds): wick-accurate: trail arms/ratchets on HIGH; stop hit checks with LOW (or Close if selected) with a small undershoot buffer to avoid micro-noise hits.
Visual model
Dual lines (EMA vs smoothed EMA) for Rasta + color fog to see direction and compression/expansion.
Rungs (small vertical lines) drawn between the two Rasta lines to visualize wave spacing and rhythm.
Clean labels for Entry/Exit/Pyramid Add/RSI events. Everything is state-locked to avoid spamming.
Module 1 — Rasta (Structural Momentum Layer)
Goal: Identify structural momentum reversals and maintain a consistent, replayable backbone for study.
Method:
Compute an EMA of a chosen price source (default Close), and a smoothed version (SMA/EMA/RMA/WMA/None selectable).
Flip points occur when the EMA line crosses the smoothed line.
Optional EMA 8/21 trend filter can gate entries (long-bias when EMA8 > EMA21). A small “adaptive on flip” option lets an entry fire when the filter itself flips to ON and the EMA is already above the smoothed line—useful for trend resumption.
Why bar close only?
Bar-close Rasta gives a stable, auditable timeline for the structure of the trend. It teaches users to separate “structure” (close-resolved) from “energy” (intrabar, via RSI).
Visuals:
Fog between the lines (green/red) to show regime.
Rungs between lines to show spread (compression vs expansion).
Optional plotting of EMA8/EMA21 so users can see the gating effect.
Module 2 — RSI (Internal Strength / Energy Layer)
Goal: Reveal the intrabar strength/weakness that often precedes or confirms structural flips.
Method:
Standard RSI with adjustable length and signal smoothing for the panel view.
Logic uses wick-aware sources:
Entry trigger: RSI of LOW (same RSI length) touching or below a lower band (default 15). Think of it as intraband reactivation from the bottom, using the candle’s deepest excursion.
Exit trigger: RSI of HIGH touching or above an upper band (default 85). Think of it as exhaustion at the top, using the candle’s highest excursion.
Realtime + Close Backup: fires intrabar on tick, but if the realtime event was missed, the close backup will note it at bar end.
Cooldown control: optional bars-between-signals to avoid rapid re-triggers on choppy sequences.
Why wick-aware RSI?
A close-only RSI can miss the true micro-extremes that cause reversals. Using LOW/HIGH for triggers captures the behavior that traders actually react to during the bar, while the bar-close backup preserves historical reproducibility.
Module 3 — Pyramid (Continuation / Compounding Layer)
Goal: Teach how continuation behaves once a trend is underway, and how adds can be structured.
Method:
Same dual-line logic as Rasta (EMA vs smoothed EMA), but only fires when already in a position (or after prior entry conditions).
Supports the same EMA 8/21 filter and optional adaptive-on-flip behavior.
Bar close only to maintain historical cohesion.
What it teaches:
Adds tend to cluster when momentum persists.
Students can experiment with add spacing and compare “one-shot entries” vs “laddered adds” during strong regimes.
How the Pieces Work Together
Rasta establishes the structural frame (when the wave flip is real enough to record at close).
RSI validates or challenges that structure by tracking intrabar energy at the extremes (low/high touches).
Pyramid shows what sustained continuation looks like once (1) and (2) align.
This produces a layered view: Structure → Energy → Progression. Users can see when all three line up (strongest phases) and when they diverge (riskier phases or transitions).
How to Use It (Step-by-Step)
Quick Start
Apply script to any symbol/timeframe.
In Strategy/Indicator Properties:
Enable On every tick (recommended).
If available, enable Using bar magnifier and choose a lower resolution (e.g., 1m) to simulate intrabar fills more realistically.
Keep On bar close unchecked if you want to observe realtime logic in live charts (strategies still place orders on close by platform design).
Default behavior: Rasta & Pyramid = bar close; RSI = per tick with close backup.
Reading the Chart
Watch for Rasta Entry/Exit labels: they define clean structural turns on close.
Watch RSI Entry (LOW touch at/below lower band) and RSI Exit (HIGH touch at/above upper band) to gauge internal energy extremes.
Pyramid Add labels reveal continuation phases once a move is already in progress.
Tuning
Rasta smoothing: choose SMA/EMA/RMA/WMA or None. Higher smoothing → later but cleaner flips; lower smoothing → earlier but choppier.
RSI bands: a common educational setting is 15/85 for strong extremes; 20/80 is a bit looser.
Cooldown: increase if you see too many RSI re-fires in chop.
EMA 8/21 filter: toggle ON to study “trend-gated” entries, OFF to study raw momentum flips.
Backtesting Notes (for Strategy Builds)
Stops (optional): trail is armed when price advances by a trigger (default D–F₀), ratchets only upward from HIGH, and hits from LOW (or Close if chosen) with a tiny undershoot buffer to avoid micro-wicks.
Order sequencing per bar (mirrors the script’s code comments):
Trail ratchet via HIGH
Intrabar stop hit via LOW/CLOSE → immediate close
If still in position at bar close: process exits (Rasta/RSI)
If still in position at bar close: process Pyramid Add
If flat at bar close: process entries (Rasta/RSI)
Platform reality: strategies place orders at bar close in historical testing; the intrabar logic improves realism for stops and event marking but final order timestamps are still close-resolved.
Inputs Reference (common)
Modules: enable/disable RSI and Pyramid learning layers.
Rasta: EMA length, smoothing type/length, EMA8/21 filter & adaptive flip, fog opacity, rungs on/off & limit.
RSI: RSI length, signal MA length (panel), Entry band (LOW), Exit band (HIGH), cooldown bars, labels.
Pyramid: EMA length, smoothing, EMA8/21 filter & adaptive adds.
Execution: toggle Bar Close Only for Rasta/Pyramid; toggle Realtime + Close Backup for RSI.
Stops (strategy): Fixed Stop % (first), Fixed Stop % (add), Trail Distance %, Trigger rule (auto D–F₀ or custom), undershoot buffer %, and hit source (LOW/CLOSE).
What to Study With It
Convergence: how often RSI-LOW entry touches precede the next Rasta flip.
Divergence: cases where RSI screams exhaustion (HIGH >= upper band) but Rasta hasn’t flipped yet—often transition zones.
Continuation: how Pyramid adds cluster in strong moves; how spacing changes with smoothing/filter choices.
Regime changes: use EMA8/21 filter toggles to see what happens at macro turns vs chop.
Limitations & Scope
This is a learning tool, not a trade copier. It does not provide financial advice or automated execution.
Intrabar results depend on data granularity; bar magnifier (when available) can help simulate lower-resolution ticks, but true tick-by-tick fills are a platform-level feature and not guaranteed across all symbols.
Suggested Publication Settings (Strategy)
Initial capital: 100
Order size: 100 USD (cash)
Pyramiding: 10
Commission: 0.25%
Slippage: 3 ticks
Recalculate: ✓ On every tick
Fill orders: ✓ Using bar magnifier (choose 1m or similar); leave On bar close unchecked for live viewing.
Educational License
Released under the Michael Culpepper Gratitude License (2025).
Use and modify freely for education and research with attribution. No resale. No promises of profitability. Purpose is understanding, not signals.
Directional Strength and Momentum Index█ OVERVIEW
“Directional Strength and Momentum Index” (DSMI) is a technical analysis indicator inspired by DMI, but due to different source data, it produces distinct results. DSMI combines direction measurement, trend strength, and overheat levels into a single index, enhanced with gradient fills, extreme zones, entry signals, candle coloring, and a summary table.
█ CONCEPT
The classic DMI, despite its relatively simple logic, can seem somewhat chaotic due to separate +DI and -DI lines and the need for manual interpretation of their relationships. The DSMI indicator was created to increase clarity and speed up results, consolidating key information into a single index from 0 to 100 that simultaneously:
- Indicates trend direction (bullish/bearish)
- Measures movement strength
- Identifies overheat levels
- Generates ready entry signals
DMI (ADX + +DI / -DI) measures trend direction and strength, but does so based solely on comparing price movements between candles. ADX shows whether the trend is orderly and growing (e.g., above 20–30), but does not assess how dynamic the movement is.
DSMI, on the other hand, takes into account candle size and actual market aggression, thus showing directional momentum — whether the trend has real “fuel” to sustain or accelerate, not just whether it is orderly.
The main calculation difference involves replacing True Range with candle size (high-low) and using directional EMA instead of Wilder smoothing. This allows DSMI to react faster to momentum changes, eliminating delays typical of classic DMI based on TR.
This gives the trader an immediate picture of the market situation without analyzing multiple lines.
█ FEATURES
DSMI Main Line:
- EMA(Directional Index) based on +DS and -DS
- Scale 0–100, smooth color gradient depending on strength
+DS / -DS:
- Positive and Negative Directional Strength
- Gradient fill between lines — more intense with stronger trend
Extreme Zones:
- Default 20 and 80
- Gradient fill outside zones
Trend Strength Levels:
- Weak (<10) → neutral
- Moderate (up to 35)
- Strong (up to 45)
- Overheated (up to 55)
- Extreme (>55)
All levels editable
Entry Signals:
- Activated on crossing entry level (default 20)
Or on direction change when DSMI already ≥ entry level
- Highlighted background (green/red)
Candle Coloring:
- According to current trend
Trend Strength Table:
- Top-right corner
- Shows current strength (WEAK/STRONG etc.) + DSMI value
Alerts:
- DSMI Bullish Entry
- DSMI Bearish Entry
█ HOW TO USE
Add to Chart: Paste code in Pine Editor or find in indicator library.
Settings:
DSMI Parameters:
- DSMI Period → default 20
- Show DSMI Line → on/off
Extreme Zones:
- Lower Level → default 20
- Upper Level → default 80
Trend Strength Levels:
- Weak, Moderate, Strong, Overheated → adjust to strategy
Trend Colors:
- BULLISH → default green
- BEARISH → default red
- NEUTRAL → gray
Entry Signals:
- Show Highlight → on/off
- DSMI Entry Level → default 20
Signal Interpretation:
- DSMI Line: Main strength indicator.
- Gradient between +DS and -DS: Visualizes side dominance.
- Crossing 18 with direction confirmation → entry signal.
- Extreme Zones: Potential reversal or continuation points after correction.
- Table: Quick overview of current trend condition.
█ APPLICATIONS
The indicator works well in:
- Trend-following: Enter on signal, exit on direction change or overheat. When a new trend appears, consider entering a position, preferably with a rising trend strength indicator.
- Scalping/daytrading: Shorter period (7–10), lower entry level.
- Swing/position: Longer period (20–30), higher entry level, extreme zones as filters.
- Noise filtering: Ignores consolidation below “Weak” – increasing value e.g. to 15 highlights consolidation zones, but no signals appear there.
Style Adjustment:
- Aggressive strategies → shorten period and entry level
- Conservative → extend period, raise entry level (25–30), watch “Overheated”
“Weak” level (<10 default) → neutral; increasing it e.g. to 15 gives fewer but higher-quality signals. The Weak zone value controls the level below which no signals appear, and the gradient turns gray (often aligned with consolidation zones).
Combine with:
- Support/resistance levels
- Fair Value Gaps (FVG)
- Volume (Volume Profile, VWAP)
- Other oscillators (RSI, Stochastic)
█ NOTES
- Works on all markets and timeframes.
- Adjust period and levels to instrument volatility.
- Higher entry level → fewer signals, higher quality.
- Neutral color below “Weak” – avoids trading in consolidation.
- Gradient and table enable quick assessment without line analysis.
Smart Flow Tracker [The_lurker]
Smart Flow Tracker (SFT): Advanced Order Flow Tracking Indicator
Overview
Smart Flow Tracker (SFT) is an advanced indicator designed for real-time tracking and analysis of order flows. It focuses on detecting institutional patterns, massive orders, and potential reversals through analysis of lower timeframes (Lower Timeframe) or live ticks. It provides deep insights into market behavior using a multi-layered intelligent detection system and a clear visual interface, giving traders a competitive edge.
SFT focuses on trade volumes, directions, and frequencies to uncover unusual activity that may indicate institutional intervention, massive orders, or manipulation attempts (traps).
Indicator Operation Levels
SFT operates on three main levels:
1. Microscopic Monitoring: Tracks every trade at precise timeframes (down to one second), providing visibility not available in standard timeframes.
2. Advanced Statistical Analysis: Calculates averages, deviations, patterns, and anomalies using precise mathematical algorithms.
3. Behavioral Artificial Intelligence: Recognizes behavioral patterns such as hidden institutional accumulation, manipulation attempts and traps, and potential reversal points.
Key Features
SFT features a set of advanced functions to enhance the trader's experience:
1. Intelligent Order Classification System: Classifies orders into six categories based on size and pattern:
- Standard: Normal orders with typical size.
- Significant 💎: Orders larger than average by 1.5 times.
- Major 🔥: Orders larger than average by 2.5 times.
- Massive 🐋: Orders larger than average by 3 times.
- Institutional 🏛️: Consistent patterns indicating institutional activity.
- Reversal 🔄: Large orders indicating direction change.
- Trap ⚠️: Patterns that may be price traps.
2. Institutional Patterns Detection: Tracks sequences of similar-sized orders, detects organized institutional activity, and is customizable (number of trades, variance ratio).
3. Reversals Detection: Compares recent flows with previous ones, detects direction shifts from up to down or vice versa, and operates only on large orders (Major/Massive/Institutional).
4. Traps Detection: Identifies sequences of large orders in one direction, followed by an institutional order in the opposite direction, with early alerts for false moves.
5. Flow Delta Bar: Displays the difference between buy and sell volumes as a percentage for balance, with instant updates per trade.
6. Dynamic Statistics Panel: Displays overall buy and sell ratios with real-time updates and interactive colors.
How It Works and Understanding
SFT relies on logical sequential stages for data processing:
A. Data Collection: Uses the `request.security_lower_tf()` function to extract data from a lower timeframe (like 1S) even on a higher timeframe (like 5D). For each time unit, it calculates:
- Adjusted Volume: Either normal volume or "price-weighted volume" (hlc3 * volume) based on user choice.
- Trade Direction: Compared to previous close (rise → buy, fall → sell).
B. Building Temporary Memory: Maintains a dynamic list (sizeHistory) of the last 100 trade sizes, continuously calculating the moving average (meanSize).
C. Intelligent Classification: Compares each new trade to the average:
- > 1.5 × average → Significant.
- > 2.5 × average → Major.
- > 3.0 × average → Massive.
- Institutional Patterns Check: A certain number of trades (e.g., 5) with a specified variance ratio (±5%) → Institutional.
D. Advanced Detection:
- Reversal: Compares buy/sell totals in two consecutive periods.
- Trap: Sequence of large trades in one direction followed by an opposite institutional trade.
E. Display and Alerts: Results displayed in an automatically updated table, with option to enable alerts for notable events.
Settings (Fully Customizable)
SFT offers extensive options to adapt to the trader's needs:
A. Display Settings:
- Language: English / Arabic.
- Table Position: 9 options (e.g., Top Right, Middle Right, Bottom Left).
- Display Size: Tiny / Small / Normal / Large.
- Max Rows: 10–100.
- Enable Flow Delta Bar: Yes / No.
- Enable Statistics Panel: Yes / No (displays buy/sell % ratio).
B.- Technical Settings:
- Data Source: Lower Timeframe / Live Tick (simulation).
- Timeframe: Optional (e.g., 1S, 5S, 1).
- Calculation Type: Volume / Price Volume.
C. Intelligent Detection System:
- Enable Institutional Patterns Detection.
- Pattern Length: 3–20 trades.
- Allowed Variance Ratio: 1%–20%.
- Massive Orders Detection Factor: 2.0–10.0.
D. Classification Criteria:
- Significant Orders Factor: 1.2–3.0.
- Major Orders Factor: 2.0–5.0.
E. **Advanced Detection**:
- Enable Reversals Detection (with review period).
- Enable Traps Detection (with minimum sequence limit).
F. Alerts System:
- Enable for each type: Massive orders, institutional patterns, reversals, traps, severe imbalance (60%–90%).
G. Color System: Manual customization for each category:
- Standard Buy 🟢: Dark gray green.
- Standard Sell 🔴: Dark gray red.
- Significant Buy 🟢: Medium green.
- Significant Sell 🔴: Medium red.
- Major Orders 🟣: Purple.
- Massive Orders 🟠: Orange.
- Institutional 🟦: Sky blue.
- Reversal 🔵: Blue.
- Trap 🟣: Pink-purple.
Target Audiences
SFT benefits a wide range of traders and investors:
1. Scalpers: Instant detection of large orders, liquidity points identification, avoiding traps in critical moments.
2. Day Traders: Tracking smart money footprint, determining real session direction, early reversals detection.
3. Swing Traders: Confirming trend strength, detecting institutional accumulation/distribution, identifying optimal entry points.
4. Investors: Understanding true market sentiments, avoiding entry at false peaks, identifying real value zones.
⚠️ Disclaimer:
This indicator is for educational and analytical purposes only. It does not constitute financial, investment, or trading advice. Use it in conjunction with your own strategy and risk management. Neither TradingView nor the developer is liable for any financial decisions or losses.
Smart Flow Tracker (SFT): مؤشر متقدم لتتبع تدفقات الأوامر
نظرة عامة
Smart Flow Tracker (SFT) مؤشر متقدم مصمم لتتبع وتحليل تدفقات الأوامر في الوقت الفعلي. يركز على كشف الأنماط المؤسسية، الأوامر الضخمة، والانعكاسات المحتملة من خلال تحليل الأطر الزمنية الأقل (Lower Timeframe) أو التيك الحي. يوفر رؤية عميقة لسلوك السوق باستخدام نظام كشف ذكي متعدد الطبقات وواجهة مرئية واضحة، مما يمنح المتداولين ميزة تنافسية.
يركز SFT على حجم الصفقات، اتجاهها، وتكرارها لكشف النشاط غير العادي الذي قد يشير إلى تدخل مؤسسات، أوامر ضخمة، أو محاولات تلاعب (فخاخ).
مستويات عمل المؤشر
يعمل SFT على ثلاثة مستويات رئيسية:
1. المراقبة المجهرية: يتتبع كل صفقة على مستوى الأطر الزمنية الدقيقة (حتى الثانية الواحدة)، مما يوفر رؤية غير متوفرة في الأطر الزمنية العادية.
2. التحليل الإحصائي المتقدم: يحسب المتوسطات، الانحرافات، الأنماط، والشذوذات باستخدام خوارزميات رياضية دقيقة.
3. الذكاء الاصطناعي السلوكي: يتعرف على أنماط سلوكية مثل التراكم المؤسسي المخفي، محاولات التلاعب والفخاخ، ونقاط الانعكاس المحتملة.
الميزات الرئيسية
يتميز SFT بمجموعة من الوظائف المتقدمة لتحسين تجربة المتداول:
1. نظام تصنيف الأوامر الذكي: يصنف الأوامر إلى ست فئات بناءً على الحجم والنمط:
- Standard (قياسي)**: أوامر عادية بحجم طبيعي.
- Significant 💎 (مهم)**: أوامر أكبر من المتوسط بـ1.5 ضعف.
- Major 🔥 (كبير)**: أوامر أكبر من المتوسط بـ2.5 ضعف.
- Massive 🐋 (ضخم)**: أوامر أكبر من المتوسط بـ3 أضعاف.
- Institutional 🏛️ (مؤسسي)**: أنماط متسقة تشير إلى نشاط مؤسسي.
- Reversal 🔄 (انعكاس)**: أوامر كبيرة تشير إلى تغيير اتجاه.
- Trap ⚠️ (فخ)**: أنماط قد تكون فخاخًا سعرية.
2. كشف الأنماط المؤسسية: يتتبع تسلسل الأوامر المتشابهة في الحجم، يكشف النشاط المؤسسي المنظم، وقابل للتخصيص (عدد الصفقات، نسبة التباين).
3. كشف الانعكاسات: يقارن التدفقات الأخيرة بالسابقة، يكشف تحول الاتجاه من صعود إلى هبوط أو العكس، ويعمل فقط على الأوامر الكبيرة (Major/Massive/Institutional).
4. كشف الفخاخ: يحدد تسلسل أوامر كبيرة في اتجاه واحد، يليها أمر مؤسسي في الاتجاه المعاكس، مع تنبيه مبكر للحركات الكاذبة.
5. شريط دلتا التدفق: يعرض الفرق بين حجم الشراء والبيع كنسبة مئوية للتوازن، مع تحديث فوري لكل صفقة.
6. لوحة إحصائيات ديناميكية: تعرض نسبة الشراء والبيع الإجمالية مع تحديث لحظي وألوان تفاعلية.
طريقة العمل والفهم
يعتمد SFT على مراحل منطقية متسلسلة لمعالجة البيانات:
أ. جمع البيانات: يستخدم دالة `request.security_lower_tf()` لاستخراج بيانات من إطار زمني أدنى (مثل 1S) حتى على إطار زمني أعلى (مثل 5D). لكل وحدة زمنية، يحسب:
- الحجم المعدّل: إما الحجم العادي (volume) أو "الحجم المرجّح بالسعر" (hlc3 * volume) حسب الاختيار.
- اتجاه الصفقة: مقارنة الإغلاق الحالي بالسابق (ارتفاع → شراء، انخفاض → بيع).
ب. بناء الذاكرة المؤقتة: يحتفظ بقائمة ديناميكية (sizeHistory) لآخر 100 حجم صفقة، ويحسب المتوسط المتحرك (meanSize) باستمرار.
ج. التصنيف الذكي: يقارن كل صفقة جديدة بالمتوسط:
- > 1.5 × المتوسط → Significant.
- > 2.5 × المتوسط → Major.
- > 3.0 × المتوسط → Massive.
- فحص الأنماط المؤسسية: عدد معين من الصفقات (مثل 5) بنسبة تباين محددة (±5%) → Institutional.
د. الكشف المتقدم:
- الانعكاس: مقارنة مجموع الشراء/البيع في فترتين متتاليتين.
- الفخ: تسلسل صفقات كبيرة في اتجاه واحد يتبعها صفقة مؤسسية معاكسة.
هـ. العرض والتنبيه: عرض النتائج في جدول محدّث تلقائيًا، مع إمكانية تفعيل تنبيهات للأحداث المميزة.
لإعدادات (قابلة للتخصيص بالكامل)
يوفر SFT خيارات واسعة للتكييف مع احتياجات المتداول:
أ. إعدادات العرض:
- اللغة: English / العربية.
- موقع الجدول: 9 خيارات (مثل Top Right, Middle Right, Bottom Left).
- حجم العرض: Tiny / Small / Normal / Large.
- الحد الأقصى للصفوف: 10–100.
- تفعيل شريط دلتا التدفق: نعم / لا.
- تفعيل لوحة الإحصائيات: نعم / لا (تعرض نسبة الشراء/البيع %).
ب. الإعدادات التقنية:
- مصدر البيانات: Lower Timeframe / Live Tick (محاكاة).
- الإطار الزمني: اختياري (مثل 1S, 5S, 1).
- نوع الحساب: Volume / Price Volume.
ج. نظام الكشف الذكي:
- تفعيل كشف الأنماط المؤسسية.
- طول النمط: 3–20 صفقة.
- نسبة التباين: 1%–20%.
- عامل كشف الأوامر الضخمة: 2.0–10.0.
د. معايير التصنيف:
- عامل الأوامر المهمة: 1.2–3.0.
- عامل الأوامر الكبرى: 2.0–5.0.
هـ. الكشف المتقدم:
- تفعيل كشف الانعكاسات (مع فترة مراجعة).
- تفعيل كشف الفخاخ (مع حد أدنى للتسلسل).
و. نظام التنبيهات:
- تفعيل لكل نوع: أوامر ضخمة، أنماط مؤسسية، انعكاسات، فخاخ، عدم توازن شديد (60%–90%).
ز. نظام الألوان**: تخصيص يدوي لكل فئة:
- شراء قياسي 🟢: أخضر رمادي داكن.
- بيع قياسي 🔴: أحمر رمادي داكن.
- شراء مهم 🟢: أخضر متوسط.
- بيع مهم 🔴: أحمر متوسط.
- أوامر كبرى 🟣: بنفسجي.
- أوامر ضخمة 🟠: برتقالي.
- مؤسسي 🟦: أزرق سماوي.
- انعكاس 🔵: أزرق.
- فخ 🟣: وردي-أرجواني.
الفئات المستهدفة
يستفيد من SFT مجموعة واسعة من المتداولين والمستثمرين:
1. السكالبرز (Scalpers): كشف لحظي للأوامر الكبيرة، تحديد نقاط السيولة، تجنب الفخاخ في اللحظات الحرجة.
2. المتداولون اليوميون (Day Traders): تتبع بصمة الأموال الذكية، تحديد اتجاه الجلسة الحقيقي، كشف الانعكاسات المبكرة.
3. المتداولون المتأرجحون (Swing Traders): تأكيد قوة الاتجاه، كشف التراكم/التوزيع المؤسسي، تحديد نقاط الدخول المثلى.
4. المستثمرون: فهم معنويات السوق الحقيقية، تجنب الدخول في قمم كاذبة، تحديد مناطق القيمة الحقيقية.
⚠️ إخلاء مسؤولية:
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.
Golden Flow MapGolden Flow Map is a multi–timeframe moving–average system
designed to reveal the underlying direction of long–term market flow,
beyond daily volatility or short–term signals.
This script overlays four major trend lines — each representing a different layer of market rhythm:
Timeframe Length Meaning
🟣 1D – 365 MA Annual average — the true life line of the trend
🔴 1D – 200 MA Institutional benchmark — the long-term threshold
🟢 1W – 20 MA Mid-cycle momentum guide
🟠 3D – 100 MA Wave transition detector — captures trend shifts early
By combining these four perspectives on a single chart,
you can instantly distinguish between a short-term bounce and a major trend reversal.
🧭 How to Use
When all four lines align in one direction → that’s the main current of the market.
If price loses the 200D or 365D, ignore small rebounds — the structure has shifted.
The cross between Weekly 20 and 3D 100 often marks a wave transition.
Focus on alignment order rather than crossovers —
markets ultimately return to the direction of the higher timeframe.
⚙️ Features
SMA / EMA toggle
Individual MA on/off controls
Built-in alerts for 200D and 1W20 cross events
🧠 Concept
“Indicators are not signals — they are maps.”
This tool is not meant to predict, but to reveal the pulse of the market
and guide you through its long-term structure.
✍️ Creator’s Note
Developed from DDU’s personal long-term trend framework,
this indicator serves as a visual compass to expand a trader’s vision
from short-term reactions to macro-level flow.
Pinbar MTF - No Repaint# Pinbar MTF - No Repaint Indicator
## Complete Technical Documentation
---
## 📊 Overview
**Pinbar MTF (Multi-Timeframe) - No Repaint** is a professional-grade TradingView Pine Script indicator designed to detect high-probability pinbar reversal patterns with advanced filtering systems. The indicator is specifically engineered to be **100% non-repainting**, making it reliable for both live trading and backtesting.
### Key Features
✅ **Non-Repainting** - Signals only appear AFTER bar closes, never disappear
✅ **Three-Layer Filter System** - ATR, SWING, and RSI filters
✅ **Automatic SL/TP Calculation** - Based on risk:reward ratios
✅ **Real-time Alerts** - TradingView notifications for all signals
✅ **Visual Trade Management** - Lines, labels, and areas for entries, stops, and targets
✅ **Backtesting Ready** - Reliable historical data for strategy testing
---
## 🎯 What is a Pinbar?
A **Pinbar (Pin Bar/Pinocchio Bar)** is a single candlestick pattern that indicates a potential price reversal:
### Bullish Pinbar (BUY Signal)
- **Long lower wick** (rejection of lower prices)
- **Small body at the top** of the candle
- Shows buyers rejected sellers' attempt to push price down
- Forms at support levels or swing lows
- Entry signal for LONG positions
### Bearish Pinbar (SELL Signal)
- **Long upper wick** (rejection of higher prices)
- **Small body at the bottom** of the candle
- Shows sellers rejected buyers' attempt to push price up
- Forms at resistance levels or swing highs
- Entry signal for SHORT positions
---
## 🔧 How the Indicator Works
### 1. **Pinbar Detection Logic**
The indicator analyzes the **previous closed bar ** to identify pinbar patterns:
```
Bullish Pinbar Requirements:
- Lower wick > 72% of total candle range (adjustable)
- Upper wick < 28% of total candle range
- Close > Open (bullish candle body)
Bearish Pinbar Requirements:
- Upper wick > 72% of total candle range (adjustable)
- Lower wick < 28% of total candle range
- Close < Open (bearish candle body)
```
**Why check ?** By analyzing the previous completed bar, we ensure the pattern is fully formed and won't change, preventing repainting.
---
### 2. **Three-Layer Filter System**
#### 🔍 **Filter #1: ATR (Average True Range) Filter**
- **Purpose**: Ensures the pinbar has significant size
- **Function**: Only signals if pinbar range ≥ ATR value
- **Benefit**: Filters out small, insignificant pinbars
- **Settings**:
- Enable/Disable toggle
- ATR Period (default: 7)
**Example**: If ATR = 50 pips, only pinbars with 50+ pip range will signal.
---
#### 🔍 **Filter #2: SWING Filter** (Always Active)
- **Purpose**: Confirms pinbar forms at swing highs/lows
- **Function**: Validates the pinbar is an absolute high/low
- **Benefit**: Identifies true reversal points
- **Settings**:
- Swing Candles (default: 3)
**How it works**:
- For bullish pinbar: Checks if low is lowest of past 3 bars
- For bearish pinbar: Checks if high is highest of past 3 bars
**Example**: With 3 swing candles, a bullish pinbar must have the lowest low among the last 3 bars.
---
#### 🔍 **Filter #3: RSI (Relative Strength Index) Filter**
- **Purpose**: Confirms momentum conditions
- **Function**: Prevents signals in extreme momentum zones
- **Benefit**: Avoids counter-trend trades
- **Settings**:
- Enable/Disable toggle
- RSI Period (default: 7)
- RSI Source (Close, Open, High, Low, HL2, HLC3, OHLC4)
- Overbought Level (default: 70)
- Oversold Level (default: 30)
**Logic**:
- Bullish Pinbar: Only signals if RSI < 70 (not overbought)
- Bearish Pinbar: Only signals if RSI > 30 (not oversold)
---
### 3. **Stop Loss Calculation**
Two methods available:
#### Method A: ATR-Based Stop Loss (Recommended)
```
Bullish Pinbar:
SL = Pinbar Low - (1 × ATR)
Bearish Pinbar:
SL = Pinbar High + (1 × ATR)
```
**Benefit**: Dynamic stops that adapt to market volatility
#### Method B: Fixed Pips Stop Loss
```
Bullish Pinbar:
SL = Pinbar Low - (Fixed Pips)
Bearish Pinbar:
SL = Pinbar High + (Fixed Pips)
```
**Settings**:
- Calculate Stop with ATR (toggle)
- Stop Pips without ATR (default: 5)
---
### 4. **Take Profit Calculation**
Take Profit is calculated based on Risk:Reward ratio:
```
Bullish Trade:
TP = Entry + (Entry - SL) × Risk:Reward Ratio
Bearish Trade:
TP = Entry - (SL - Entry) × Risk:Reward Ratio
```
**Example**:
- Entry: 1.2000
- SL: 1.1950 (50 pip risk)
- RR: 2:1
- TP: 1.2100 (100 pip reward = 50 × 2)
**Settings**:
- Risk:Reward Ratio (default: 1.0, range: 0.1 to 10.0)
---
## 📈 Visual Elements
### On-Chart Displays
1. **Signal Markers**
- 🟢 **Green Triangle Up** = Bullish Pinbar (BUY)
- 🔴 **Red Triangle Down** = Bearish Pinbar (SELL)
- Placed directly on the pinbar candle
2. **Entry Labels**
- Green "BUY" label with entry price
- Red "SELL" label with entry price
- Shows exact entry level
3. **Stop Loss Lines**
- 🔴 Red horizontal line
- "SL" label
- Extends 20 bars forward
4. **Take Profit Lines**
- 🟢 Green horizontal line
- "TP" label
- Extends 20 bars forward
5. **Risk/Reward Areas** (Optional)
- Red shaded box = Risk zone (Entry to SL)
- Green shaded box = Reward zone (Entry to TP)
- Visual risk:reward visualization
6. **Info Table** (Top Right)
- Displays current settings
- Shows filter status (ON/OFF)
- Real-time RSI value
- Quick reference panel
---
## 🔔 Alert System
Three alert types available:
### 1. Combined Alert: "Pinbar Signal (Any Direction)"
- Fires for BOTH bullish and bearish pinbars
- **Best for**: General monitoring
- **Message**: "Pinbar Signal Detected on {TICKER} at {PRICE}"
### 2. Bullish Alert: "Bullish Pinbar Alert"
- Fires ONLY for BUY signals
- **Best for**: Long-only strategies
- **Message**: "BUY Signal on {TICKER} at {PRICE}"
### 3. Bearish Alert: "Bearish Pinbar Alert"
- Fires ONLY for SELL signals
- **Best for**: Short-only strategies
- **Message**: "SELL Signal on {TICKER} at {PRICE}"
---
## ⚙️ Input Parameters Reference
### **Filters Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| ATR Filter on Pinbar Range? | ✅ ON | Boolean | Enable/disable ATR filter |
| ATR Period | 7 | 1+ | Lookback period for ATR calculation |
| Swing Candles | 3 | 1+ | Bars to check for swing high/low |
| RSI Filter on Pinbar? | ❌ OFF | Boolean | Enable/disable RSI filter |
| RSI Period | 7 | 2+ | Lookback period for RSI calculation |
| RSI Source | Close | Multiple | Price data for RSI (Close/Open/High/Low/etc) |
| RSI Overbought Level | 70 | 50-100 | Upper threshold for RSI filter |
| RSI Oversold Level | 30 | 0-50 | Lower threshold for RSI filter |
### **Pinbar Detection Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Shadow % vs Body | 72 | 50-95 | Minimum wick size as % of total range |
### **Visualization Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Show SL and TP Lines? | ✅ ON | Boolean | Display stop loss and take profit lines |
| Show SL and TP Area? | ❌ OFF | Boolean | Show shaded risk/reward boxes |
### **Risk Management Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Risk:Reward Ratio | 1.0 | 0.1-10.0 | Target profit vs risk (1.0 = 1:1, 2.0 = 1:2) |
| Calculate Stop with ATR? | ✅ ON | Boolean | Use ATR for stop calculation |
| Stop Pips without ATR | 5 | 1+ | Fixed pip stop when ATR disabled |
---
## 🚫 Non-Repainting Architecture
### What is Repainting?
**Repainting** occurs when an indicator's historical signals differ from what appeared in real-time. This makes backtesting unreliable and can lead to false confidence in a strategy.
### How This Indicator Prevents Repainting
1. **Closed Bar Analysis**
- All calculations use ` ` offset (previous bar)
- Only analyzes COMPLETED candles
- Signals appear on the bar AFTER the pinbar closes
2. **Confirmed Swing Points**
- Waits for sufficient bar history before signaling
- Only checks historical bars that cannot change
- Prevents premature swing detection
3. **Static Alert Timing**
- Alerts fire only after bar completion
- No conditional logic that changes historically
- Same results in replay mode and live trading
### Verification Method
To verify non-repainting behavior:
1. Apply indicator to chart
2. Note signal locations and prices
3. Refresh browser / reload chart
4. **Signals remain in exact same locations**
---
## 💼 Trading Strategy Guidelines
### Entry Rules
**For Bullish Pinbar (LONG):**
1. Wait for green triangle to appear
2. Enter at close of pinbar (shown in label)
3. Alternative: Enter on break of pinbar high
4. Place stop loss at red SL line
5. Set target at green TP line
**For Bearish Pinbar (SHORT):**
1. Wait for red triangle to appear
2. Enter at close of pinbar (shown in label)
3. Alternative: Enter on break of pinbar low
4. Place stop loss at red SL line
5. Set target at green TP line
### Risk Management
- **Position Sizing**: Risk only 1-2% of account per trade
- **Stop Loss**: Always use the calculated SL (never move it wider)
- **Take Profit**: Use calculated TP or trail stop after 1:1 RR
- **Multiple Timeframes**: Confirm signals on higher timeframe
### Best Practices
✅ **DO:**
- Wait for bar to close before entering
- Trade in direction of higher timeframe trend
- Use on liquid markets with clear support/resistance
- Combine with price action analysis
- Keep a trading journal
❌ **DON'T:**
- Enter before bar closes (prevents seeing full pattern)
- Trade against strong trends
- Ignore the filters (they improve win rate)
- Risk more than 2% per trade
- Trade every signal (be selective)
---
## 📊 Backtesting & Data Export
### Available Data Points
The indicator exports these values for strategy development:
| Output | Description |
|--------|-------------|
| Bullish Signal | 1 = BUY signal, 0 = No signal |
| Bearish Signal | 1 = SELL signal, 0 = No signal |
| Bull SL | Stop loss level for long trades |
| Bull TP | Take profit level for long trades |
| Bull Entry | Entry price for long trades |
| Bear SL | Stop loss level for short trades |
| Bear TP | Take profit level for short trades |
| Bear Entry | Entry price for short trades |
### How to Use in Strategy
These values can be accessed by Pine Script strategies using:
```pine
indicator_values = request.security(syminfo.tickerid, timeframe.period,
)
```
---
## 🎓 Understanding the Filters
### Why Use Multiple Filters?
Single-indicator systems often generate too many false signals. This indicator uses a **confluence approach**:
1. **Pinbar Pattern** = Price rejection detected
2. **+ SWING Filter** = Rejection at key level
3. **+ ATR Filter** = Significant move
4. **+ RSI Filter** = Favorable momentum
**Result**: Higher probability setups with better risk:reward
### Filter Optimization
**Conservative Settings** (Fewer, Higher Quality Signals):
- ATR Filter: ON
- Swing Candles: 5
- RSI Filter: ON
- Shadow %: 75%
**Aggressive Settings** (More Signals, More Noise):
- ATR Filter: OFF
- Swing Candles: 2
- RSI Filter: OFF
- Shadow %: 65%
**Balanced Settings** (Recommended):
- ATR Filter: ON
- Swing Candles: 3
- RSI Filter: OFF (or ON for trending markets)
- Shadow %: 72%
---
## 🔍 Troubleshooting
### "No Signals Appearing"
**Possible Causes:**
1. Filters are too strict
2. No pinbars forming on chart
3. Insufficient bar history
**Solutions:**
- Reduce Shadow % to 65%
- Reduce Swing Candles to 2
- Disable ATR or RSI filters temporarily
- Check that chart has enough data loaded
### "Too Many Signals"
**Solutions:**
- Enable ATR filter
- Increase Swing Candles to 4-5
- Enable RSI filter
- Increase Shadow % to 75-80%
### "Signals Appearing Late"
**This is normal behavior!** The indicator:
- Analyzes previous closed bar
- Signals appear on the bar AFTER the pinbar
- This is what prevents repainting
- Signal latency is 1 bar (by design)
---
## 📝 Technical Specifications
**Indicator Type:** Overlay (displays on price chart)
**Pine Script Version:** 5
**Max Labels:** 500
**Max Lines:** 500
**Repainting:** None (100% non-repainting)
**Data Window Values:** 8 exported values
**Alert Types:** 3 (Combined, Bullish, Bearish)
**Performance:**
- Lightweight script (fast execution)
- Works on all timeframes
- Compatible with all markets (Forex, Crypto, Stocks, Futures)
- No data snooping bias
---
## 🎯 Use Cases
### 1. **Swing Trading**
- Timeframe: Daily, 4H
- Filter Settings: All enabled
- Best for: Catching major reversals
### 2. **Day Trading**
- Timeframe: 15m, 1H
- Filter Settings: ATR + SWING only
- Best for: Intraday reversals
### 3. **Scalping**
- Timeframe: 5m, 15m
- Filter Settings: SWING only (aggressive)
- Best for: Quick reversals (requires experience)
### 4. **Position Trading**
- Timeframe: Weekly, Daily
- Filter Settings: All enabled + high RR (2:1 or 3:1)
- Best for: Long-term trend reversal catches
---
## 🏆 Advantages Over Other Pinbar Indicators
✅ **Guaranteed Non-Repainting** - Many pinbar indicators repaint; this one never does
✅ **Automatic SL/TP** - No manual calculation needed
✅ **Multi-Layer Filtering** - Reduces false signals significantly
✅ **Visual Trade Management** - Clear entry, stop, and target levels
✅ **Flexible Configuration** - Adaptable to any trading style
✅ **Alert System** - Never miss a setup
✅ **Backtesting Ready** - Reliable historical data
✅ **Professional Grade** - Suitable for live trading
---
## 📚 Educational Resources
### Recommended Reading on Pinbars
- "The Pin Bar Trading Strategy" by Nial Fuller
- "Price Action Trading" by Al Brooks
- TradingView Education: Price Action Patterns
### Practice Recommendations
1. Paper trade signals for 20+ trades before live trading
2. Backtest on different timeframes and markets
3. Keep detailed records of all trades
4. Analyze winning vs losing setups
5. Refine filter settings based on results
---
## ⚖️ Disclaimer
This indicator is a tool for technical analysis and does not guarantee profits. Trading involves substantial risk of loss. Past performance is not indicative of future results.
- Always use proper risk management
- Never risk more than you can afford to lose
- Consider your trading experience and objectives
- Seek independent financial advice if needed
---
## 📧 Version Information
**Current Version:** 1.0
**Last Updated:** 2024
**Compatibility:** TradingView Pine Script v5
**Status:** Production Ready
---
## 🔄 Future Enhancements (Potential)
Possible future additions:
- Multi-timeframe confirmation option
- Volume filter integration
- Customizable color schemes
- Win rate statistics display
- Partial profit taking levels
- Trailing stop functionality
---
## 📖 Quick Start Guide
### 5-Minute Setup
1. **Add to Chart**
- Open TradingView
- Go to Pine Editor
- Paste the code
- Click "Add to Chart"
2. **Configure Settings**
- Open indicator settings (gear icon)
- Start with default settings
- Enable "Show SL and TP Lines"
3. **Set Alert**
- Right-click indicator name
- Click "Add Alert"
- Select "Pinbar Signal (Any Direction)"
- Configure notification method
4. **Test**
- Scroll back on chart
- Verify signals make sense
- Check that signals don't repaint
5. **Trade** (After Practice!)
- Wait for alert
- Verify signal quality
- Enter, place SL/TP
- Manage trade
---
## 🎯 Final Thoughts
The **Pinbar MTF - No Repaint** indicator is designed for serious traders who value:
- **Reliability** over flashy signals
- **Quality** over quantity
- **Honesty** over false promises
This indicator will NOT:
- Make you rich overnight
- Win every trade
- Replace proper trading education
This indicator WILL:
- Identify high-probability reversal setups
- Save you analysis time
- Provide consistent, non-repainting signals
- Help you develop a systematic trading approach
**Success in trading comes from:**
1. Proper education (60%)
2. Risk management (30%)
3. Technical tools like this indicator (10%)
Use this tool as part of a complete trading plan, not as a standalone solution.
Smart Money Volume Tools | Lyro RSSmart Money Volume Tools | Lyro RS
Overview
The Smart Money Volume Tools (SMVT) is a multi-dimensional volume-based analysis suite designed to visualize the interplay between price action, moving averages, and smart money behavior.
By integrating dynamic moving averages, volume normalization, and multi-timeframe intelligence, SMVT helps traders identify when institutional (smart money) or retail participants are influencing price movements — all in a single, adaptive display.
Unlike traditional oscillators or trend tools, SMVT dynamically adjusts its sensitivity and thresholds based on volume z-scores and normalized momentum, revealing true intent behind price shifts rather than reacting to them.
🔹 Key Features
4 Core Analytical Modes:
Trail Mode – Identifies directional bias using dynamic volume-weighted trails based on adaptive ATR multipliers.
Volume Mode – Displays normalized volume strength vs. price trend, highlighting volume-driven expansions.
Smart Money Volume Mode – Detects institutional buying/selling spikes from lower timeframes using volume z-score outliers.
Retail Money Volume Mode – Contrasts retail-driven impulses to visualize crowd behavior and exhaustion points.
Dynamic Volume Normalization: Converts volume impulses into a 0–100 range using a sigmoid function for smoother interpretation.
Multi-Timeframe Intelligence: Automatically reads lower timeframe volume data to distinguish smart vs. retail activity.
Adaptive Color Systems: Multiple palette modes ( Classic , Mystic , Accented , Royal ) or full custom color control.
Signal Table Overlay: Built-in real-time module summary showing status for Trail , Volume , Smart Money , and Retail Money — right on your chart.
🔹 How It Works
Volume Strength Calculation:
Calculates relative volume strength using a moving average baseline, then normalizes the result via a sigmoid function — mapping activity into a clean 0–100 range.
Smart Money Detection:
Scans lower timeframe data for extreme volume z-scores ( z > 2 ) to pinpoint institutional accumulation or distribution zones.
Trail Logic:
Uses adaptive upper and lower trails based on ATR and volume intensity to track volatility-adjusted trend direction.
Color Logic:
Trail, candle, and fill colors change dynamically according to the active signal type and selected palette — making directional bias instantly visible.
🔹 Practical Use
Swing Confirmation (Trail Mode): Confirms sustained bullish or bearish momentum supported by volume, ideal for trailing positions and managing exits.
Volume Expansion (Volume Mode): Highlights key moments when institutional liquidity pushes price before visible breakout confirmation.
Smart vs. Retail Divergence: Identify conflicts between retail activity and smart money to detect exhaustion or reversal points early.
Table Overlay Utility: Instantly see all active signals across modules in one compact, on-chart interface.
🔹 Customization
Custom color palettes or manual bullish/bearish color selection.
Adjustable EMA lengths and Volume SMA period .
Selectable lower timeframe source for Smart Money analysis.
Flexible table position & size controls — choose between Top, Middle, Bottom and Tiny to Huge.
Switch freely between Trail , Volume , Smart Money , and Retail Money modes.
Credits
Thank you to @AlgoAlpha for the smart money and retail activity source code.
⚠️Disclaimer
This indicator is a tool for technical analysis and does not provide guaranteed results. It should be used in conjunction with other analysis methods and proper risk management practices. The creators of this indicator are not responsible for any financial decisions made based on its signals.
Percentile Rank Oscillator (Price + VWMA)A statistical oscillator designed to identify potential market turning points using percentile-based price analytics and volume-weighted confirmation.
What is PRO?
Percentile Rank Oscillator measures how extreme current price behavior is relative to its own recent history. It calculates a rolling percentile rank of price midpoints and VWMA deviation (volume-weighted price drift). When price reaches historically rare levels – high or low percentiles – it may signal exhaustion and potential reversal conditions.
How it works
Takes midpoint of each candle ((H+L)/2)
Ranks the current value vs previous N bars using rolling percentile rank
Maps percentile to a normalized oscillator scale (-1..+1 or 0–100)
Optionally evaluates VWMA deviation percentile for volume-confirmed signals
Highlights extreme conditions and confluence zones
Why percentile rank?
Median-based percentiles ignore outliers and read the market statistically – not by fixed thresholds. Instead of guessing “overbought/oversold” values, the indicator adapts to current volatility and structure.
Key features
Rolling percentile rank of price action
Optional VWMA-based percentile confirmation
Adaptive, noise-robust structure
User-selectable thresholds (default 95/5)
Confluence highlighting for price + VWMA extremes
Optional smoothing (RMA)
Visual extreme zone fills for rapid signal recognition
How to use
High percentile values –> statistically extreme upward deviation (potential top)
Low percentile values –> statistically extreme downward deviation (potential bottom)
Price + VWMA confluence strengthens reversal context
Best used as part of a broader trading framework (market structure, order flow, etc.)
Tip: Look for percentile spikes at key HTF levels, after extended moves, or where liquidity sweeps occur. Strong moves into rare percentile territory may precede mean reversion.
Suggested settings
Default length: 100 bars
Thresholds: 95 / 5
Smoothing: 1–3 (optional)
Important note
This tool does not predict direction or guarantee outcomes. It provides statistical context for price extremes to help traders frame probability and timing. Always combine with sound risk management and other tools.
💻 RSI Dual-Band Reversal Strategy (Hacker Mode)This 💻 RSI Dual-Band Reversal Strategy (Hacker Mode) is a mean-reversion trading strategy built on the Relative Strength Index (RSI) indicator.
It identifies potential trend reversals when price momentum reaches extreme overbought or oversold levels — then enters trades expecting the price to revert.
⚙️ Strategy Concept
The RSI measures market momentum on a scale of 0–100.
When RSI is too low, it signals an oversold market → potential buy.
When RSI is too high, it signals an overbought market → potential sell.
This strategy sets two reversal zones using dual RSI bands:
Zone RSI Range Meaning Action
Upper Band 80–90 Overbought Prepare to Sell
Lower Band 10–20 Oversold Prepare to Buy
🧩 Code Breakdown
1. Input Parameters
rsiLength = input.int(14)
upperBandHigh = input.float(90.0)
upperBandLow = input.float(80.0)
lowerBandLow = input.float(10.0)
lowerBandHigh = input.float(20.0)
You can adjust:
RSI Length (default 14) → sensitivity of the RSI.
Upper/Lower Bands → control when buy/sell triggers occur.
2. RSI Calculation
rsi = ta.rsi(close, rsiLength)
Calculates the RSI of the closing price over 14 periods.
3. Signal Logic
buySignal = ta.crossover(rsi, lowerBandHigh)
sellSignal = ta.crossunder(rsi, upperBandLow)
Buy Signal: RSI crosses up through 20 → market rebounding from oversold.
Sell Signal: RSI crosses down through 80 → market turning from overbought.
4. Plotting
RSI line (lime green)
Bands:
🔴 80–90 (Sell Zone)
🟢 10–20 (Buy Zone)
Gray midline at 50 for reference.
Triangle markers for signals:
🟢 “BUY” below chart
🔴 “SELL” above chart
5. Trading Logic
if (buySignal)
strategy.entry("Buy", strategy.long)
if (sellSignal)
strategy.entry("Sell", CRYPTO:BTCUSD strategy.short OANDA:XAUUSD )
Opens a long position on a buy signal.
Opens a short position on a sell signal.
No explicit stop loss or take profit — positions reverse when an opposite signal appears.
🧠 How It Works (Step-by-Step Example)
RSI drops below 20 → oversold → buy signal triggers.
RSI rises toward 80 → overbought → sell signal triggers.
Strategy flips position, always staying in the market (either long or short).
📈 Visual Summary
Imagine the RSI line oscillating between 0 and 100:
100 ────────────────────────────────
90 ───── Upper Band High (Sell Limit)
80 ───── Upper Band Low (Sell Trigger)
50 ───── Midline
20 ───── Lower Band High (Buy Trigger)
10 ───── Lower Band Low (Buy Limit)
0 ────────────────────────────────
When RSI moves above 80 → SELL
When RSI moves below 20 → BUY
⚡ Strategy Profile
Category Description
Type Mean Reversion
Entry Rule RSI crosses up 20 → Buy
Exit/Reverse Rule RSI crosses down 80 → Sell
Strengths Simple, effective in sideways/range markets, minimal lag
Weaknesses Weak in strong trends, no stop-loss or take-profit logic
💡 Suggested Improvements
You can enhance this script by adding:
Stop loss & take profit levels (e.g., % or ATR-based).
Trend filter (e.g., trade only in direction of 200 EMA).
RSI smoothing to reduce noise.
ProScalper📊 ProScalper - Professional 1-Minute Scalping System
🎯 Overview
ProScalper is a sophisticated, multi-confluence scalping indicator designed specifically for 1-minute chart trading. Combining advanced technical analysis with intelligent signal filtering, it provides high-probability trade setups with clear entry, stop loss, and take profit levels.
✨ Key Features
🔺 Smart Signal Detection
Range Filter Technology: Fast-responding trend detection (25-period) optimized for 1-minute timeframe
Medium-sized triangles appear above/below candles for clear buy/sell signals
Only most recent signal shown - no chart clutter
Automatically deletes old signals when new ones appear
📋 Real-Time Signal Table
Top-center display shows complete trade breakdown
Grade system: A+, A, B+, B, C+ ratings for every setup
All confluence reasons listed with checkmarks
Score and R:R displayed for instant trade quality assessment
Color-coded: Green for LONG, Red for SHORT
📐 Multi-Confluence Analysis
ProScalper combines 10+ technical factors:
✅ EMA Trend: 4 EMAs (200, 48, 13, 8) for multi-timeframe alignment
✅ VWAP: Dynamic support/resistance
✅ Fibonacci Retracement: Golden ratio (61.8%), 50%, 38.2%, 78.6%
✅ Range Filter: Adaptive trend confirmation
✅ Pivot Points: Smart reversal detection
✅ Volume Analysis: Spike detection and volume profile
✅ Higher Timeframe: 5-minute trend confirmation
✅ HTF Support/Resistance: Key levels from higher timeframes
✅ Liquidity Sweeps: Smart money detection
✅ Opening Range Breakout: First 15-minute range
💰 Complete Trade Management
Entry Lines: Dashed green (LONG) or red (SHORT) showing exact entry
Stop Loss: Red dashed line with price label
Take Profit: Blue dashed line with price label and R:R
Partial Exits: 1R level marked with orange dashed line
All lines extend 10 bars for clean alignment with Fibonacci levels
📊 Dynamic Risk/Reward
Adaptive R:R calculation based on market volatility
Targets adjusted for pivot distances
Minimum 1.2:1 to maximum 3.5:1 for scalping
Position sizing based on account risk percentage
🎨 Professional Visualization
Clean chart layout - no clutter, only essential information
Custom EMA colors: Red (200), Aqua (48), Green (13), White (8)
Gold VWAP line for key support/resistance
Color-coded Fibonacci: Bright yellow (61.8%), white (50%), orange (38.2%), fuchsia (78.6%)
No shaded zones - pure price action focus
📈 Performance Tracking
Real-time statistics table (optional)
Win rate, total trades, P&L tracking
Average R:R and win/loss ratios
Setup-specific performance metrics
⚙️ Settings & Customization
Risk Management
Adjustable account risk per trade (default: 0.5%)
ATR-based stop loss multiplier (default: 0.8 for tight scalping)
Dynamic position sizing
Signal Sensitivity
Confluence Score Threshold: 40-100 (default: 55 for balanced signals)
Range Filter Period: 25 bars (fast signals for 1-min)
Range Filter Multiplier: 2.2 (tighter bands for more signals)
Visual Controls
Toggle signal table on/off
Show/hide Fibonacci levels
Control EMA visibility
Adjust table text size
Partial Exits
1R: 50% (default)
2R: 30% (default)
3R: 20% (default)
Fully customizable percentages
Trailing Stops
ATR-Based (best for scalping)
Pivot-Based
EMA-Based
Breakeven trigger at 0.8R
🎯 Best Use Cases
Ideal For:
✅ 1-minute scalping on liquid instruments
✅ Day traders looking for quick 2-8 minute trades
✅ High-frequency trading with 8-15 signals per session
✅ Trending markets where Range Filter excels
✅ Crypto, Forex, Futures - works on all liquid assets
Trading Style:
Timeframe: 1-minute (can work on 3-5 min with adjusted settings)
Hold Time: 3-8 minutes average
Target: 1.2-3R per trade
Frequency: 8-15 signals per day
Win Rate: 45-55% (with proper risk management)
📋 How to Use
Step 1: Wait for Signal
Watch for green triangle (BUY) or red triangle (SELL)
Signal table appears at top center automatically
Step 2: Review Confluence
Check grade (prefer A+, A, B+ for best quality)
Review all reasons listed in table
Confirm score is above your threshold (55+ recommended)
Note the R:R ratio
Step 3: Enter Trade
Enter at current market price
Set stop loss at red dashed line
Set take profit at blue dashed line
Mark 1R level (orange line) for partial exit
Step 4: Manage Trade
Exit 50% at 1R (orange line)
Move to breakeven after 0.8R
Trail remaining position using your chosen method
Exit fully at TP or opposite signal
🎨 Chart Setup Recommendations
Optimal Display:
Timeframe: 1-minute
Chart Type: Candles or Heikin Ashi
Background: Dark theme for best color visibility
Volume: Enable volume bars below chart
Complementary Indicators (optional):
Order flow/Delta for institutional confirmation
Market profile for key levels
Economic calendar for news avoidance
⚠️ Important Notes
Risk Disclaimer:
Not financial advice - for educational purposes only
Always use proper risk management (0.5-1% per trade max)
Past performance doesn't guarantee future results
Test on demo account before live trading
Best Practices:
✅ Trade during high liquidity hours (9:30-11 AM, 2-4 PM EST)
✅ Avoid news events and market open/close (first/last 2 minutes)
✅ Use tight stops (0.8-1.0 ATR) for 1-minute scalping
✅ Take partial profits quickly (1R = 50% off)
✅ Respect max daily loss limits (3% recommended)
✅ Focus on A and B grade setups for consistency
What Makes This Different:
🎯 Complete system - not just signals, but full trade management
📊 Multi-confluence - 10+ factors analyzed per trade
🎨 Professional visualization - clean, focused chart design
⚡ Optimized for 1-min - settings specifically tuned for fast scalping
📋 Transparent reasoning - see exactly why each trade was taken
🏆 Grade system - instantly know trade quality
🔧 Technical Details
Pine Script Version: 5
Overlay: Yes (plots on price chart)
Max Lines: 500
Max Labels: 100
Non-repainting: All signals confirmed on bar close
Alerts: Compatible with TradingView alerts
📞 Support & Updates
This indicator is actively maintained and optimized for 1-minute scalping. Settings can be adjusted for different timeframes and trading styles, but default configuration is specifically tuned for high-frequency 1-minute scalping.
🚀 Get Started
Add ProScalper to your 1-minute chart
Adjust settings to your risk tolerance
Wait for signals (green/red triangles)
Follow the signal table guidance
Manage trades using provided levels
Track performance with stats table
Happy Scalping! 📊⚡💰
Session Streaks [LuxAlgo]The Session Streaks tool allows traders to identify whether a session is bullish or bearish on the chart. It also shows the current session streak, or the number of consecutive bullish or bearish sessions.
The tool features a dashboard with information about the session streaks of the underlying product on the chart.
🔶 USAGE
Analyzing session streaks is commonly used for market timing by studying the number of consecutive sessions over time and how long they last before the market changes direction.
We identify a bullish session as one in which the closing price is equal to or greater than the opening price, and a bearish session as one in which the closing price is below the opening price.
Each session is labeled according to its bias (bullish or bearish) and the number of consecutive sessions of the same type that conform the current streak.
🔹 Dashboard
The dashboard at the top shows information about the current session.
Under the "Streaks" header, historical information about session streaks is displayed, divided into bullish and bearish categories.
Number: Total number of streaks.
Median: The average duration of those streaks. We chose the median over the mean to avoid misrepresentation due to outliers.
Mode: The most common streak duration.
As the image shows, for this particular market, there are more bullish streaks than bearish ones. Bullish streaks have an average duration that is longer than that of bearish streaks, and both have the same most common streak duration.
If the current session is bullish and the median streak duration for bullish sessions is three, then we could consider scenarios in which the next two sessions are bullish.
🔶 DETAILS
🔹 Streaks On Larger Timeframes
On timeframes lower than or equal to Daily, the tool identifies each consecutive session, but this behavior changes on larger timeframes.
On timeframes larger than daily, the tool identifies the last session of each bar. Let's use the chart in the image as a reference.
At the top of the image, there is a daily chart where each session corresponds to each candle. One candle equals one day.
In the middle, we have a weekly chart where each session is the last session of each week, which is usually Friday for the Nasdaq 100 futures contract. The levels and labels displayed correspond to the last session within each candle, which is the last day of each week.
The levels and labels on the monthly chart correspond to the last session of each month, which is the last day of each month.
🔹 Gradient Style
Traders can choose between two different color gradients for the session background. Each gradient provides different information about price behavior within each session.
Horizontal: Green indicates prices at the top of the session range and red indicates prices at the bottom.
Vertical: Green indicates prices that are equal to or greater than the open price and red indicates prices that are below the open price of the session.
🔶 SETTINGS
🔹 Dashboard
Dashboard: Enable or disable the dashboard.
Position: Select the location of the dashboard.
Size: Select the dashboard size.
🔹 Style
Bullish: Select a color for bullish sessions.
Bearish: Select a color for bearish sessions.
Transparency: Select a transparency level from 100 to 0.
Gradient: Select a horizontal or vertical gradient.
Mean Reversion Trading V1Overview
This is a simple mean reversion strategy that combines RSI, Keltner Channels, and MACD Histograms to predict reversals. Current parameters were optimized for NASDAQ 15M and performance varies depending on asset. The strategy can be optimized for specific asset and timeframe.
How it works
Long Entry (All must be true):
1. RSI < Lower Threshold
2. Close < Lower KC Band
3. MACD Histogram > 0 and rising
4. No open trades
Short Entry (All must be true):
1. RSI > Upper Threshold
2. Close > Upper KC Band
3. MACD Histogram < 0 and falling
4. No open trades
Long Exit:
1. Stop Loss: Average position size x ( 1 - SL percent)
2. Take Profit: Average position size x ( 1 + TP percent)
3. MACD Histogram crosses below zero
Short Exit:
1. Stop Loss: Average position size x ( 1 + SL percent)
2. Take Profit: Average position size x ( 1 - TP percent)
3. MACD Histogram crosses above zero
Settings and parameters are explained in the tooltips.
Important
Initial capital is set as 100,000 by default and 100 percent equity is used for trades
🔥 QUANT MOMENTUM SKORQUANT MOMENTUM SCORE – Description (EN)
Summary: This indicator fuses Price ROC, RSI, MACD, Trend Strength (ADX+EMA) and Volume into a single 0-100 “Momentum Score.” Guide bands (50/60/70/80) and ready-to-use alert conditions are included.
How it works
Price Momentum (ROC): Rate of change normalized to 0-100.
RSI Momentum: RSI treated as a momentum proxy and mapped to 0-100.
MACD Momentum: MACD histogram normalized to capture acceleration.
Trend Strength: ADX is direction-aware (DI+ vs DI–) and blended with EMA state (above/below) to form a combined trend score.
Volume Momentum: Volume relative to its moving average (ratio-based).
Weighting: All five components are weighted, auto-normalized, and summed into the final 0-100 score.
Visuals & Alerts: Score line with 50/60/70/80 guides; threshold-cross alerts for High/Strong/Ultra-Strong regimes.
Inputs, weights and thresholds are configurable; total weights are normalized automatically.
How to use
Timeframes: Works on any timeframe—lower TFs react faster; higher TFs reduce noise.
Reading the score:
<50: Weak momentum
50-60: Transition
60-70: Moderate-Strong (potential acceleration)
≥70: Strong, ≥80: Ultra Strong
Practical tip: Use it as a filter, not a stand-alone signal. Combine score breakouts with market structure/trend context (e.g., pullback-then-re-acceleration) to improve selectivity.
Disclaimer: This is not financial advice; past performance does not guarantee future results.
Quantum Portfolio vs NASDAQ (Base: May 2, 2021)This custom Pine Script indicator tracks and compares the cumulative performance of a multi-asset “Quantum Portfolio” against the NASDAQ 100 benchmark, rebased to a common starting point on May 2, 2021.
Both series are normalized to a base value of 100 on that date, allowing direct visual comparison of percentage growth or decline over time.
PDB - RSI Based Buy/Sell signals with 4 MARSI Based Buy/Sell Signals on Price chart + 4 MA System
This indicator plots RSI-based Buy & Sell signals directly on the price chart , combined with a 4-Moving-Average trend filter (20/50/100/200) for higher accuracy and cleaner trade timing.
The signal triggers when RSI reaches user-defined overbought/oversold levels, but unlike a standard RSI, this version plots the signals **on the chart**, not in the RSI window — making entries and exits easier to see in real time.
RSI Levels Are Fully Customizable
The default RSI thresholds are 30 (oversold) and 70 (overbought).
However, you can adjust these to fit your trading style. For example:
> When day trading on the 5–15 min timeframe, I personally use 35 (oversold) and 75 (overbought) to catch moves earlier.
> The example shown in the preview image uses 10-minute timeframe settings.
You can change the RSI levels to trigger signals from **any value you choose**, allowing you to tailor the indicator to scalping, day trading, or swing trading.
4 Moving Averages Included:
20, 50, 100, 200 MAs act as dynamic trend filters so you can:
✔ trade signals only in the direction of trend
✔ avoid false reversals
✔ identify momentum shifts more clearly
Works on all markets and timeframes — crypto, stocks, FX, indices.
Lump Sum Favorability (SPX & NDX)This indicator provides a visual dashboard to gauge the statistical favorability of deploying a "Lump Sum" investment into the SPX (S&P 500) or NDX (Nasdaq 100).
The primary goal is not to time the exact market bottom, but to identify zones of significant pessimism or euphoria. Historically, periods of indiscriminate selling have represented high-probability entry points for long-term investors.
The dashboard consists of two parts:
1. The Favorability Gauge: A 12-segment gauge that moves from Red (Unfavorable) to Teal (Favorable).
2. The Summary Text: An optional text box (enabled in settings) that provides a plain-English summary of the current market breadth.
---
The Method: Market Breadth
This indicator is not based on the price of the index itself. Price-based indicators (like an RSI on the SPX) can be misleading. In a market-cap-weighted index, a few mega-cap stocks can hold the index price up while the vast majority of "average" stocks are already in a deep bear market.
This tool uses Market Breadth to measure the true, underlying health and participation of the entire market.
How It Works
1. Data Source: The indicator pulls the daily percentage of companies within the selected index (SPX or NDX) that are trading above their 200-day moving average. (Data tickers: S5TH for SPX, NDTH for NDX).
2. Smoothing: This raw data is volatile. To filter out daily noise and confirm a persistent trend, the indicator calculates a 5-day Simple Moving Average (SMA) of this percentage. This is the value used by the indicator.
3. Interpretation:
High Value (>= 50%): More than half of the stocks are above their long-term average. This signifies the market is "Overheated" or in a risk-on phase. The favorability for a new lump sum investment is considered Low.
Low Value (< 50%): Less than half of the stocks are above their long-term average. This signifies "Oversold" conditions or capitulation. These moments historically offer the best favorability for starting a new long-term investment.
---
How to Use the Indicator
1. The Favorability Gauge
The gauge is designed to be intuitive: Red means "Stop/Caution," and Teal means "Go/Opportunity."
Note: The gauge's logic is inverted from the data value to achieve this simplicity.
Red Zone (Left): UNFAVORABLE
This corresponds to a high percentage of stocks being above their 200d MA (>= 50%). The market is considered Overheated, and the favorability for a new lump sum investment is low.
Teal Zone (Right): FAVORABLE
This corresponds to a low percentage of stocks being above their 200d MA (< 50%). The market is considered Oversold, and the favorability for a new lump sum investment is high.
2. The Summary Text
When "Show Summary Text" is enabled in the settings, a box will appear at the top-center of your chart. This box provides a clear, data-driven summary, such as:
"Currently, only 22% of S&P 500 companies are above their 200-day MA. Market is Oversold."
The color of this text will automatically change to match the market state (Red for Overheated, Teal for Oversold), providing instant confirmation of the gauge's reading.
---
Settings
Market: Choose the index to analyze: SPX (S&P 500) or NDX (Nasdaq 100).
Gauge Position: Select where the gauge dashboard should appear on your chart (default is Bottom Right).
Show Summary Text: Toggle the descriptive text box on or off (default is On).
---
This indicator is a statistical and historical guide, not a financial advice or timing signal. It is designed to measure favorability based on past market behavior, not to provide certainty.
Extreme oversold conditions can persist, and markets can always go lower. This tool should be used as one component of a broader investment and risk-management framework. Past performance is not a guarantee of future results.
COT Index Indicator 1) One‑liner
My version of the OTC COT Index indicator: a 0–120 oscillator built from CFTC COT data that shows where Commercial, Noncommercial, and Nonreportable net positions sit relative to recent extremes.
2) Short paragraph
This is my version of the OTC COT Index indicator. It converts CFTC Commitments of Traders (COT) net positions into a normalized 0–120 oscillator for each trader group—Commercials, Noncommercials, and Nonreportables—so you can quickly see when positioning is near recent highs or lows. Data comes from TradingView’s official COT library and supports both “Futures Only” and “Futures and Options” reports.
3) Compact bullets
What: My version of the OTC COT Index indicator
Why: Quickly spot when trader groups are near positioning extremes
Data: CFTC COT via TradingView/LibraryCOT/2; Futures Only or Futures & Options
How: Index = 120 × (Current − Min) ÷ (Max − Min) over a configurable lookback
Plots: Commercials (blue), Noncommercials (orange), Nonreportables (red)
Lines: Overbought, Midline, Oversold, optional 0/100, upper/lower bounds
Note: Values are relative to the chosen window; not trading advice
4) Publication‑ready (sections)
Overview
My version of the OTC COT Index indicator. It turns CFTC COT positioning into a 0–120 oscillator per trader group (Commercials, Noncommercials, Nonreportables) to highlight relative extremes.
Data source
CFTC Commitments of Traders via TradingView’s official library (TradingView/LibraryCOT/2).
Supports “Futures Only” and “Futures and Options.”
Method
Net positions = Longs − Shorts.
Index = 120 × (Current Net − Min(Net, Lookback)) ÷ (Max(Net, Lookback) − Min(Net, Lookback)).
Inputs
Weeks Look Back (normalization window)
Weeks Look Back for Historical Hi/Los (longer reference)
Report Type selection
Visuals
Three indexes by trader group, plus reference levels (OB/OS, Midline, optional 0/100).
Notes
Some symbols map to specific CFTC codes for reliability.
If no relevant COT data exists for the symbol, the script reports it clearly.
If you want this adapted to a specific platform’s character limits (e.g., TradingView’s publish dialog), tell me the target length and I’ll trim it to fit.
Relative Valuation OscillatorThis is a Relative Valuation Oscillator (RVO) this is attempt of replication OTC Valuation - a sophisticated multi-asset comparison indicator designed to measure whether the current asset is overvalued or undervalued relative to up to three reference assets.
Overview
The RVO compares the current chart's asset against reference assets (default: 30-Year Treasury Bonds, Gold, and US Dollar Index) to determine relative strength and valuation extremes. It outputs normalized oscillator values ranging from -100 (undervalued) to +100 (overvalued).
Key Features
Multiple Calculation Methods
The indicator offers 5 different calculation approaches:
Simple Ratio - Normalized ratio deviation from average
Percentage Difference - Percentage change comparison
Ratio Z-Score - Standard deviation-based comparison
Rate of Change Comparison - Momentum differential analysis (default)
Normalized Ratio - Min-max normalized ratio
Configurable Reference Assets
Asset 1: Default ZB (30-Year Treasury Bond Futures) - tracks interest rate sensitivity
Asset 2: Default GC (Gold Futures) - tracks safe-haven and inflation dynamics
Asset 3: Default DXY (US Dollar Index) - tracks currency strength
Each asset can be enabled/disabled independently
Fully customizable symbols
Visual Components
Multiple oscillator lines - One for each active reference asset (color-coded)
Average line - Combined signal from all active assets
Overbought/Oversold zones - Configurable threshold levels (default: ±80)
Zero line - Neutral valuation reference
Background coloring - Visual zones for extreme conditions
Signal line - Optional smoothed average
Entry markers - Long/short signals at key reversals
Signal Generation
Crossover alerts - When crossing overbought/oversold levels
Entry signals - Reversals from extreme zones
Divergence detection - Bullish/bearish divergences between price and oscillator
Zero-line crosses - Trend strength changes
Customization Options
Lookback period (10-500): Controls statistical calculation window
Normalization period (50-1000): Determines scaling sensitivity
Smoothing toggle: Optional EMA/SMA smoothing with adjustable period
Visual customization: Colors, levels, and display options
Information Table
Real-time dashboard showing:
Average oscillator value
Current status (Overvalued/Undervalued/Neutral)
Current asset price
Individual values for each active reference asset
Use Cases
Mean reversion trading - Identify extreme relative valuations for reversal trades
Sector rotation - Compare assets within similar categories
Hedging strategies - Understand correlation dynamics
Multi-asset analysis - Simultaneously compare against bonds, commodities, and currencies
Divergence trading - Spot price/oscillator divergences
Trading Strategy Applications
Long signals: When oscillator crosses above oversold level (asset recovering from undervaluation)
Short signals: When oscillator crosses below overbought level (asset declining from overvaluation)
Confirmation: Use multiple reference assets for stronger signals
Risk management: Avoid trading when all assets show neutral readings
This indicator is particularly useful for traders who want to incorporate inter-market analysis and relative strength concepts into their trading decisions, especially in OTC (Over-The-Counter) and futures markets.
Trading Lot & Margin Calculator
# 💹 Trading Lot & Margin Calculator - Professional Risk Management Tool
## 🎯 Overview
A comprehensive, all-in-one calculator dashboard that helps traders determine optimal position sizes, calculate margin requirements, and manage risk effectively across multiple asset classes. This indicator displays directly on your chart as a customizable table, providing real-time calculations based on current market prices.
## ✨ Key Features
### 📊 Three Powerful Calculation Modes:
**1. Calculate Lot Size (Risk-Based Position Sizing)**
- Input your risk percentage and stop loss in pips
- Automatically calculates the optimal lot size for your risk tolerance
- Respects margin limitations (configurable margin % cap)
- Ensures positions don't exceed minimum lot size (0.01)
- Perfect for risk management and proper position sizing
**2. Calculate Margin Cost**
- Input desired lot size
- See exactly how much margin is required
- Shows percentage of deposit used
- Displays free margin remaining
- Warns when insufficient funds
**3. Margin to Lots**
- Specify a fixed margin amount you want to use
- Calculator shows how many lots/contracts you can buy
- Ideal for traders with fixed margin budgets
## 🤖 Auto-Detection of Instruments
The calculator **automatically detects** what you're trading and adjusts calculations accordingly:
### ✅ Fully Supported:
- **💱 Forex Pairs** - All majors, minors, exotics (EURUSD, GBPJPY, etc.)
- Standard lot: 100,000 units
- JPY pairs: 0.01 pip size, others: 0.0001
- **🛢️ Commodities** - Gold, Silver, Oil
- XAUUSD (Gold): 100 oz per lot
- XAGUSD (Silver): 5,000 oz per lot
- Oil (WTI/Brent): 1,000 barrels per lot
- **📈 Indices** - US500, NAS100, US30, DAX, etc.
- Correct contract sizes per point
- **📊 Stocks** - All individual stocks
- 1 lot = 1 share
- Direct share calculations
### ⚠️ Known Limitation:
- **₿ Crypto calculations may not work properly** on all crypto pairs. Use manual contract size if needed.
## 📋 Dashboard Information Displayed:
- 🎯 Optimal/Requested Lot Size
- 💰 Margin Required
- 📊 Margin % of Deposit
- 💵 Free Margin Remaining
- 💎 Position Value
- 📈 Pip/Point Value
- ⚠️ Safety Warnings (insufficient funds, high risk, etc.)
- 🔍 Detected Instrument Type
- 📦 Contract Size
## ⚙️ Customizable Settings:
**Account Settings:**
- Account Deposit
- Leverage (1:1 to 1:1000)
- Max Margin % of Deposit (default 5% for safety)
**Risk Management:**
- Risk Percentage (for lot size calculation)
- Stop Loss in Pips
- Lot Amount (for margin cost calculation)
- Margin to Use (for margin-to-lots calculation)
**Display Options:**
- Show/Hide Dashboard
- Position: Top/Middle/Bottom, Left/Right
- Auto-detect instrument ON/OFF
- Manual contract size override
## 🎨 Professional Design
- Clean, modern table interface
- Color-coded warnings (red = danger, yellow = caution, green = safe)
- Large, readable text
- Minimal screen space usage
- Non-intrusive overlay
## 💡 Use Cases:
1. **Day Traders** - Quick position sizing based on account risk
2. **Swing Traders** - Calculate optimal positions for longer-term setups
3. **Risk Managers** - Ensure positions stay within margin limits
4. **Beginners** - Learn proper position sizing and risk management
5. **Multi-Asset Traders** - Seamlessly switch between forex, commodities, indices, and stocks
## ⚠️ Important Notes:
- ✅ Works on all timeframes
- ✅ Updates in real-time with price changes
- ✅ Minimum lot size enforced (0.01)
- ✅ Margin calculations use current chart price
- ⚠️ **Crypto calculations may be inaccurate** - verify with your broker
- 📌 Always verify calculations with your broker's specifications
- 📌 Contract sizes may vary by broker
## 🚀 How to Use:
1. Add indicator to any chart
2. Click settings ⚙️ icon
3. Enter your account details (deposit, leverage)
4. Choose calculation mode
5. Input your parameters
6. View optimal lot size and margin requirements on dashboard
## 📈 Perfect For:
- Forex traders managing multiple currency pairs
- Commodity traders (Gold, Silver, Oil)
- Index traders (S&P 500, NASDAQ, etc.)
- Stock traders
- Anyone who wants professional risk management
## 🛡️ Risk Management Features:
- Configurable margin % cap prevents over-leveraging
- Risk-based position sizing protects your account
- Warnings for high risk, insufficient funds, margin limitations
- Prevents positions below minimum lot size
---
**Trade smarter, not harder. Calculate before you trade!** 📊💪
---
## Version Notes:
- Pine Script v6
- Overlay mode for chart display
- No external dependencies
- Lightweight and fast
**Disclaimer:** This calculator is for educational and informational purposes only. Always verify calculations with your broker and trade at your own risk. Past performance does not guarantee future results.
---
Trend Candles Full ColorThe coloring over the candle sticks isn't showing up on the picture for some reason but when you click on the indicator the color coding will appear on the chart.
Trend Candles Full Color Indicator Explanation The "Trend Candles Full Color" indicator, designed for TradingView, visually enhances candlestick charts by coloring candles based on their position relative to a simple moving average (SMA). Here's how it works and how it can benefit traders: How It Works Input : Adjust the SMA period (default is 20) to define the trend length.
Logic : The indicator compares the closing price of each candle to the SMA: Green Candle : Close is above the SMA (indicating an uptrend).
Red Candle : Close is below the SMA (indicating a downtrend).
Gray Candle : Close equals the SMA (neutral/no clear trend).
Output : Candles (body, wick, and border) are colored green, red, or gray based on the trend, overlaid directly on your price chart.
Benefits and Use Cases Trend-Following Strategies Benefit: Clearly identifies bullish (green) or bearish (red) trends, helping traders ride momentum.
Example: A swing trader using a 20-period SMA can enter long positions when candles turn green (price above SMA) and exit or short when candles turn red, confirming trend reversals.
Reversal Trading Benefit: Gray candles signal indecision near the SMA, often a precursor to reversals.
Example: A day trader might watch for gray candles after a prolonged uptrend (green candles) to anticipate a potential bearish reversal, combining with other indicators like RSI for confirmation.
Scalping Benefit: Quick visual cues for short-term trend changes on lower timeframes.
Example: A scalper on a 5-minute chart can use green candles to confirm quick bullish moves and red candles to avoid counter-trend trades, enhancing decision speed.
Position Sizing or Risk Management Benefit: Color changes highlight trend strength, aiding in adjusting trade size or stops.
Example: A trader might increase position size during strong green candle sequences (sustained uptrend) and tighten stops when gray candles appear, signaling potential trend weakness.
Tips for Use Adjust the MA Length to suit your trading style (e.g., shorter for scalping, longer for swing trading).
Combine with other indicators (e.g., support/resistance, MACD) for better accuracy.
Test on different timeframes to match your strategy.
Recommended MA Length for 1-Minute Charts Short-Term/Scalping (1-5 minute trades):10-period SMA : Very sensitive, ideal for capturing quick price movements in fast markets. May produce more noise (false signals).
20-period SMA : A balanced choice for 1-minute charts, smoothing minor fluctuations while reacting to short-term trends. A great starting point for scalpers.
Intraday Trend Trading (10-30 minute holds):50-period SMA : Captures broader intraday trends, reducing noise but lagging slightly. Suitable for larger moves within a session.
This indicator simplifies trend identification, making it a versatile tool for traders of all styles, from beginners to advanced users!
Recommended MA Length for Swing Trading / Higher Timeframes Swing Trading (holding trades for days to weeks):50-period SMA : A popular choice for swing traders on higher timeframes (e.g., 1-hour or 4-hour charts). It smooths out short-term fluctuations while identifying medium-term trends. Ideal for capturing multi-day swings.
100-period SMA : Slightly longer, this MA is great for confirming stronger, more sustained trends. It’s useful on 4-hour or daily charts for swing traders aiming to ride larger price moves.
Longer-Term Trend Trading (holding for weeks to months):200-period SMA : A classic choice for higher timeframes like daily or weekly charts. It highlights major market trends and is widely used by swing and position traders to filter out noise and focus on long-term direction.
150-period SMA : A middle ground between the 100 and 200 SMA, suitable for daily charts when you want a balance between responsiveness and trend reliability.
Pullback Finder AutoPullback Finder Auto — Intraday Momentum Cooling Detector
Pullback Finder Auto is designed to find stocks that have made a strong intraday run from the open and are now cooling off while still positive — the classic pullback zone where continuation entries often form.
It automatically measures the percentage change from today’s open and highlights bars where:
the stock has already run at least a chosen amount (for example +10 % above its open), and
the current price is still up but within a defined pullback range (for example between +3 % and +8 % above the open).
When those two conditions are met, you’ll see green graphics on your chart:
Green triangle markers under the candle.
Optionally, small green PB labels such as “PB 5.2 %” showing the exact percentage from open when the setup occurs.
A green highlight in the sub‑window or line plot if you left the “Change from Open %” plot active.
These are your visual cues that a pullback has formed — a stock that previously ran and is now pulling back while holding strength.
How it works
The script continuously monitors:
• High % from Open = (high − open) / open × 100
• Current % from Open = (close − open) / open × 100
A “Pullback” condition triggers only if:
the high % is greater than or equal to your minimum run threshold, and
the current % sits between your minimum and maximum pullback percentages.
When both are true, the indicator plots the green triangle and optional label.
Default parameters
Min Run % = 10
Min Current % = 3
Max Current % = 8
Session Start = 09:30 – 16:00 US Eastern
All can be changed to fit different volatility levels.
Lower values catch smaller moves; higher values restrict signals to explosive runners.
Using it in real time
During live trading, Pullback Finder Auto updates with each candle.
When a bar first enters the target zone, a green triangle and PB label will appear immediately under that candle.
These are dynamic: if price moves out of the valid zone on the same bar, the marker may disappear.
You can create an alert on “Pullback Finder Auto – Pullback Candidate” to be notified whenever new triangles appear across your active symbols.
This works on any timeframe:
use shorter timeframes such as 1‑minute or 5‑minute charts for fast, intraday detection,
use longer timeframes for a broader view of the day’s market structure.
Using it on past data (scanning backwards)
When you scroll back through history, past green triangles remain visible at every bar where the condition was true at that time.
The PB labels next to those candles show exactly how far above the open the stock was trading during the historical setup.
Use this for visual back‑testing: study how price reacted after these pullback points, adjust the thresholds, and refine your criteria for different markets.
The grey or teal line under the chart (if enabled) shows the percent‑from‑open curve so you can see the full run‑and‑cool pattern leading into each triangle signal.
If you convert the indicator into a strategy, the same condition becomes historical entry points you can test with the Strategy Tester.
Summary
1. Pullback Finder Auto paints green triangles and PB labels whenever an intraday pullback fits your criteria.
2. It runs dynamically in real‑time and also preserves markers for historical review.
3. Adjust the thresholds to match volatility or timeframe.
4. Ideal for visual scanning, watchlist alerts, or integration into a lightweight screening strategy.






















