ATR Horizontal Lines from EMA and SMA with TableHow it works:
The script calculates ATR levels (of your choosing)
Instead of plotting curves, it creates horizontal lines
The lines are deleted and recreated on each bar to show current levels
Lines extend to the right or can be limited to a certain width
Customization options:
Line width (1-10 pixels)
Individual colors for each of the 4 lines
All the original parameters (EMA/SMA lengths, ATR length, multipliers)
The horizontal lines will now show the current ATR-based support/resistance levels and move dynamically as the EMAs, SMA, and ATR values change with new price data.
Forecasting
OPR 4 ZonesThe OPR 4-Zone Boxes indicator visualizes four distinct market sessions on your chart by automatically drawing boxed ranges (high / low) and dotted midlines for each session. Each session box is created using time-based timestamps (timezone-aware) and updates in real time during the session. When the session closes, the box is locked to the session end, while an optional extension can display the session range for a configurable period afterward — useful for spotting retests, breakouts, and bias zones.
Designed for traders who rely on session structure and price-action, OPR 4-Zone provides clear, non-intrusive visuals and is fully configurable: enable or disable individual sessions, set start/end and extension times per session, choose colors and transparency for both the primary box and the extension, and display dotted midlines to quickly gauge session control. Objects are cleaned up at the start of each new day to prevent clutter and ensure reliable behavior when scrolling or changing timeframes.
Key features :
- Four independent session boxes (Morning, Afternoon, Evening, Night) with separate enable switches
- Timezone-aware timestamping so boxes align with the session times you want
- Locked session ranges at session close and optional extension period after close
- Dotted midline for quick reference to the session midpoint
- Customizable colors and background transparency for both base and extended boxes
- Automatic cleanup of session objects on new trading day to avoid frozen or stray boxes
- Lightweight and overlay-friendly with sensible defaults for fast setup
Suggested usage :
Use the indicator to mark session ranges for intraday support/resistance, identify where price is trading relative to session midpoint, and watch for breakout or rejection setups near session highs/lows. Combine with volume-based or momentum indicators to confirm breakouts through the session box.
3/4-Bar GRG / RGR Pattern (Conditional 4th Candle)This indicator can be used to identify the Green-Red-Green or Red-Green-Red pattern.
It is a price action indicator where a price action which identifies the defeat of buyers and sellers.
If the buyers comprehensively defeat the sellers then the price moves up and if the sellers defeat the buyers then the price moves down.
In my trading experience this is what defines the price movement.
It is a 3 or 4 candle pattern, beyond that i.e, 5 or more candles could mean a very sideways market and unnecessary signal generation.
How does it work?
Upside/Green signal
Say candle 1 is Green, which means buyers stepped in, then candle 2 is Red or a Doji, that means sellers brought the price down. Then if candle 3 is forming to be Green and breaks the closing of the 1st candle and opening of the 2nd candle, then a green arrow will appear and that is the place where you want to take your trade.
Here the buyers defeated the sellers.
Sometimes candle 3 falls short but candle 4 breaks candle 1's closing and candle 2's opening price. We can enter on candle 4.
Important - We need to enter the trade as soon as the price moves above the candle 1 and 2's body and should not wait for the 3rd or 4th candle to close. Ignore wicks.
I have restricted it to 4 candles and that is all that is needed. More than that is a longer sideways market.
I call it the +-+ or GRG pattern.
Stop loss can be candle 2's mid for safe traders (that includes me) or candle 2's body low for risky traders.
Back testing suggests that body low will be useless and result in more points in loss because for the bigger move this point will not be touched, so why not get out faster.
Downside/Red signal
Say candle 1 is Red, which means sellers stepped in, then candle 2 is Green or a Doji, that means buyers took the price up. Then if candle 3 is forming to be Red and breaks the closing of the 1st candle and opening of the 2nd candle then a Red arrow will appear and that is the place where you want to take your trade.
Sometimes candle 3 falls short but candle 4 breaks candle 1's closing and candle 2's opening price. We can enter on candle 4.
We need to enter the trade as soon as the price moves below the candle 1 and 2's body and should not wait for the 3rd or 4th candle to close.
I have restricted it to 4 candles and that is all that is needed. More than that is a longer sideways market.
I call it the -+- or RGR pattern.
Stop loss can be candle 2's mid for safe traders ( that includes me) or candle 2's body high for risky traders.
Back testing suggests that body high will be useless and result in more points in loss because for the bigger move this point will not be touched, so why not get out faster.
Important Settings
You can enable or disable the 4th candle signal to avoid the noise, but at times I have noticed that the 4th candle gives a very strong signal or I can say that the strong signal falls on the 4th candle. This is mostly a coincidence.
You can also configure how many previous bars should the signal be generated for. 10 to 30 is good enough. To backtest increase it to 2000 or 5000 for example.
Rest are self explanatory.
Pointers
If after taking the trade, the next candle moves in your direction and closes strong bullish or bearish, then move SL to break even and after that you can trail it.
If a upside trade hits SL and immediately a down side trade signal is generated on the next candle then take it. Vice versa is true.
Trades need to be taken on previous 2 candle's body high or low combined and not the wicks.
The most losses a trader takes is on a sideways day and because in our strategy the stop loss is so small that even on a sideways day we'll get out with a little profit or worst break even.
Hold targets for longer targets and don't panic.
If last 3-4 days have been sideways then there is a good probability that day will be trending so we can hold our trade for longer targets. Target to hold the trade for whole day and not exit till the day closes.
In general avoid trading in the middle of the day for index and stocks. Divide the day into 3 parts and avoid the middle.
Use Support/Resistance, 10, 20, 50, 200 EMA/SMA, Gaps, Whole/Round numbers(very imp) for identifying targets.
Trail your SL.
For indexes I would use 5 min and 15 min timeframe.
For commodities and crypto we can use higher timeframe as well. Look for signals during volatile time durations and avoid trading the whole day. Signal usually gives good targets on those times.
If a GRG or RGR pattern appears on a daily timeframe then this is our time to go big.
Minimum Risk to Reward should be 1:2 and for longer targets can be 1:4 to 1:10.
Trade with small lot size. Money management will happen automatically.
With small lot size and correct Risk-Re ward we can be very profitable. Don't trade with big lot size.
Stay in the market for longer and collect points not money.
Very imp - Watch market and learn to generate a market view.
Very imp - Only 4 candles are needed in trading - strong bullish, strong bearish, hammer, inverse hammer and doji.
Go big on bearish days for option traders. Puts are better bought and Calls are better sold.
Cluster of green signals can lead to bigger move on the upside and vice versa for red signals.
Most of this is what I learned from successful traders (from the top 2%) only the indicator is mine.
Gold Total Market Cap By Wave Trader Gold Total Market Cap (Updated 2025)
Overview
This indicator calculates and visualizes the total market capitalization of gold in real-time, based on the current XAUUSD spot price and the estimated above-ground gold supply. It transforms the raw gold price into a scaled "market cap" view (in trillions USD), helping traders contextualize gold's global value—often compared to stocks, crypto, or fiat reserves. As of October 2025, gold's cap hovers around $26–27T, underscoring its status as a premier safe-haven asset.
How It Works
Core Formula: Market Cap = Gold Price (USD/oz) × Total Supply (troy oz), scaled to trillions for chart readability.
Supply Data: Defaults to the World Gold Council (WGC) mid-2025 estimate of ~218,000 metric tonnes (~7.01B troy oz), but customizable for scenarios like historical or projected figures.
Plotted as a smooth yellow line below the price pane, mirroring gold's price movements but in cap terms.
Key Features
Dynamic Label: A real-time label on the yellow line displays the exact market cap (e.g., "26.8") for instant reference, styled like popular TradingView cap indicators.
Reference Line: Horizontal dashed line at 25T USD to highlight key thresholds (e.g., surpassing Bitcoin's cap).
Info Table: Top-right panel shows current gold price and full market cap (e.g., "26.8T USD") for quick stats.
Overlay-Free: Designed for a separate pane to avoid cluttering your main XAUUSD chart.
Data Sources & Customization
Relies on live XAUUSD close prices from TradingView.
Supply input: Switch between "WGC Mid-2025" (default) or custom values—ideal for sensitivity analysis (e.g., adding future mining output).
No external API calls; fully self-contained for fast performance.
Usage Tips
For Gold Traders: Spot divergences between price momentum and cap growth to gauge overbought/oversold conditions.
Portfolio Context: Compare to S&P 500 cap (~$50T) or BTC (~$2T) by adding multi-symbol alerts.
Timeframes: Best on daily/weekly for long-term trends; works on 1H+ for intraday macro views.
Alerts: Set notifications for cap milestones (e.g., "Gold Cap > 28T") via TradingView's alert system.
Track gold's "infinite market cap" evolution—because unlike stocks, gold's supply grows slowly, amplifying price impact. Updated for 2025 data; feedback welcome! 🚀
ATT Numbers Header (Movable)For anybody that trades with ATT (Advanced Time Technique) And can't remember the numbers and want's to have them on their chart at all time with full customizability as well this indicator is for you.
MF_Average_Seasonal_MovementYou can chose a date range and see the average, min and max movement within that time.
n addition it shows how many longs or shorts would have won in that time frame.
To quikly look at the time periods in the past it markes the chosen dates each year with two horizontal lines.
You can utilize the election year cycle and look only at post election years for example
TRADER PERFORMANCEAn exclusive tool for scalping, day trading, swing trading, and position trading, designed to maximize your success rate and reduce input noise. Recognized for its high accuracy, it's the ideal indicator for those seeking consistency and solid market results.
Mitigation Blocks — Lite (ICT) + Arrows + Stats📌 Mitigation Blocks — Lite (ICT-Based) + Arrows
This indicator detects mitigation blocks based on price structure shifts, inspired by ICT (Inner Circle Trader) concepts. It works by identifying strong impulses and highlighting the last opposite candle, forming a mitigation block zone for potential reversal or continuation trades.
🔍 Features:
✅ Automatic detection of bullish and bearish mitigation blocks
🟩 Box visualization with border color change on mitigation (first touch)
📉 ATR-based impulse filtering
📌 Entry arrows on first mitigation (touch)
📊 Autoscale anchors for better chart readability
📈 Real-time HUD info panel
📉 Backtest-friendly design (stable, deterministic logic)
🛠️ How it works:
Detects swing highs/lows using pivot points.
Confirms impulse candles breaking recent structure.
Locates the last opposite candle as the mitigation block.
Displays a block box until price revisits the zone.
On the first touch (mitigation), the block is marked and arrows are drawn.
💡 Ideal Use Case:
Apply this on higher timeframes (e.g., 4H) to identify potential limit order zones.
Use the blocks as entry zones and combine with confluence: FVGs, imbalance, S&D, or liquidity levels.
🧠 Extra Tip:
You can extend this script to include:
Win-rate tracking
Auto TP/SL levels based on ATR
Confluence detection (e.g., FVG, order blocks)
EMA Dual with SL/TP ATR basedDouble EMA with cross and direction display.
Calculate stop loss / take profit based on ATR
If entering is not in the recognize direction also SL/TP is display (inversed values)
SL is 2xATR and TP is 4xAT by default - can be change
Also, SL/TP can be calculated at cross or at actual - see the table.
Multi-Market Trend-Pullback Alerts (EMA20/50 + RSI) [v6]//@version=6 replaces 5
Some functions (like label.delete) need to be called as methods
Minor syntax tightening around string concatenation and label management
All alertcondition() and table logic still works, but must be explicitly version 6 compatible
SMA Pro (Tick)Simple moving average based on 100 ticks, by default. Use for high volume markets like ES, NQ, and RTY.
Trend Discovery by Alex Trend States (Up / Reversal / Down)Author: © Alex Neighbors
Version: v6
The Call/Put Arrow Indicator is a complete market direction tool that identifies high-probability CALL (bullish) and PUT (bearish) opportunities using a combination of:
Simple Moving Averages (SMA)
RSI Momentum
MACD confirmation
VWAP trend filtering
Real-time trend classification (Trending Up, Trending Down, or Reversal)
It provides visual buy/sell arrows, trend labels, and alerts, helping traders quickly recognize optimal option entry points and directional momentum changes.
*** How It Works
✅ CALL Arrow (Green, Up Arrow Below Candle):
Triggered when:
Fast SMA > Slow SMA (uptrend)
RSI > Threshold (default 55)
MACD Line > Signal Line
(Optional) Price > VWAP
🔻 PUT Arrow (Red, Down Arrow Above Candle):
Triggered when:
Fast SMA < Slow SMA (downtrend)
RSI < Threshold (default 45)
MACD Line < Signal Line
(Optional) Price < VWAP
**Trend Detection System:
Trending Up: Both SMAs rising with bullish alignment
Trending Down: Both SMAs falling with bearish alignment
Trend Reversal: Detected instantly when Fast SMA crosses the Slow SMA (marked by a diamond)
Visuals
🟩 Green arrows below candles for CALL entries
🟥 Red arrows above candles for PUT entries
🟢/🔴 Diamonds mark trend reversals
Trend status panel in the top-right corner
Optional background or bar coloring for quick visual confirmation
Alerts
You can create alerts for:
CALL Buy Signal
PUT Buy Signal
Trend Reversal Up
Trend Reversal Down
All alerts trigger exactly when arrows or reversals appear on the chart.
--Best Use
Works on any symbol or timeframe (scalping, swing, or trend trading)
Optimized for SPX, QQQ, TSLA, and high-volume tickers
Ideal for traders combining options flow or price action confirmation
Customization
You can adjust:
SMA lengths
RSI thresholds
MACD parameters
VWAP filter toggle
Background/bar coloring and panel display
Why Traders Love It
Simple, clean chart visuals
Non-repainting, confirmed-bar signals
Multi-filter logic for high accuracy
Trend panel for instant context
Use this indicator to stay on the right side of the market.
Identify reversals early, trade the momentum confidently, and never miss your next CALL or PUT setup again.
Chaos Theory Pro # Anyone who has paid for this script previously, please DM as per author instructions to continue your lifetime access
## The Edge: Smart Zone-Based Trading
This indicator's primary advantage lies in its zone-based approach that naturally encompasses critical areas of support and resistance. These zones capture key market structures including:
- High-volume price clusters
- Support-to-resistance (and resistance-to-support) transitions
- Other significant price action areas
By identifying these zones, the indicator addresses two of the most challenging problems in trading : optimal stop loss placement and take profit targeting.
---
## How to Use This Indicator
### Entry Rules: Limit Orders Only
Critical: All entries must be LIMIT orders. Never use market orders or stop orders.
Here's why:
- Why limit orders? The zones represent areas of strong support and resistance (an unintended but beneficial feature of the indicator's design). Price frequently pulls back to these zones before continuing, giving you optimal entry opportunities.
- Why not market orders? You'll miss the better prices at the zone boundaries.
- Why not stop orders? These zones are areas of intense market activity. Price often "spikes" through zone borders to capture liquidity before reversing in the intended direction. Stop orders would get triggered on these false moves.
Proper Entry Technique:
1. Wait for the candle/bar to close
2. Place your limit order at the zone border
3. Let price come to you
### Take Profit Strategy
Target the next zone (recommended) or multiple zones ahead based on your risk appetite. The simplest and most consistent approach is single-zone targeting.
---
## Your Responsibility: Confluence Analysis
The indicator tells you WHERE to enter, WHERE to place your stop loss, and WHERE to take profit. But you must determine WHEN to trade by identifying confluences.
### Minimum Requirement: 3 Confluences
Before placing any order, look for at least three confirming signals from:
- Divergences : RSI, MFI, or CVD candles
- Volume analysis : Volume Profile
- Order flow : Footprint charts
- Price action : Candlestick patterns
- Market theories : Wyckoff, Dow Theory, Elliott Wave
- Other technical tools of your choice
### You Have Time
The indicator provides alerts when price approaches a zone . During the pullback, you have time to conduct thorough confluence analysis. Only place your limit order after identifying your 3+ confluences.
---
## Alternative Approaches
If you backtest and find that market entries work better for your specific strategy (e.g., using moving average crossovers or other triggers), you're free to adapt the method. However, the limit order approach outlined above is designed to work consistently for everyone, regardless of whether they have an existing strategy.
---
## How the Indicator Works: The Mathematical Foundation
### Based on Chaos Theory - A Predictive, Not Reactive System
This indicator represents a fundamentally different approach to market analysis. Unlike traditional indicators that describe what price has done (using averages, volume, volatility), this system predicts where price will go using chaos theory mathematics.
Key Principle : Price behaves as a complex dynamical system that is highly sensitive to initial conditions - similar to weather patterns or planetary orbits. While we cannot predict when price will reach a destination, we can predict where it will likely travel within probability bounds.
### What Makes This Different
Traditional Indicators:
- React to historical data with lagging signals
- Use linear mathematics and statistical averages
- Assume markets are random or follow simple patterns
This Chaos Theory Approach:
- Proactively identifies future probability zones
- Uses non-linear complex systems mathematics
- Treats markets as chaotic but mathematically predictable
- Applies universal mathematical laws (no curve fitting needed)
### The Butterfly Effect in Trading
Small changes at critical junctures can cascade into major trend changes. The indicator identifies these critical probability zones - mathematical "attractors" toward which price is naturally drawn.
### Understanding the Zones
Orange Zones : Mathematical probability destinations where price is likely to expand
Activation Rule : Price must close outside any zone (full candle body, not just wicks) to activate the next probability destination
Primary Principle : Once activated, price travels to the next zone before closing back behind the originating zone border
Red Dots : Indicate areas where valid zone sets were available for trading. Empty spaces mean price closed past the highest/lowest zone or zones were invalidated.
### Probability-Based Performance
The indicator includes a statistics panel that measures real-time success rates - tracking how often price reaches predicted zones before invalidation. This transparent performance measurement allows you to verify probability calculations for your specific symbol and timeframe.
### Universal Application
Because this is based on fundamental mathematical principles (not optimized parameters), it works consistently across:
- All markets: Forex, stocks, crypto, commodities
- All timeframes: From scalping to position trading
- All conditions: No adjustments needed for different instruments
Important Understanding : Price is a fractal structure with multiple initial conditions forming and clashing simultaneously. External events and market manipulation can interfere with natural system progression. This is why we provide probabilities, not certainties.
---
Summary : This indicator gives you the framework—precise zones for entries, stops, and targets based on chaos theory mathematics. You provide the timing through confluence analysis. Together, this creates a complete, systematic approach to trading with probability on your side.
---
## Technical Features & Alert System
### Alert System Enhancement
Alert Type Selector:
* "Limit Alerts" (pending orders) vs "Normal Alerts" (market orders)
* 8 fully customizable alert message templates with placeholder support:
* Limit Long Entry
* Limit Short Entry
* Normal Long Entry
* Normal Short Entry
* Limit Long TP/Cancel
* Limit Short TP/Cancel
* Normal Long TP
* Normal Short TP
### Placeholder System
Dynamic placeholder replacement function supporting:
* {SYMBOL} - Trading pair/instrument
* {ENTRY} - Entry price level
* {SL} - Stop loss price level
* {TP} - Take profit price level
* {COMMENT} - Additional trade notes
* {TIMEFRAME} - Current chart timeframe
* {TIME} - Alert trigger time
* {ZONE} - Zone identifier
Users can customize alert messages while maintaining data accuracy across all automated trading platforms.
### Alert Trigger Points
* Entry alerts fire when zone breakout occurs (i == 0)
* TP alerts fire when take profit conditions are met
* Unique zone identifiers prevent duplicate alerts per zone set (format: Z L/S )
### Input Parameters
Converted hardcoded values to adjustable inputs for maximum flexibility:
* Lookback Period : 10-500 (default 50)
* Value Area Share : 0.1-0.9 (default 0.3)
* Show Volume Profile Stats : Toggle on/off
* Has Premium Subscription : Toggle on/off
* Vertical Display : Toggle on/off
### Code Compliance
* All line.new(), label.new(), and table.new() calls formatted on single lines per PineScript v6 requirements
* Proper variable declarations to prevent compilation errors
* Optimized for maximum performance and stability
Core Logic : All original zone calculation, validation, and visualization logic remains intact and unchanged.
Current Price (Customizable) by DRtradeCurrent Price Line & Dynamic Label (Fully Customizable)
The ultimate tool for clear, real-time price visualization.
This powerful, lightweight indicator draws a clean horizontal line at the current market price, updating instantly with every price tick. Unlike other current price line scripts, this tool ensures you always see where the price is right now and provides full control over every visual element.
Key Features:
- Real-Time Tracking: The line moves dynamically with price ticks within the current candle, eliminating lag and providing true current market price awareness.
- Line Extension Control: Choose to extend: Left, Right, or Both. Helpful for scalpers and options traders
- Visual Customizations: Color, Style, Size, Width, etc.
- Label Positioning: Left of Candle, Above Candle, or Right of Candle
All customization options are available in the indicator's settings menu.
Ping me with feature reqeusts.
COT - Weekly Summary# COT Weekly Summary Dashboard - User Manual
## 📊 Overview
**COT Weekly Summary** is an advanced Pine Script dashboard that provides comprehensive real-time analysis of CFTC COT (Commitment of Traders) data. This professional tool allows you to monitor net positions of non-commercial traders across currencies, precious metals, and commodities, all within a single elegant and customizable interface.
### 🎯 Key Features
- **Multi-Asset Analysis**: Major currencies, precious metals, and commodities
- **Real-Time Data**: Automatic weekly updates from CFTC reports
- **BestPair Detector**: Automatically identifies the best trading opportunities
- **Customizable Interface**: Colors, sizes, and positioning fully configurable
- **Dynamic Watermark**: Motivational phrases that change with each new bar
---
## ⚙️ Configuration and Customization
### 📍 Table Position
**Setting**: `Table Position`
- **Top Left**: Top left corner
- **Top Center**: Top center
- **Top Right**: Top right corner
- **Middle Left**: Middle left
- **Middle Center**: Screen center
- **Middle Right**: Middle right
- **Bottom Left**: Bottom left corner
- **Bottom Center**: Bottom center
- **Bottom Right**: Bottom right corner
### 📊 Data Type
**Setting**: `Data Type`
- **Futures Only**: Futures contracts only
- **Futures and Options**: Futures + options (more complete data)
### 🎨 Color Customization
#### Base Table Colors
- **Header Background**: Header background color
- **Header Text**: Header text color
- **Frame Color**: Table frame color
- **Border Color**: Cell border color
#### Dynamic Row Colors
- **Positive Background**: Background for positive changes
- **Positive Text**: Text for positive changes
- **Negative Background**: Background for negative changes
- **Negative Text**: Text for negative changes
- **Neutral Background**: Background for neutral changes
#### BestPair Colors (Dynamic Gradient)
- **Red Background**: Pairs with strength 0-10
- **Orange Background**: Pairs with strength 10-20
- **Yellow Background**: Pairs with strength 20-30
- **Light Green Background**: Pairs with strength 30-70
- **Dark Green Background**: Pairs with strength 70+
### 📏 Text Size
**Available options**: Tiny, Small, Normal, Large, Huge
---
## 📋 Asset Categories
### 💱 Major Currencies
**Activation**: `Show Major Currencies`
Monitors the 8 main Forex currencies:
- **EUR** - Euro
- **GBP** - British Pound
- **JPY** - Japanese Yen
- **CHF** - Swiss Franc
- **CAD** - Canadian Dollar
- **AUD** - Australian Dollar
- **NZD** - New Zealand Dollar
- **USD** - US Dollar
### 🥇 Metals
**Activation**: `Show Metals`
Includes the main precious metals:
- **GOLD** - Gold
- **SILVER** - Silver
- **PLATINUM** - Platinum
- **PALLADIUM** - Palladium
- **COPPER** - Copper
### 🌾 Commodities
**Activation**: `Show Commodities`
Covers the most important commodities:
- **WTI** - West Texas Intermediate Oil
- **NATURAL GAS** - Natural Gas
- **COCOA** - Cocoa
- **CORN** - Corn
- **SUGAR** - Sugar
- **COFFEE** - Coffee
- **SOYBEANS** - Soybeans
### 🎯 BestPair Detection
**Activation**: `Show BestPair`
The BestPair system automatically analyzes all currencies and identifies the best trading opportunities by combining:
- Currencies with positive changes (bullish trend)
- Currencies with negative changes (bearish trend)
- Calculation of "Strength Score" for each pair
**How it works**:
1. Identifies currencies with opposite trends
2. Calculates relative strength of each pair
3. Applies dynamic colors based on strength
4. Shows only the most promising pairs
---
## 📊 Data Interpretation
### Table Columns
1. **ASSET**: Asset name (currency, metal, commodity)
2. **NET POSITIONS**: Current net positions of non-commercial traders
3. **# CHANGE**: Numerical change from previous week
4. **% CHANGE**: Percentage change (determines row color)
### 🎨 Color System
- **Green**: Positive changes (bullish sentiment)
- **Red**: Negative changes (bearish sentiment)
- **Neutral**: Minimal or no changes
### 📈 BestPair Strength Score
The color system for BestPair indicates pair strength:
- **🔴 Red (0-10)**: Low strength
- **🟠 Orange (10-20)**: Moderate strength
- **🟡 Yellow (20-30)**: Good strength
- **🟢 Light Green (30-70)**: High strength
- **🟢 Dark Green (70+)**: Excellent strength
---
## 💡 Usage Tips
### ⏰ **IMPORTANT: Weekly Timeframe Only**
**This indicator works ONLY on Weekly (1W) timeframe. Make sure your chart is set to Weekly before using the dashboard.**
### 📊 Weekly Analysis
- COT data is updated every Tuesday (previous Friday's data)
- Focus on percentage changes rather than absolute values
- Changes above 10% are generally significant
### 🎯 Trading with BestPair
- Dark green pairs (70+) offer the best opportunities
- Combine COT analysis with technical analysis
- Consider opposite sentiment as potential reversal
### ⚡ Performance Optimization
- Disable unnecessary categories to reduce loading times
- Use "Futures Only" if you don't need options data
- Position the table where it doesn't interfere with your charts
---
## ❓ Troubleshooting
### Common Issues
1. **Table not appearing**: Check that you're on Weekly timeframe
2. **Data not updating**: COT data is released with a 3-day delay
3. **Performance issues**: Disable unused asset categories
4. **Colors not showing**: Verify color settings in Style tab
### Technical Requirements
- **Timeframe**: Weekly (1W) only
- **Market**: Works on any symbol (data is independent)
- **Account**: Works with any TradingView account type
---
## 🤝 Support the Project
If this indicator has been helpful for your trading analysis, consider supporting its development:
**☕ Buy Me a Coffee**: buymeacoffee.com
Your support helps maintain and improve this tool for the entire trading community!
---
**Happy Trading! 📈**
---
EMA 20+50 + MACD Strateji ( omerprıme)EASY BUY-SELL basitçe al -sat yapabileceğiniz macd indikatörü ve ema kullanılmış bir indikatördür unutmayın ki ne kadar basit o kadar verimli.
Moving Averages) to generate trading signals and trend confirmation.
Trend Identification with EMA
Two EMAs are used to determine the overall market trend (commonly a short-term EMA and a long-term EMA).
When the short EMA crosses above the long EMA, it indicates an uptrend.
When the short EMA crosses below the long EMA, it signals a downtrend.
Signal Confirmation with MACD
The MACD line and Signal line are analyzed to detect momentum shifts.
A bullish signal occurs when the MACD line crosses above the Signal line, especially if the EMAs confirm an uptrend.
A bearish signal occurs when the MACD line crosses below the Signal line, especially if the EMAs confirm a downtrend.
Trading Logic
Buy signals appear only when both the EMA trend is bullish and the MACD confirms momentum to the upside.
Sell signals appear only when both the EMA trend is bearish and the MACD confirms momentum to the downside.
Predictive Pivot Matrix OHLC data, integrates volume profile for POC/Value Area tracking (including virgin POC), applies rule-based "ML" scoring to evaluate pivot strength via factors like proximity, volume, touches, trend, and confluence, monitors adaptive success rates, projects 5-day future pivots using trend/volatility, detects overlapping confluence zones, and generates visuals (lines, labels, table), alerts, and buy/sell signals on key crossings.
Brownian Motion Probabilistic Forecasting (Time Adaptive)Probabilistic Price Forecast Indicator
Overview
The Probabilistic Price Forecast is an advanced technical analysis tool designed for the TradingView platform. Instead of predicting a single future price, this indicator uses a Monte Carlo simulation to model thousands of potential future price paths, generating a cone of possibilities and calculating the probability of specific outcomes.
This allows traders to move beyond simple price targets and ask more sophisticated questions, such as: "What is the probability that this stock will increase by 5% over the next 24 hours?"
Core Concept: Geometric Brownian Motion
The indicator's forecasting model is built on the principles of Geometric Brownian Motion (GBM) , a widely accepted mathematical model for describing the random movements of financial asset prices. The core idea is that the next price step is a function of the asset's historical trend (drift), its volatility, and a random "shock."
The formula used to project each price step in the simulation is:
next_price = current_price * exp( (μ - (σ²/2))Δt + σZ√(Δt) )
Where:
μ (mu) represents the drift , which is the average historical return.
σ (sigma) represents the volatility , measured by the standard deviation of historical returns.
Z is a random variable from a standard normal distribution, representing the random "shock" or new information affecting the price.
Δt (delta t) is the time step for each projection.
How It Works
The indicator performs a comprehensive analysis on the most recent bar of the chart:
**Historical Analysis**: It first analyzes a user-defined historical period (e.g., the last 240 hours of price data) to calculate the asset's historical drift (μ) and volatility (σ) from its logarithmic returns.
**Monte Carlo Simulation**: It then runs thousands of simulations (e.g., 2000) of future price paths over a specified forecast period (e.g., the next 24 hours). Each path is unique due to the random shock (Z) applied at every step.
**Probability Distribution**: After all simulations are complete, it collects the final price of each path and sorts them to build a probability distribution of potential outcomes.
**Visualization and Signaling**: Finally, it visualizes this distribution on the chart and generates signals based on the user's criteria.
Key Features & Configuration
The indicator is highly configurable, allowing you to tailor its analysis to your specific needs.
Time-Adaptive Periods
The lookback and forecast periods are defined in hours , not bars. The script automatically converts these hour-based inputs into the correct number of bars based on the chart's current timeframe, ensuring the analysis remains consistent across different chart resolutions.
Forecast Quartiles
You can visualize the forecast as a "cone of probability" on the chart. The indicator draws lines and a shaded area representing the price levels for different quartiles (percentiles) of the simulation results. By default, this shows the range between the 25th and 95th percentiles.
Independent Bullish and Bearish Signals
The indicator allows you to set independent criteria for bullish and bearish signals, providing greater flexibility. You can configure:
A bullish signal for an X% confidence of a Y% price increase.
A bearish signal for a W% confidence of a Z% price decrease.
For example, you can set it to alert you for a 90% chance of a 2% drop, while simultaneously looking for a 60% chance of a 10% rally.
How to Interpret the Indicator
The Forecast Cone : The blue shaded area on the chart represents the probable range of future prices. The width of the cone indicates the expected volatility; a wider cone means higher uncertainty. The price labels on the right side of the cone show the calculated percentile levels at the end of the forecast period.
Green Signal Label : A green "UP signal" label appears when the probability of the price increasing by your target percentage exceeds your defined confidence level.
Red Signal Label : A red "DOWN signal" label appears when the probability of the price decreasing by your target percentage exceeds your confidence level.
This tool provides a statistical edge for understanding future possibilities but should be used in conjunction with other analysis techniques.
Volume Based Sampling [BackQuant]Volume Based Sampling
What this does
This indicator converts the usual time-based stream of candles into an event-based stream of “synthetic” bars that are created only when enough trading activity has occurred . You choose the activity definition:
Volume bars : create a new synthetic bar whenever the cumulative number of shares/contracts traded reaches a threshold.
Dollar bars : create a new synthetic bar whenever the cumulative traded dollar value (price × volume) reaches a threshold.
The script then keeps an internal ledger of these synthetic opens, highs, lows, closes, and volumes, and can display them as candles, plot a moving average calculated over the synthetic closes, mark each time a new sample is formed, and optionally overlay the native time-bars for comparison.
Why event-based sampling matters
Markets do not release information on a clock: activity clusters during news, opens/closes, and liquidity shocks. Event-based bars normalize for that heteroskedastic arrival of information: during active periods you get more bars (finer resolution); during quiet periods you get fewer bars (coarser resolution). Research shows this can reduce microstructure pathologies and produce series that are closer to i.i.d. and more suitable for statistical modeling and ML. In particular:
Volume and dollar bars are a common event-time alternative to time bars in quantitative research and are discussed extensively in Advances in Financial Machine Learning (AFML). These bars aim to homogenize information flow by sampling on traded size or value rather than elapsed seconds.
The Volume Clock perspective models market activity in “volume time,” showing that many intraday phenomena (volatility, liquidity shocks) are better explained when time is measured by traded volume instead of seconds.
Related market microstructure work on flow toxicity and liquidity highlights that the risk dealers face is tied to information intensity of order flow, again arguing for activity-based clocks.
How the indicator works (plain English)
Choose your bucket type
Volume : accumulate volume until it meets a threshold.
Dollar Bars : accumulate close × volume until it meets a dollar threshold.
Pick the threshold rule
Dynamic threshold : by default, the script computes a rolling statistic (mean or median) of recent activity to set the next bucket size. This adapts bar size to changing conditions (e.g., busier sessions produce more frequent synthetic bars).
Fixed threshold : optionally override with a constant target (e.g., exactly 100,000 contracts per synthetic bar, or $5,000,000 per dollar bar).
Build the synthetic bar
While a bucket fills, the script tracks:
o_s: first price of the bucket (synthetic open)
h_s: running maximum price (synthetic high)
l_s: running minimum price (synthetic low)
c_s: last price seen (synthetic close)
v_s: cumulative native volume inside the bucket
d_samples: number of native bars consumed to complete the bucket (a proxy for “how fast” the threshold filled)
Emit a new sample
Once the bucket meets/exceeds the threshold, a new synthetic bar is finalized and stored. If overflow occurs (e.g., a single native bar pushes you past the threshold by a lot), the code will emit multiple synthetic samples to account for the extra activity.
Maintain a rolling history efficiently
A ring buffer can overwrite the oldest samples when you hit your Max Stored Samples cap, keeping memory usage stable.
Compute synthetic-space statistics
The script computes an SMA over the last N synthetic closes and basic descriptors like average bars per synthetic sample, mean and standard deviation of synthetic returns, and more. These are all in event time , not clock time.
Inputs and options you will actually use
Data Settings
Sampling Method : Volume or Dollar Bars.
Rolling Lookback : window used to estimate the dynamic threshold from recent activity.
Filter : Mean or Median for the dynamic threshold. Median is more robust to spikes.
Use Fixed? / Fixed Threshold : override dynamic sizing with a constant target.
Max Stored Samples : cap on synthetic history to keep performance snappy.
Use Ring Buffer : turn on to recycle storage when at capacity.
Indicator Settings
SMA over last N samples : moving average in synthetic space . Because its index is sample count, not minutes, it adapts naturally: more updates in busy regimes, fewer in quiet regimes.
Visuals
Show Synthetic Bars : plot the synthetic OHLC candles.
Candle Color Mode :
Green/Red: directional close vs open
Volume Intensity: opacity scales with synthetic size
Neutral: single color
Adaptive: graded by how large the bucket was relative to threshold
Mark new samples : drop a small marker whenever a new synthetic bar prints.
Comparison & Research
Show Time Bars : overlay the native time-based candles to visually compare how the two sampling schemes differ.
How to read it, step by step
Turn on “Synthetic Bars” and optionally overlay “Time Bars.” You will see that during high-activity bursts, synthetic bars print much faster than time bars.
Watch the synthetic SMA . Crosses in synthetic space can be more meaningful because each update represents a roughly comparable amount of traded information.
Use the “Avg Bars per Sample” in the info table as a regime signal. Falling average bars per sample means activity is clustering, often coincident with higher realized volatility.
Try Dollar Bars when price varies a lot but share count does not; they normalize by dollar risk taken in each sample. Volume Bars are ideal when share count is a better proxy for information flow in your instrument.
Quant finance background and citations
Event time vs. clock time : Easley, López de Prado, and O’Hara advocate measuring intraday phenomena on a volume clock to better align sampling with information arrival. This framing helps explain volatility bursts and liquidity droughts and motivates volume-based bars.
Flow toxicity and dealer risk : The same authors show how adverse selection risk changes with the intensity and informativeness of order flow, further supporting activity-based clocks for modeling and risk management.
AFML framework : In Advances in Financial Machine Learning , event-driven bars such as volume, dollar, and imbalance bars are presented as superior sampling units for many ML tasks, yielding more stationary features and fewer microstructure distortions than fixed time bars. ( Alpaca )
Practical use cases
1) Regime-aware moving averages
The synthetic SMA in event time is not fooled by quiet periods: if nothing of consequence trades, it barely updates. This can make trend filters less sensitive to calendar drift and more sensitive to true participation.
2) Breakout logic on “equal-information” samples
The script exposes simple alerts such as breakout above/below the synthetic SMA . Because each bar approximates a constant amount of activity, breakouts are conditioned on comparable informational mass, not arbitrary time buckets.
3) Volatility-adaptive backtests
If you use synthetic bars as your base data stream, most signal rules become self-paced : entry and exit opportunities accelerate in fast markets and slow down in quiet regimes, which often improves the realism of slippage and fill modeling in research pipelines (pair this indicator with strategy code downstream).
4) Regime diagnostics
Avg Bars per Sample trending down: activity is dense; expect larger realized ranges.
Return StdDev (synthetic) rising: noise or trend acceleration in event time; re-tune risk.
Interpreting the info panel
Method : your sampling choice and current threshold.
Total Samples : how many synthetic bars have been formed.
Current Vol/Dollar : how much of the next bucket is already filled.
Bars in Bucket : native bars consumed so far in the current bucket.
Avg Bars/Sample : lower means higher trading intensity.
Avg Return / Return StdDev : return stats computed over synthetic closes .
Research directions you can build from here
Imbalance and run bars
Extend beyond pure volume or dollar thresholds to imbalance bars that trigger on directional order flow imbalance (e.g., buy volume minus sell volume), as discussed in the AFML ecosystem. These often further homogenize distributional properties used in ML. alpaca.markets
Volume-time indicators
Re-compute classical indicators (RSI, MACD, Bollinger) on the synthetic stream. The premise is that signals are updated by traded information , not seconds, which may stabilize indicator behavior in heteroskedastic regimes.
Liquidity and toxicity overlays
Combine synthetic bars with proxies of flow toxicity to anticipate spread widening or volatility clustering. For instance, tag synthetic bars that surpass multiples of the threshold and test whether subsequent realized volatility is elevated.
Dollar-risk parity sampling for portfolios
Use dollar bars to align samples across assets by notional risk, enabling cleaner cross-asset features and comparability in multi-asset models (e.g., correlation studies, regime clustering). AFML discusses the benefits of event-driven sampling for cross-sectional ML feature engineering.
Microstructure feature set
Compute duration in native bars per synthetic sample , range per sample , and volume multiple of threshold as inputs to state classifiers or regime HMMs . These features are inherently activity-aware and often predictive of short-horizon volatility and trend persistence per the event-time literature. ( Alpaca )
Tips for clean usage
Start with dynamic thresholds using Median over a sensible lookback to avoid outlier distortion, then move to Fixed thresholds when you know your instrument’s typical activity scale.
Compare time bars vs synthetic bars side by side to develop intuition for how your market “breathes” in activity time.
Keep Max Stored Samples reasonable for performance; the ring buffer avoids memory creep while preserving a rolling window of research-grade data.
Portfolio Simulator & BacktesterMulti-asset portfolio simulator with different metrics and ratios, DCA modeling, and rebalancing strategies.
Core Features
Portfolio Construction
Up to 5 assets with customizable weights (must total 100%)
Support for any tradable symbol: stocks, ETFs, crypto, indices, commodities
Real-time validation of allocations
Dollar Cost Averaging
Monthly or Quarterly contributions
Applies to both portfolio and benchmark for fair comparison
Model real-world investing behavior
Rebalancing
Four strategies: None, Monthly, Quarterly, Yearly
Automatic rebalancing to target weights
Transaction cost modeling (customizable fee %)
Key Metrics Table
CAGR: Annualized compound return (S&P 500 avg: ~10%)
Alpha: Excess return vs. benchmark (positive = outperformance)
Sharpe Ratio: Return per unit of risk (>1.0 is good, >2.0 excellent)
Sortino Ratio: Like Sharpe but only penalizes downside (better metric)
Calmar Ratio: CAGR / Max Drawdown (>1.0 good, >2.0 excellent)
Max Drawdown: Largest peak-to-trough decline
Win Rate: % of positive days (doesn't indicate profitability)
Visualization
Dual-chart comparison - Portfolio vs. Benchmark
Dollar or percentage view toggle
Customizable colors and line width
Two tables: Statistics + Asset Allocation
Adjustable table position and text size
🚀 Quick Start Guide
Enter 1-5 ticker symbols (e.g., SPY, QQQ, TLT, GLD, BTCUSD)
Make sure percentage weights total 100%
Choose date range (ensure chart shows full period - zoom out!)
Configure DCA and rebalancing (optional)
Select benchmark (default: SPX)
Analyze results in statistics table
💡 Pro Tips
Chart data matters: Load SPY or your longest-history asset as main chart
If you select an asset that was not available for the selected period, the chart will not show up! E.g. BTCUSD data: Only available from ~2017 onwards.
Transaction fees: 0.1% default (adjust to match your broker)
⚠️ Important Notes
Requires visible chart data (zoom out to show full date range)
Limited by each asset's historical data availability
Transaction fees and costs are modeled, but taxes/slippage are not
Past performance ≠ future results
Use for research and education only, not financial advice
Let me know if you have any suggestions to improve this simulator.
KAPITAS TBR 12am-8:30measures the range between 12am(true day open)-8:30am and has % levels where price is sensitive and likely to reverse
KAPITAS CBDR# PO3 Mean Reversion Standard Deviation Bands - Pro Edition
## 📊 Professional-Grade Mean Reversion System for MES Futures
Transform your futures trading with this institutional-quality mean reversion system based on standard deviation analysis and PO3 (Power of Three) methodology. Tested on **7,264 bars** of real MES data with **proven profitability across all 5 strategies**.
---
## 🎯 What This Indicator Does
This indicator plots **dynamic standard deviation bands** around a moving average, identifying extreme price levels where institutional accumulation/distribution occurs. Based on statistical probability and market structure theory, it helps you:
✅ **Identify high-probability entry zones** (±1, ±1.5, ±2, ±2.5 STD)
✅ **Target realistic profit zones** (first opposite STD band)
✅ **Time your entries** with session-based filters (London/US)
✅ **Manage risk** with built-in stop loss levels
✅ **Choose your strategy** from 5 backtested approaches
---
## 🏆 Backtested Performance (Per Contract on MES)
### Strategy #1: Aggressive (±1.5 → ∓0.5) 🥇
- **Total Profit:** $95,287 over 1,452 trades
- **Win Rate:** 75%
- **Profit Factor:** 8.00
- **Target:** 80 ticks ($100) | **Stop:** 30 ticks ($37.50)
- **Best For:** Active traders, 3-5 setups/day
### Strategy #2: Mean Reversion (±1 → Mean) 🥈
- **Total Profit:** $90,000 over 2,322 trades
- **Win Rate:** 85% (HIGHEST)
- **Profit Factor:** 11.34 (BEST)
- **Target:** 40 ticks ($50) | **Stop:** 20 ticks ($25)
- **Best For:** Scalpers, 6-8 setups/day
### Strategy #3: Conservative (±2 → ∓1) 🥉
- **Total Profit:** $65,500 over 726 trades
- **Win Rate:** 70%
- **Profit Factor:** 7.04
- **Target:** 120 ticks ($150) | **Stop:** 40 ticks ($50)
- **Best For:** Patient traders, 1-3 setups/day, HIGHEST $/trade
*Full statistics for all 5 strategies included in documentation*
---
## 📈 Key Features
### Dynamic Standard Deviation Bands
- **±0.5 STD** - Intraday mean reversion zones
- **±1.0 STD** - Primary reversion zones (68% of price action)
- **±1.5 STD** - Extended zones (optimal balance)
- **±2.0 STD** - Extreme zones (95% of price action)
- **±2.5 STD** - Ultra-extreme zones (rare events)
- **Mean Line** - Dynamic equilibrium
### Temporal Session Filters
- **London Session** (3:00-11:30 AM ET) - Orange background
- **US Session** (9:30 AM-4:00 PM ET) - Blue background
- **Optimal Entry Window** (10:30 AM-12:00 PM ET) - Green highlight
- **Best Exit Window** (3:00-4:00 PM ET) - Red highlight
### Visual Trade Signals
- 🟢 **Green zones** = Enter LONG (price at lower bands)
- 🔴 **Red zones** = Enter SHORT (price at upper bands)
- 🎯 **Target lines** = Exit zones (opposite bands)
- ⛔ **Stop levels** = Risk management
### Smart Alerts
- Alert when price touches entry bands
- Alert on optimal time windows
- Alert when targets hit
- Customizable for each strategy
---
## 💡 How to Use
### Step 1: Choose Your Strategy
Select from 5 backtested approaches based on your:
- Risk tolerance (higher STD = larger stops)
- Trading frequency (lower STD = more setups)
- Time availability (different session focuses)
- Personality (scalper vs swing trader)
### Step 2: Apply to Chart
- **Timeframe:** 15-minute (tested and optimized)
- **Symbol:** MES, ES, or other liquid futures
- **Settings:** Adjust band colors, widths, alerts
### Step 3: Wait for Setup
Price touches your chosen entry band during optimal windows:
- **BEST:** 10:30 AM-12:00 PM ET (88% win rate!)
- **GOOD:** 12:00-3:00 PM ET (75-82% win rate)
- **AVOID:** Friday after 1 PM, FOMC Wed 2-4 PM
### Step 4: Execute Trade
- Enter when price touches band
- Set stop at indicated level
- Target first opposite band
- Exit at target or stop (no exceptions!)
### Step 5: Manage Risk
- **For $50K funded account ($250 limit): Use 2 MES contracts**
- Stop after 3 consecutive losses
- Reduce size in low-probability windows
- Track cumulative daily P&L
---
## 📅 Optimal Trading Windows
### By Time of Day
- **10:30 AM-12:00 PM ET:** 88% win rate (BEST) ⭐⭐⭐
- **12:00-1:30 PM ET:** 82% win rate (scalping)
- **1:30-3:00 PM ET:** 76% win rate (afternoon)
- **3:00-4:00 PM ET:** Best EXIT window
### By Day of Week
- **Wednesday:** 82% win rate (BEST DAY) ⭐⭐⭐
- **Tuesday:** 78% win rate (highest volume)
- **Thursday:**