GOLD_30MIN_ALLINONEA comprehensive 30 minute trading tool for XAUUSD trading.
Use in combination of the indicator: 1 minute Easy Scalping Sys v3.0 (by BulltradingAM).
Rules:
1. A solid break out (measure breakout strength from the other indicator mentioned above) from the London session high or low (Orange Boxes), during the first 3 30Min candles of NYC session (Blue Boxes).
2. open position in the direction of the break out, set SL on London session high/low and TP on 1:1 RR or Bollinger Band outer line (for trending trades) and Bollinger Band Base line (for pullbacks and trend reversal trades).
3. No long trades in Bollinger red section and no short trades in Bollinger green section.
More Information:
You need the indicator only for the breakout candle momentum strength with the following indicator settings:
Timeframe 1: 1 Day
Timeframe 2: 30 Minutes
Timeframe 3: 30 Minutes
Timeframe 4: 30 Minutes
and set the week candles fill to blank for easy identification.
You will not need ATRs or Hulls lines or anything else from the other indicator.
Indicatori e strategie
☑️VMA Win % Dashboard for Different LengthsVMA Win % Dashboard for Different Lengths
Overview
This Pine Script indicator evaluates the performance of a Variable Moving Average (VMA) for lengths 13 to 17. It tracks the success rate of price hitting target levels during bullish or bearish trends and displays results in a table. It is part of a combination that includes two other indicators: ✅ VMA Avg ATR + Days to Targets Total Improved 🎯 and 📊 Visual MTF VMA Dashboard🔄️.
How It Works
1. Inputs:
- ATR Length: 14 periods (for volatility).
- VMA Lengths: 13, 14, 15, 16, 17.
2. VMA Calculation:
- Uses closing price.
- Measures price increases (pdm) and decreases (mdm).
- Smooths data to calculate a Directional Movement Index (DMI).
- Adjusts VMA based on momentum and volatility.
3. Trend Detection:
- Bullish: VMA rises (green).
- Bearish: VMA falls (red).
- Neutral: No direction (white).
- Confirms trends align with daily and 195-minute timeframes.
4. Performance Tracking:
- Trend Start: Records price, ATR, and time when a trend begins.
- Price Movement: Tracks highest (bullish) or lowest (bearish) price.
- Targets:
---- T1: Starting price ± historical average movement (ATR-based).
---- T2: Starting price ± 6x ATR.
- Statistics:
---- Counts hits (reached T1/T2) and misses (didn’t reach T1).
---- Calculates win percentages: % of trends hitting T1.
5. Dashboard:
- Table with columns: VMA Length, Win % Up, Win % Down.
- Shows win percentages for each length (e.g., 75.23%).
Use Cases
- Trend Trading: Confirms trend direction and success rate.
- Optimization: Finds the best VMA length.
- Risk Management: Sets ATR-based trade targets.
- Combination: Complements ✅ VMA Avg ATR + Days to Targets Total Improved 🎯 and 📊 Visual MTF VMA Dashboard🔄️ for a complete strategy.
Example
- VMA 15: 80% Win Up, 55% Win Down → Best for bullish trades.
- VMA 13: 75% Win Up, 60% Win Down → More balanced.
Limitations
- Based on historical data, not future predictions.
- Only analyzes trends aligned with higher timeframes.
- No VMA lines or signals plotted on the chart.
SCTI V30Description
The SCTI V30 is an advanced multi-functional technical analysis indicator for TradingView that combines multiple analytical approaches into a single comprehensive tool. This indicator provides:
Multiple Moving Average Types (EMA, SMA, PMA with various calculation methods)
Customizable VWAP with standard deviation bands
Sophisticated Divergence Detection across 12 different indicators
Volume Profile Analysis with peak/trough detection
Highly Configurable Display Options
The indicator is designed to help traders identify trends, potential reversals, and key support/resistance levels across different timeframes.
Features
1. Moving Average Systems
EMA Section: 13 configurable EMA periods (8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584)
SMA Section: 13 configurable SMA periods (same as EMA)
PMA Section: 11 customizable moving averages with multiple calculation methods:
ALMA, EMA, RMA, SMA, SWMA, VWAP, VWMA, WMA
Adjustable lengths from 12 to 1056
Customizable colors, widths, and fill options between MAs
2. VWAP Implementation
Multiple anchor periods (Session, Week, Month, Quarter, Year, etc.)
Standard deviation or percentage-based bands
Option to hide on daily/weekly/monthly timeframes
Customizable band multipliers (1.0, 2.0, 3.0)
3. Divergence Detection
Detects regular and hidden divergences across 12 indicators:
MACD, MACD Histogram, RSI, Stochastic, CCI, Momentum
OBV, VW-MACD, Chaikin Money Flow, Money Flow Index
Williams %R, and custom external indicators
Customizable detection parameters:
Pivot point period (1-50)
Source (Close or High/Low)
Divergence type (Regular, Hidden, or Both)
Minimum number of divergences required (1-11)
Maximum pivot points to check (1-20)
Maximum bars to look back (30-200)
4. Volume Profile Analysis
Configurable profile length (10-5000 bars)
Value Area threshold (0-100%)
Profile placement (Left or Right)
Number of rows (30-130)
Profile width adjustment
Volume node detection:
Peaks (with cluster option)
Troughs (with cluster option)
Highest/Lowest volume nodes
Customizable colors for all elements
Input Parameters
The indicator is organized into 7 parameter groups:
Basic Indicator Settings - Toggle visibility of main components
EMA Settings - Configure 13 EMA periods and visibility
SMA Settings - Configure 13 SMA periods and visibility
PMA Settings - Advanced moving average configuration
VWAP Settings - Volume-weighted average price configuration
Divergence Settings - Comprehensive divergence detection options
Volume Profile & Node Detection - Volume analysis configuration
How to Use
Trend Identification: Use the multiple moving averages to identify trend direction and strength. The Fibonacci-based periods (21, 34, 55, 89, 144, etc.) are particularly useful for this.
Support/Resistance: The VWAP and volume profile components help identify key support/resistance levels.
Divergence Trading: Look for divergences between price and the various indicators to spot potential reversal points.
Volume Analysis: The volume profile shows where the most trading activity occurred, highlighting important price levels.
Customization: Adjust the settings to match your trading style and timeframe. The indicator is highly configurable to suit different trading approaches.
Alerts
The indicator includes alert conditions for:
Positive regular divergence detected
Negative regular divergence detected
Positive hidden divergence detected
Negative hidden divergence detected
Any positive divergence (regular or hidden)
Any negative divergence (regular or hidden)
Notes
The indicator may be resource-intensive due to its comprehensive calculations, especially on lower timeframes with long lookback periods.
Some features (like VWAP) can be hidden on higher timeframes to improve performance.
The default settings are optimized for daily charts but can be adjusted for any timeframe.
This powerful all-in-one indicator provides traders with a complete toolkit for technical analysis, combining trend-following, momentum, volume, and divergence techniques into a single, customizable solution.
Monthly weekly daily Naked LevelsFor example, if the day closes positive and the next day closes negative, or vice versa, you have a daily level. The next time the price returns to this level, you can consider it an S/R level.
This indicator shows these levels until the first touch.
Quant Signals: Econophysics-based MomentumPhysical Momentum Switcher (p0 / p1 / p2 / p3)
This indicator implements a “physical momentum” concept from quantitative finance research, where momentum is defined similarly to physics:
Momentum (p) = Mass × Velocity
Instead of using only the standard cumulative return (classic momentum), it lets you switch between multiple definitions:
p0: Cumulative return over the lookback period (no mass, just price change).
p1: Sum of (mass × velocity) over the lookback period.
p2: Weighted average velocity = (Σ mass×velocity) ÷ (Σ mass).
p3: Sharpe-like momentum = average velocity ÷ volatility (massless).
Velocity can be measured as:
Log return: ln(Pt / Pt-1)
Normal return: (Pt / Pt-1 – 1)
Mass (for p1/p2) can be defined as:
Unit mass (1) — equal weighting, equivalent to traditional momentum.
Turnover proxy — Volume ÷ average volume over k bars.
Value turnover proxy — Dollar volume ÷ average dollar volume.
Inverse volatility — 1 ÷ return volatility over a specified period.
Features:
Switchable momentum definition, velocity type, and mass type.
Adjustable lookback (k) and smoothing period for the signal line.
Optional ±1σ display bands for quick overbought/oversold visual cues.
Alerts for crosses above/below zero or the signal line.
Table display summarizing current settings and values.
Typical uses:
Momentum trading: Buy when PM > 0 (or crosses above the signal), sell/short when PM < 0 (or crosses below).
Contrarian strategies: Reverse the logic when testing mean-reversion effects.
Cross-asset testing: Apply to different instruments to see which PM definition works best.
Combined Futures Open Interest [Sam SDF-Solutions]The Combined Futures Open Interest indicator is designed to provide comprehensive analysis of market positioning by aggregating open interest data from the two nearest futures contracts. This dual-contract approach captures the complete picture of market participation, including rollover dynamics between front and back month contracts, offering traders crucial insights into institutional positioning and market sentiment.
Key Features:
Dual-Contract Aggregation: Automatically identifies and combines open interest from the first and second nearest futures contracts (e.g., ES1! + ES2!), providing a complete view of market positioning that single-contract analysis might miss.
Multi-Period Analysis: Tracks open interest changes across multiple timeframes:
1 Day: Immediate market sentiment shifts
1 Week: Short-term positioning trends
1 Month: Medium-term institutional flows
3 Months: Quarterly positioning aligned with contract expiration cycles
Smart Data Handling: Utilizes last known values when data is temporarily unavailable, preventing false signals from data gaps while clearly indicating when stale data is being used.
EMA Smoothing: Incorporates a customizable Exponential Moving Average (default 65 periods) to identify the underlying trend in open interest, filtering out daily noise and highlighting significant deviations.
Dynamic Visualization:
Color-coded main line showing directional changes (green for increases, red for decreases)
Optional fill areas between OI and EMA to visualize momentum
Separate contract lines for detailed rollover analysis
Customizable labels for significant percentage changes
Comprehensive Information Table: Displays real-time statistics including:
Current total open interest across both contracts
Period-over-period changes in absolute and percentage terms
EMA deviation metrics
Visual status indicators for quick assessment
Contract symbols and data quality warnings
Alert System: Configurable alerts for:
Significant daily changes (customizable threshold)
EMA crossovers indicating trend changes
Large percentage movements suggesting institutional activity
How It Works:
Contract Detection: The indicator automatically identifies the base futures symbol and constructs the appropriate contract codes for the two nearest expirations, or accepts manual symbol input for non-standard contracts.
Data Aggregation: Open interest data from both contracts is retrieved and summed, providing a complete picture that accounts for positions rolling between contracts.
Historical Comparison: The indicator calculates changes from multiple lookback periods (1/5/22/66 days) to show how positioning has evolved across different time horizons.
Trend Analysis: The EMA overlay helps identify whether current open interest is above or below its smoothed average, indicating momentum in position building or reduction.
Visual Feedback: The main line changes color based on daily changes, while the optional table provides detailed numerical analysis for traders requiring precise data.
___________________
This indicator is essential for futures traders, particularly those focused on index futures, commodities, or currency futures where understanding the aggregate positioning across nearby contracts is crucial. It's especially valuable during rollover periods when positions shift between contracts, and for identifying institutional accumulation or distribution patterns that single-contract analysis might miss. By combining multiple timeframe analysis with intelligent data handling and clear visualization, it simplifies the complex task of monitoring open interest dynamics across the futures curve.
Structure From Start – MTF (body-close BOS)Displays higher-timeframe market structure from a chosen start date using body-close BOS logic, with trend state, guard levels, and BOS markers plotted on your current chart.
Multi-Timeframe Market Structure with Body-Close BOS Logic
This indicator tracks market structure from a chosen start date on a higher-timeframe (HTF) of your choice, then displays it on your current chart for intraday context.
It detects swing highs/lows using pivot logic, confirms Break of Structure (BOS) only when a candle closes beyond the swing level (body-close rule), and maintains the “valid swing” level that invalidates the current bias.
Key Features:
• Works on any HTF you select (e.g., H1, H4) while you operate on lower TFs like M5 or M1.
• Start reading structure from any date/time you choose for focused backtesting or scenario analysis.
• Highlights trend state (long/short/neutral) with background colors.
• Plots the active “guard” level (valid swing high/low) that would flip bias if broken.
• Marks BOS events directly on your trading TF, updating only when the HTF candle closes.
Ideal for combining a clear higher-timeframe bias with lower-timeframe execution, without manually tracking HTF structure changes during live markets.
Linh's Anomaly Radar v2What this script does
It’s an event detector for price/volume anomalies that often precede or confirm moves.
It watches a bunch of patterns (Wyckoff tests, squeezes, failed breakouts, turnover bursts, etc.), applies robust z-scores, optional trend filters, cooldowns (to avoid spam), and then fires:
A shape/label on the bar,
A row in the mini panel (top-right),
A ready-made alertcondition you can hook into.
How to add & set up (TradingView)
Paste the script → Save → Add to chart on Daily first (works on any TF).
Open Settings → Inputs:
General
• Use Robust Z (MAD): more outlier-resistant; keep on.
• Z Lookback: 60 bars is ~3 months; bump to 120 for slower regimes.
• Cooldown: min bars to wait before the same signal can fire again (default 5).
• Use trend filter: if on, “bullish” signals only fire above SMA(tfLen), “bearish” below.
Thresholds: fine-tune sensitivity (defaults are sane).
To create alerts: Right-click chart → Add alert
Condition: Linh’s Anomaly Radar v2 → choose a specific signal or Composite (Σ).
Options: “Once per bar close” (recommended).
Customize message if you want ticker/timeframe in your phone push.
The mini panel (top-right)
Signal column: short code (see cheat sheet below).
Fired column: a dot “•” means that on the latest bar this signal fired.
Score (right column): total count of signals that fired this bar.
Σ≥N shows your composite threshold (how many must fire to trigger the “Composite” alert).
Shapes & codes (what’s what)
Code Name (category) What it’s looking for Why it matters
STL Stealth Volume z(volume)>5 & ** z(return)
EVR Effort vs Result squeeze z(vol)>3 & z(TR)<−0.5 Heavy effort, tiny spread → absorption
TGV Tight+Heavy (HL/ATR)<0.6 & z(vol)>3 Tight bar + heavy tape → pro activity
CLS Accumulation cluster ≥3 of last 5 bars: up, vol↑, close near high Classic accumulation footprint
GAP Open drive failure Big gap not filled (≥80%) & vol↑ One-sided open stalls → fade risk
BB↑ BB squeeze breakout Squeeze (z(BBWidth)<−1.3) → close > upperBB & vol↑ Regime shift with confirmation
ER↑ Effort→Result inversion Down day on vol then next bar > prior high Demand overwhelms supply
OBV OBV divergence OBV slope up & ** z(ret20)
WER Wide Effort, Opposite Result z(vol)>3, close+1 Selling into strength / distribution
NS No-Supply (Wyckoff) Down bar, HL<0.6·ATR, vol << avg Sellers absent into weakness
ND No-Demand (Wyckoff) Up bar, HL<0.6·ATR, vol << avg Buyers absent into strength
VAC Liquidity Vacuum z(vol)<−1.5 & ** z(ret)
UTD UTAD (failed breakout) Breaks swing-high, closes back below, vol↑ Stop-run, reversal risk
SPR Spring (failed breakdown) Breaks swing-low, closes back above, vol↑ Bear trap, reversal risk
PIV Pocket Pivot Up bar; vol > max down-vol in lookback Quiet base → sudden demand
NR7 Narrow Range 7 + Vol HL is 7-bar low & z(vol)>2 Coiled spring with participation
52W 52-wk breakout quality New 52-wk close high + squeeze + vol↑ High-quality breakouts
VvK Vol-of-Vol kink z(ATR20,200)>0.5 & z(ATR5,60)<0 Long-vol wakes up, short-vol compresses
TAC Turnover acceleration SMA3 vol / SMA20 vol > 1.8 & muted return Participation surging before move
RBd RSI Bullish div Price LL, RSI HL, vol z>1 Exhaustion of sellers
RS↑ RSI Bearish div Price HH, RSI LH, vol z>1 Exhaustion of buyers
Σ Composite Count of all fired signals ≥ threshold High-conviction bar
Placement:
Triangles up (below bar) → bullish-leaning events.
Triangles down (above bar) → bearish-leaning events.
Circles → neutral context (VAC, VvK, Composite).
Key inputs (quick reference)
General
Use Robust Z (MAD): keep on for noisy tickers.
Z Lookback (lenZ): 60 default; 120 if you want fewer alerts.
Trend filter: when on, bullish signals require close > SMA(tfLen), bearish require <.
Cooldown: prevents repeated firing of the same signal within N bars.
Phase-1 thresholds (core)
Stealth: vol z > 5, |ret z| < 1.
EVR: vol z > 3, TR z < −0.5.
Tight+Heavy: (HL/ATR) < 0.6, vol z > 3.
Cluster: window=5, min=3 strong bars.
GapFail: gap/ATR ≥1.5, fill <80%, vol z > 2.
BB Squeeze: z(BBWidth)<−1.3 then breakout with vol z > 2.
Eff→Res Up: prev bar heavy down → current bar > prior high.
OBV Div: OBV uptrend + |z(ret20)|<0.3.
Phase-2 thresholds (extras)
WER: vol z > 3, close1.
No-Supply/No-Demand: tight bar & very light volume vs SMA20.
Vacuum: vol z < −1.5, |ret z|>1.5.
UTAD/Spring: swing lookback N (default 20), vol z > 2.
Pocket Pivot: lookback for prior down-vol max (default 10).
NR7: 7-bar narrowest range + vol z > 2.
52W Quality: new 52-wk high + squeeze + vol z > 2.
VoV Kink: z(ATR20,200)>0.5 AND z(ATR5,60)<0.
Turnover Accel: SMA3/SMA20 > 1.8 and |ret z|<1.
RSI Divergences: compare to n bars back (default 14).
How to use it (playbooks)
A) Daily scan workflow
Run on Daily for your VN watchlist.
Turn Composite (Σ) alert on with Σ≥2 or ≥3 to reduce noise.
When a bar fires Σ (or a fav combo like STL + BB↑), drop to 60-min to time entries.
B) Breakout quality check
Look for 52W together with BB↑, TAC, and OBV.
If WER/ND appear near highs → downgrade the breakout.
C) Spring/UTAD reversals
If SPR fires near major support and RBd confirms → long bias with stop below spring low.
If UTD + WER/RS↑ near resistance → short/fade with stop above UTAD high.
D) Accumulation basing
During bases, you want CLS, OBV, TGV, STL, NR7.
A pocket pivot (PIV) can be your early add; manage risk below base lows.
Tuning tips
Too many signals? Raise stealthVolZ to 5.5–6, evrVolZ to 3.5, use Σ≥3.
Fast movers? Lower bbwZthr to −1.0 (less strict squeeze), keep trend filter on.
Illiquid tickers? Keep MAD z-scores on, increase lookbacks (e.g., lenZ=120).
Limitations & good habits
First lenZ bars on a new symbol are less reliable (incomplete z-window).
Some ideas (VWAP magnet, close auction spikes, ETF/foreign flows, options skew) need intraday/external feeds — not included here.
Pine can’t “screen” across the whole market; set alerts or cycle your watchlist.
Quick troubleshooting
Compilation errors: make sure you’re on Pine v6; don’t nest functions in if blocks; each var int must be declared on its own line.
No shapes firing: check trend filter (maybe price is below SMA and you’re waiting for bullish signals), and verify thresholds aren’t too strict.
Options Greeks - Market Maker EffectsGreek Reminder is a handy visual tool that helps traders quickly understand how key option Greeks influence market maker behavior and price dynamics. Displayed as an easy-to-read table, it summarizes the effects of DEX, GEX, Charm, and Vanna—showing when market makers are likely to be buying or selling, hedging more or less, and how volatility and time decay shape their actions. With customizable table position and text size, the Greek Reminder keeps essential options insights right on your chart for smarter, more informed trading decisions.
Demand Index (James Sibbet)This indicator is a faithful implementation of James Sibbet’s Demand Index — a leading volume-price oscillator designed to anticipate trend reversals, confirm momentum, and highlight divergences between price and volume pressure.
Key Features
• Original Sibbet Formula with H + L + 2C price input and 0.375 exponential factor.
• Buy/Sell Power Calculation with EMA smoothing (ATAS default settings).
• Demand Index SMA for trend confirmation.
• Zero-Line Centering for quick bullish/bearish identification.
• Red/Green Coloring for immediate sentiment visualization.
How to Use
1. Above Zero → Bullish pressure dominates (green).
2. Below Zero → Bearish pressure dominates (red).
3. Divergences → Price making new highs/lows without confirmation in DI often precedes reversals.
4. Use DI SMA for signal smoothing and better trend filtering.
4 Moving Averages 4 Moving Averages
An indicator with four moving averages with ready-to-use settings. Use them as support and resistance.
Kelly Position Size CalculatorThis position sizing calculator implements the Kelly Criterion, developed by John L. Kelly Jr. at Bell Laboratories in 1956, to determine mathematically optimal position sizes for maximizing long-term wealth growth. Unlike arbitrary position sizing methods, this tool provides a scientifically solution based on your strategy's actual performance statistics and incorporates modern refinements from over six decades of academic research.
The Kelly Criterion addresses a fundamental question in capital allocation: "What fraction of capital should be allocated to each opportunity to maximize growth while avoiding ruin?" This question has profound implications for financial markets, where traders and investors constantly face decisions about optimal capital allocation (Van Tharp, 2007).
Theoretical Foundation
The Kelly Criterion for binary outcomes is expressed as f* = (bp - q) / b, where f* represents the optimal fraction of capital to allocate, b denotes the risk-reward ratio, p indicates the probability of success, and q represents the probability of loss (Kelly, 1956). This formula maximizes the expected logarithm of wealth, ensuring maximum long-term growth rate while avoiding the risk of ruin.
The mathematical elegance of Kelly's approach lies in its derivation from information theory. Kelly's original work was motivated by Claude Shannon's information theory (Shannon, 1948), recognizing that maximizing the logarithm of wealth is equivalent to maximizing the rate of information transmission. This connection between information theory and wealth accumulation provides a deep theoretical foundation for optimal position sizing.
The logarithmic utility function underlying the Kelly Criterion naturally embodies several desirable properties for capital management. It exhibits decreasing marginal utility, penalizes large losses more severely than it rewards equivalent gains, and focuses on geometric rather than arithmetic mean returns, which is appropriate for compounding scenarios (Thorp, 2006).
Scientific Implementation
This calculator extends beyond basic Kelly implementation by incorporating state of the art refinements from academic research:
Parameter Uncertainty Adjustment: Following Michaud (1989), the implementation applies Bayesian shrinkage to account for parameter estimation error inherent in small sample sizes. The adjustment formula f_adjusted = f_kelly × confidence_factor + f_conservative × (1 - confidence_factor) addresses the overconfidence bias documented by Baker and McHale (2012), where the confidence factor increases with sample size and the conservative estimate equals 0.25 (quarter Kelly).
Sample Size Confidence: The reliability of Kelly calculations depends critically on sample size. Research by Browne and Whitt (1996) provides theoretical guidance on minimum sample requirements, suggesting that at least 30 independent observations are necessary for meaningful parameter estimates, with 100 or more trades providing reliable estimates for most trading strategies.
Universal Asset Compatibility: The calculator employs intelligent asset detection using TradingView's built-in symbol information, automatically adapting calculations for different asset classes without manual configuration.
ASSET SPECIFIC IMPLEMENTATION
Equity Markets: For stocks and ETFs, position sizing follows the calculation Shares = floor(Kelly Fraction × Account Size / Share Price). This straightforward approach reflects whole share constraints while accommodating fractional share trading capabilities.
Foreign Exchange Markets: Forex markets require lot-based calculations following Lot Size = Kelly Fraction × Account Size / (100,000 × Base Currency Value). The calculator automatically handles major currency pairs with appropriate pip value calculations, following industry standards described by Archer (2010).
Futures Markets: Futures position sizing accounts for leverage and margin requirements through Contracts = floor(Kelly Fraction × Account Size / Margin Requirement). The calculator estimates margin requirements as a percentage of contract notional value, with specific adjustments for micro-futures contracts that have smaller sizes and reduced margin requirements (Kaufman, 2013).
Index and Commodity Markets: These markets combine characteristics of both equity and futures markets. The calculator automatically detects whether instruments are cash-settled or futures-based, applying appropriate sizing methodologies with correct point value calculations.
Risk Management Integration
The calculator integrates sophisticated risk assessment through two primary modes:
Stop Loss Integration: When fixed stop-loss levels are defined, risk calculation follows Risk per Trade = Position Size × Stop Loss Distance. This ensures that the Kelly fraction accounts for actual risk exposure rather than theoretical maximum loss, with stop-loss distance measured in appropriate units for each asset class.
Strategy Drawdown Assessment: For discretionary exit strategies, risk estimation uses maximum historical drawdown through Risk per Trade = Position Value × (Maximum Drawdown / 100). This approach assumes that individual trade losses will not exceed the strategy's historical maximum drawdown, providing a reasonable estimate for strategies with well-defined risk characteristics.
Fractional Kelly Approaches
Pure Kelly sizing can produce substantial volatility, leading many practitioners to adopt fractional Kelly approaches. MacLean, Sanegre, Zhao, and Ziemba (2004) analyze the trade-offs between growth rate and volatility, demonstrating that half-Kelly typically reduces volatility by approximately 75% while sacrificing only 25% of the growth rate.
The calculator provides three primary Kelly modes to accommodate different risk preferences and experience levels. Full Kelly maximizes growth rate while accepting higher volatility, making it suitable for experienced practitioners with strong risk tolerance and robust capital bases. Half Kelly offers a balanced approach popular among professional traders, providing optimal risk-return balance by reducing volatility significantly while maintaining substantial growth potential. Quarter Kelly implements a conservative approach with low volatility, recommended for risk-averse traders or those new to Kelly methodology who prefer gradual introduction to optimal position sizing principles.
Empirical Validation and Performance
Extensive academic research supports the theoretical advantages of Kelly sizing. Hakansson and Ziemba (1995) provide a comprehensive review of Kelly applications in finance, documenting superior long-term performance across various market conditions and asset classes. Estrada (2008) analyzes Kelly performance in international equity markets, finding that Kelly-based strategies consistently outperform fixed position sizing approaches over extended periods across 19 developed markets over a 30-year period.
Several prominent investment firms have successfully implemented Kelly-based position sizing. Pabrai (2007) documents the application of Kelly principles at Berkshire Hathaway, noting Warren Buffett's concentrated portfolio approach aligns closely with Kelly optimal sizing for high-conviction investments. Quantitative hedge funds, including Renaissance Technologies and AQR, have incorporated Kelly-based risk management into their systematic trading strategies.
Practical Implementation Guidelines
Successful Kelly implementation requires systematic application with attention to several critical factors:
Parameter Estimation: Accurate parameter estimation represents the greatest challenge in practical Kelly implementation. Brown (1976) notes that small errors in probability estimates can lead to significant deviations from optimal performance. The calculator addresses this through Bayesian adjustments and confidence measures.
Sample Size Requirements: Users should begin with conservative fractional Kelly approaches until achieving sufficient historical data. Strategies with fewer than 30 trades may produce unreliable Kelly estimates, regardless of adjustments. Full confidence typically requires 100 or more independent trade observations.
Market Regime Considerations: Parameters that accurately describe historical performance may not reflect future market conditions. Ziemba (2003) recommends regular parameter updates and conservative adjustments when market conditions change significantly.
Professional Features and Customization
The calculator provides comprehensive customization options for professional applications:
Multiple Color Schemes: Eight professional color themes (Gold, EdgeTools, Behavioral, Quant, Ocean, Fire, Matrix, Arctic) with dark and light theme compatibility ensure optimal visibility across different trading environments.
Flexible Display Options: Adjustable table size and position accommodate various chart layouts and user preferences, while maintaining analytical depth and clarity.
Comprehensive Results: The results table presents essential information including asset specifications, strategy statistics, Kelly calculations, sample confidence measures, position values, risk assessments, and final position sizes in appropriate units for each asset class.
Limitations and Considerations
Like any analytical tool, the Kelly Criterion has important limitations that users must understand:
Stationarity Assumption: The Kelly Criterion assumes that historical strategy statistics represent future performance characteristics. Non-stationary market conditions may invalidate this assumption, as noted by Lo and MacKinlay (1999).
Independence Requirement: Each trade should be independent to avoid correlation effects. Many trading strategies exhibit serial correlation in returns, which can affect optimal position sizing and may require adjustments for portfolio applications.
Parameter Sensitivity: Kelly calculations are sensitive to parameter accuracy. Regular calibration and conservative approaches are essential when parameter uncertainty is high.
Transaction Costs: The implementation incorporates user-defined transaction costs but assumes these remain constant across different position sizes and market conditions, following Ziemba (2003).
Advanced Applications and Extensions
Multi-Asset Portfolio Considerations: While this calculator optimizes individual position sizes, portfolio-level applications require additional considerations for correlation effects and aggregate risk management. Simplified portfolio approaches include treating positions independently with correlation adjustments.
Behavioral Factors: Behavioral finance research reveals systematic biases that can interfere with Kelly implementation. Kahneman and Tversky (1979) document loss aversion, overconfidence, and other cognitive biases that lead traders to deviate from optimal strategies. Successful implementation requires disciplined adherence to calculated recommendations.
Time-Varying Parameters: Advanced implementations may incorporate time-varying parameter models that adjust Kelly recommendations based on changing market conditions, though these require sophisticated econometric techniques and substantial computational resources.
Comprehensive Usage Instructions and Practical Examples
Implementation begins with loading the calculator on your desired trading instrument's chart. The system automatically detects asset type across stocks, forex, futures, and cryptocurrency markets while extracting current price information. Navigation to the indicator settings allows input of your specific strategy parameters.
Strategy statistics configuration requires careful attention to several key metrics. The win rate should be calculated from your backtest results using the formula of winning trades divided by total trades multiplied by 100. Average win represents the sum of all profitable trades divided by the number of winning trades, while average loss calculates the sum of all losing trades divided by the number of losing trades, entered as a positive number. The total historical trades parameter requires the complete number of trades in your backtest, with a minimum of 30 trades recommended for basic functionality and 100 or more trades optimal for statistical reliability. Account size should reflect your available trading capital, specifically the risk capital allocated for trading rather than total net worth.
Risk management configuration adapts to your specific trading approach. The stop loss setting should be enabled if you employ fixed stop-loss exits, with the stop loss distance specified in appropriate units depending on the asset class. For stocks, this distance is measured in dollars, for forex in pips, and for futures in ticks. When stop losses are not used, the maximum strategy drawdown percentage from your backtest provides the risk assessment baseline. Kelly mode selection offers three primary approaches: Full Kelly for aggressive growth with higher volatility suitable for experienced practitioners, Half Kelly for balanced risk-return optimization popular among professional traders, and Quarter Kelly for conservative approaches with reduced volatility.
Display customization ensures optimal integration with your trading environment. Eight professional color themes provide optimization for different chart backgrounds and personal preferences. Table position selection allows optimal placement within your chart layout, while table size adjustment ensures readability across different screen resolutions and viewing preferences.
Detailed Practical Examples
Example 1: SPY Swing Trading Strategy
Consider a professionally developed swing trading strategy for SPY (S&P 500 ETF) with backtesting results spanning 166 total trades. The strategy achieved 110 winning trades, representing a 66.3% win rate, with an average winning trade of $2,200 and average losing trade of $862. The maximum drawdown reached 31.4% during the testing period, and the available trading capital amounts to $25,000. This strategy employs discretionary exits without fixed stop losses.
Implementation requires loading the calculator on the SPY daily chart and configuring the parameters accordingly. The win rate input receives 66.3, while average win and loss inputs receive 2200 and 862 respectively. Total historical trades input requires 166, with account size set to 25000. The stop loss function remains disabled due to the discretionary exit approach, with maximum strategy drawdown set to 31.4%. Half Kelly mode provides the optimal balance between growth and risk management for this application.
The calculator generates several key outputs for this scenario. The risk-reward ratio calculates automatically to 2.55, while the Kelly fraction reaches approximately 53% before scientific adjustments. Sample confidence achieves 100% given the 166 trades providing high statistical confidence. The recommended position settles at approximately 27% after Half Kelly and Bayesian adjustment factors. Position value reaches approximately $6,750, translating to 16 shares at a $420 SPY price. Risk per trade amounts to approximately $2,110, representing 31.4% of position value, with expected value per trade reaching approximately $1,466. This recommendation represents the mathematically optimal balance between growth potential and risk management for this specific strategy profile.
Example 2: EURUSD Day Trading with Stop Losses
A high-frequency EURUSD day trading strategy demonstrates different parameter requirements compared to swing trading approaches. This strategy encompasses 89 total trades with a 58% win rate, generating an average winning trade of $180 and average losing trade of $95. The maximum drawdown reached 12% during testing, with available capital of $10,000. The strategy employs fixed stop losses at 25 pips and take profit targets at 45 pips, providing clear risk-reward parameters.
Implementation begins with loading the calculator on the EURUSD 1-hour chart for appropriate timeframe alignment. Parameter configuration includes win rate at 58, average win at 180, and average loss at 95. Total historical trades input receives 89, with account size set to 10000. The stop loss function is enabled with distance set to 25 pips, reflecting the fixed exit strategy. Quarter Kelly mode provides conservative positioning due to the smaller sample size compared to the previous example.
Results demonstrate the impact of smaller sample sizes on Kelly calculations. The risk-reward ratio calculates to 1.89, while the Kelly fraction reaches approximately 32% before adjustments. Sample confidence achieves 89%, providing moderate statistical confidence given the 89 trades. The recommended position settles at approximately 7% after Quarter Kelly application and Bayesian shrinkage adjustment for the smaller sample. Position value amounts to approximately $700, translating to 0.07 standard lots. Risk per trade reaches approximately $175, calculated as 25 pips multiplied by lot size and pip value, with expected value per trade at approximately $49. This conservative position sizing reflects the smaller sample size, with position sizes expected to increase as trade count surpasses 100 and statistical confidence improves.
Example 3: ES1! Futures Systematic Strategy
Systematic futures trading presents unique considerations for Kelly criterion application, as demonstrated by an E-mini S&P 500 futures strategy encompassing 234 total trades. This systematic approach achieved a 45% win rate with an average winning trade of $1,850 and average losing trade of $720. The maximum drawdown reached 18% during the testing period, with available capital of $50,000. The strategy employs 15-tick stop losses with contract specifications of $50 per tick, providing precise risk control mechanisms.
Implementation involves loading the calculator on the ES1! 15-minute chart to align with the systematic trading timeframe. Parameter configuration includes win rate at 45, average win at 1850, and average loss at 720. Total historical trades receives 234, providing robust statistical foundation, with account size set to 50000. The stop loss function is enabled with distance set to 15 ticks, reflecting the systematic exit methodology. Half Kelly mode balances growth potential with appropriate risk management for futures trading.
Results illustrate how favorable risk-reward ratios can support meaningful position sizing despite lower win rates. The risk-reward ratio calculates to 2.57, while the Kelly fraction reaches approximately 16%, lower than previous examples due to the sub-50% win rate. Sample confidence achieves 100% given the 234 trades providing high statistical confidence. The recommended position settles at approximately 8% after Half Kelly adjustment. Estimated margin per contract amounts to approximately $2,500, resulting in a single contract allocation. Position value reaches approximately $2,500, with risk per trade at $750, calculated as 15 ticks multiplied by $50 per tick. Expected value per trade amounts to approximately $508. Despite the lower win rate, the favorable risk-reward ratio supports meaningful position sizing, with single contract allocation reflecting appropriate leverage management for futures trading.
Example 4: MES1! Micro-Futures for Smaller Accounts
Micro-futures contracts provide enhanced accessibility for smaller trading accounts while maintaining identical strategy characteristics. Using the same systematic strategy statistics from the previous example but with available capital of $15,000 and micro-futures specifications of $5 per tick with reduced margin requirements, the implementation demonstrates improved position sizing granularity.
Kelly calculations remain identical to the full-sized contract example, maintaining the same risk-reward dynamics and statistical foundations. However, estimated margin per contract reduces to approximately $250 for micro-contracts, enabling allocation of 4-5 micro-contracts. Position value reaches approximately $1,200, while risk per trade calculates to $75, derived from 15 ticks multiplied by $5 per tick. This granularity advantage provides better position size precision for smaller accounts, enabling more accurate Kelly implementation without requiring large capital commitments.
Example 5: Bitcoin Swing Trading
Cryptocurrency markets present unique challenges requiring modified Kelly application approaches. A Bitcoin swing trading strategy on BTCUSD encompasses 67 total trades with a 71% win rate, generating average winning trades of $3,200 and average losing trades of $1,400. Maximum drawdown reached 28% during testing, with available capital of $30,000. The strategy employs technical analysis for exits without fixed stop losses, relying on price action and momentum indicators.
Implementation requires conservative approaches due to cryptocurrency volatility characteristics. Quarter Kelly mode is recommended despite the high win rate to account for crypto market unpredictability. Expected position sizing remains reduced due to the limited sample size of 67 trades, requiring additional caution until statistical confidence improves. Regular parameter updates are strongly recommended due to cryptocurrency market evolution and changing volatility patterns that can significantly impact strategy performance characteristics.
Advanced Usage Scenarios
Portfolio position sizing requires sophisticated consideration when running multiple strategies simultaneously. Each strategy should have its Kelly fraction calculated independently to maintain mathematical integrity. However, correlation adjustments become necessary when strategies exhibit related performance patterns. Moderately correlated strategies should receive individual position size reductions of 10-20% to account for overlapping risk exposure. Aggregate portfolio risk monitoring ensures total exposure remains within acceptable limits across all active strategies. Professional practitioners often consider using lower fractional Kelly approaches, such as Quarter Kelly, when running multiple strategies simultaneously to provide additional safety margins.
Parameter sensitivity analysis forms a critical component of professional Kelly implementation. Regular validation procedures should include monthly parameter updates using rolling 100-trade windows to capture evolving market conditions while maintaining statistical relevance. Sensitivity testing involves varying win rates by ±5% and average win/loss ratios by ±10% to assess recommendation stability under different parameter assumptions. Out-of-sample validation reserves 20% of historical data for parameter verification, ensuring that optimization doesn't create curve-fitted results. Regime change detection monitors actual performance against expected metrics, triggering parameter reassessment when significant deviations occur.
Risk management integration requires professional overlay considerations beyond pure Kelly calculations. Daily loss limits should cease trading when daily losses exceed twice the calculated risk per trade, preventing emotional decision-making during adverse periods. Maximum position limits should never exceed 25% of account value in any single position regardless of Kelly recommendations, maintaining diversification principles. Correlation monitoring reduces position sizes when holding multiple correlated positions that move together during market stress. Volatility adjustments consider reducing position sizes during periods of elevated VIX above 25 for equity strategies, adapting to changing market conditions.
Troubleshooting and Optimization
Professional implementation often encounters specific challenges requiring systematic troubleshooting approaches. Zero position size displays typically result from insufficient capital for minimum position sizes, negative expected values, or extremely conservative Kelly calculations. Solutions include increasing account size, verifying strategy statistics for accuracy, considering Quarter Kelly mode for conservative approaches, or reassessing overall strategy viability when fundamental issues exist.
Extremely high Kelly fractions exceeding 50% usually indicate underlying problems with parameter estimation. Common causes include unrealistic win rates, inflated risk-reward ratios, or curve-fitted backtest results that don't reflect genuine trading conditions. Solutions require verifying backtest methodology, including all transaction costs in calculations, testing strategies on out-of-sample data, and using conservative fractional Kelly approaches until parameter reliability improves.
Low sample confidence below 50% reflects insufficient historical trades for reliable parameter estimation. This situation demands gathering additional trading data, using Quarter Kelly approaches until reaching 100 or more trades, applying extra conservatism in position sizing, and considering paper trading to build statistical foundations without capital risk.
Inconsistent results across similar strategies often stem from parameter estimation differences, market regime changes, or strategy degradation over time. Professional solutions include standardizing backtest methodology across all strategies, updating parameters regularly to reflect current conditions, and monitoring live performance against expectations to identify deteriorating strategies.
Position sizes that appear inappropriately large or small require careful validation against traditional risk management principles. Professional standards recommend never risking more than 2-3% per trade regardless of Kelly calculations. Calibration should begin with Quarter Kelly approaches, gradually increasing as comfort and confidence develop. Most institutional traders utilize 25-50% of full Kelly recommendations to balance growth with prudent risk management.
Market condition adjustments require dynamic approaches to Kelly implementation. Trending markets may support full Kelly recommendations when directional momentum provides favorable conditions. Ranging or volatile markets typically warrant reducing to Half or Quarter Kelly to account for increased uncertainty. High correlation periods demand reducing individual position sizes when multiple positions move together, concentrating risk exposure. News and event periods often justify temporary position size reductions during high-impact releases that can create unpredictable market movements.
Performance monitoring requires systematic protocols to ensure Kelly implementation remains effective over time. Weekly reviews should compare actual versus expected win rates and average win/loss ratios to identify parameter drift or strategy degradation. Position size efficiency and execution quality monitoring ensures that calculated recommendations translate effectively into actual trading results. Tracking correlation between calculated and realized risk helps identify discrepancies between theoretical and practical risk exposure.
Monthly calibration provides more comprehensive parameter assessment using the most recent 100 trades to maintain statistical relevance while capturing current market conditions. Kelly mode appropriateness requires reassessment based on recent market volatility and performance characteristics, potentially shifting between Full, Half, and Quarter Kelly approaches as conditions change. Transaction cost evaluation ensures that commission structures, spreads, and slippage estimates remain accurate and current.
Quarterly strategic reviews encompass comprehensive strategy performance analysis comparing long-term results against expectations and identifying trends in effectiveness. Market regime assessment evaluates parameter stability across different market conditions, determining whether strategy characteristics remain consistent or require fundamental adjustments. Strategic modifications to position sizing methodology may become necessary as markets evolve or trading approaches mature, ensuring that Kelly implementation continues supporting optimal capital allocation objectives.
Professional Applications
This calculator serves diverse professional applications across the financial industry. Quantitative hedge funds utilize the implementation for systematic position sizing within algorithmic trading frameworks, where mathematical precision and consistent application prove essential for institutional capital management. Professional discretionary traders benefit from optimized position management that removes emotional bias while maintaining flexibility for market-specific adjustments. Portfolio managers employ the calculator for developing risk-adjusted allocation strategies that enhance returns while maintaining prudent risk controls across diverse asset classes and investment strategies.
Individual traders seeking mathematical optimization of capital allocation find the calculator provides institutional-grade methodology previously available only to professional money managers. The Kelly Criterion establishes theoretical foundation for optimal capital allocation across both single strategies and multiple trading systems, offering significant advantages over arbitrary position sizing methods that rely on intuition or fixed percentage approaches. Professional implementation ensures consistent application of mathematically sound principles while adapting to changing market conditions and strategy performance characteristics.
Conclusion
The Kelly Criterion represents one of the few mathematically optimal solutions to fundamental investment problems. When properly understood and carefully implemented, it provides significant competitive advantage in financial markets. This calculator implements modern refinements to Kelly's original formula while maintaining accessibility for practical trading applications.
Success with Kelly requires ongoing learning, systematic application, and continuous refinement based on market feedback and evolving research. Users who master Kelly principles and implement them systematically can expect superior risk-adjusted returns and more consistent capital growth over extended periods.
The extensive academic literature provides rich resources for deeper study, while practical experience builds the intuition necessary for effective implementation. Regular parameter updates, conservative approaches with limited data, and disciplined adherence to calculated recommendations are essential for optimal results.
References
Archer, M. D. (2010). Getting Started in Currency Trading: Winning in Today's Forex Market (3rd ed.). John Wiley & Sons.
Baker, R. D., & McHale, I. G. (2012). An empirical Bayes approach to optimising betting strategies. Journal of the Royal Statistical Society: Series D (The Statistician), 61(1), 75-92.
Breiman, L. (1961). Optimal gambling systems for favorable games. In J. Neyman (Ed.), Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability (pp. 65-78). University of California Press.
Brown, D. B. (1976). Optimal portfolio growth: Logarithmic utility and the Kelly criterion. In W. T. Ziemba & R. G. Vickson (Eds.), Stochastic Optimization Models in Finance (pp. 1-23). Academic Press.
Browne, S., & Whitt, W. (1996). Portfolio choice and the Bayesian Kelly criterion. Advances in Applied Probability, 28(4), 1145-1176.
Estrada, J. (2008). Geometric mean maximization: An overlooked portfolio approach? The Journal of Investing, 17(4), 134-147.
Hakansson, N. H., & Ziemba, W. T. (1995). Capital growth theory. In R. A. Jarrow, V. Maksimovic, & W. T. Ziemba (Eds.), Handbooks in Operations Research and Management Science (Vol. 9, pp. 65-86). Elsevier.
Kahneman, D., & Tversky, A. (1979). Prospect theory: An analysis of decision under risk. Econometrica, 47(2), 263-291.
Kaufman, P. J. (2013). Trading Systems and Methods (5th ed.). John Wiley & Sons.
Kelly Jr, J. L. (1956). A new interpretation of information rate. Bell System Technical Journal, 35(4), 917-926.
Lo, A. W., & MacKinlay, A. C. (1999). A Non-Random Walk Down Wall Street. Princeton University Press.
MacLean, L. C., Sanegre, E. O., Zhao, Y., & Ziemba, W. T. (2004). Capital growth with security. Journal of Economic Dynamics and Control, 28(4), 937-954.
MacLean, L. C., Thorp, E. O., & Ziemba, W. T. (2011). The Kelly Capital Growth Investment Criterion: Theory and Practice. World Scientific.
Michaud, R. O. (1989). The Markowitz optimization enigma: Is 'optimized' optimal? Financial Analysts Journal, 45(1), 31-42.
Pabrai, M. (2007). The Dhandho Investor: The Low-Risk Value Method to High Returns. John Wiley & Sons.
Shannon, C. E. (1948). A mathematical theory of communication. Bell System Technical Journal, 27(3), 379-423.
Tharp, V. K. (2007). Trade Your Way to Financial Freedom (2nd ed.). McGraw-Hill.
Thorp, E. O. (2006). The Kelly criterion in blackjack sports betting, and the stock market. In L. C. MacLean, E. O. Thorp, & W. T. Ziemba (Eds.), The Kelly Capital Growth Investment Criterion: Theory and Practice (pp. 789-832). World Scientific.
Van Tharp, K. (2007). Trade Your Way to Financial Freedom (2nd ed.). McGraw-Hill Education.
Vince, R. (1992). The Mathematics of Money Management: Risk Analysis Techniques for Traders. John Wiley & Sons.
Vince, R., & Zhu, H. (2015). Optimal betting under parameter uncertainty. Journal of Statistical Planning and Inference, 161, 19-31.
Ziemba, W. T. (2003). The Stochastic Programming Approach to Asset, Liability, and Wealth Management. The Research Foundation of AIMR.
Further Reading
For comprehensive understanding of Kelly Criterion applications and advanced implementations:
MacLean, L. C., Thorp, E. O., & Ziemba, W. T. (2011). The Kelly Capital Growth Investment Criterion: Theory and Practice. World Scientific.
Vince, R. (1992). The Mathematics of Money Management: Risk Analysis Techniques for Traders. John Wiley & Sons.
Thorp, E. O. (2017). A Man for All Markets: From Las Vegas to Wall Street. Random House.
Cover, T. M., & Thomas, J. A. (2006). Elements of Information Theory (2nd ed.). John Wiley & Sons.
Ziemba, W. T., & Vickson, R. G. (Eds.). (2006). Stochastic Optimization Models in Finance. World Scientific.
VG 1.0This script is an enhanced version of SMC Structures and FVG with an advanced JSON-based alert system designed for seamless integration with webhooks and external applications (such as a Swift iOS app).
What it does
It detects and plots on the chart:
Fair Value Gaps (FVG) — bullish and bearish.
Break of Structure (BOS) and Change of Character (CHOCH).
Key Fibonacci levels (0.786, 0.705, 0.618, 0.5, 0.382) based on the current structure.
Additionally, it generates custom alerts:
FVG Alerts:
When a new FVG is created (bullish or bearish).
When an existing FVG gets mitigated.
BOS & CHOCH Alerts:
Includes breakout direction (bullish or bearish).
Fibonacci Alerts:
When price touches a configured level, with adjustable tick tolerance.
Alerts can be:
Declarative (alertcondition) for manual setup inside TradingView.
Programmatic (alert() JSON) for automated webhook delivery to your system or mobile app.
Key Features
Optional close confirmation to filter out false signals.
Standardized JSON format for direct API or mobile app integration.
Webhook-ready for automated push notifications.
Full visual control with lines, boxes, and labels.
Configurable tick tolerance for Fibonacci “touch” detection.
Smart Money Concepts + Liquidity Voids [LuxAlgo]Liqudiy levels, smart mone concepts, and liquidity voids
The Daily Bias Dashboard📜 Overview
This indicator is a powerful statistical tool designed to provide traders with a probable Daily Bias based on historical price action. It is built upon the concepts of Quarterly Theory, which divides the 24-hour trading day into 4 distinct sessions to analyze market behavior.
This tool analyzes how the market has behaved in the past to give you a statistical edge. It answers the question: "Based on the last X number of days, what is the most likely way the price will move during the Newyork AM & PM Sessions based on Asian & London Sessions?"
⚙️ How It Works
The indicator divides the 24-hour day (based on the America/New_York timezone) into two 12-hour halves:
First Half - 12 Hour Candle: The Accumulation/Manipulation or Asian/London Sessions (6 PM to 6 AM NY Time)
This period covers the Asian session and the start of the London session.
The indicator's only job here is to identify the highest high and lowest low of this 12-hour block, establishing the initial daily range.
Second Half - 12 Hour Candle: The Distribution/Continuation or NY AM/PM Sessions (6 AM to 6 PM NY Time)
This period covers the main London session and the full New York session.
The indicator actively watches to see if, and in what order, the price breaks out of the range established in Session 1 (FIrst Half of the day).
By tracking this behavior over hundreds of days, the indicator compiles statistics on four possible daily scenarios.
📊 The Four Scenarios & The Dashboard
The indicator presents its findings in a clean, easy-to-read dashboard, calculating the historical probability of each of the following scenarios:
↓ Low, then ↑ High: The price first breaks the low of Session 1 (often a liquidity sweep or stop hunt) before reversing to break the high of Session 1. This suggests a "sweep and reverse" bullish day.
↑ High, then ↓ Low: The price first breaks the high of Session 1 before reversing to break the low of Session 1. This suggests a "sweep and reverse" bearish day.
One-Sided Breakout: The price breaks only one of the boundaries (either the high or the low) and continues in that direction without taking the other side. This indicates a strong, trending day.
No Breakout (Inside Bar): The price fails to break either the high or the low of Session 1, remaining contained within its range. This indicates a day of consolidation and low volatility.
🧠 How to Use This Indicator
This is a confluence tool, not a standalone trading system. Its purpose is to help you frame a high-probability narrative for the trading day.
Establish a Bias: Start checking the dashboard at 06:00 AM Newyork time, which is the start of next half day trading session. If one scenario has a significantly higher probability (e.g., "One-Sided Breakout" at 89%), you have a statistically-backed directional bias in the direction of Breakout.
🔧 Features & Settings
Historical Days to Analyze: Set how many past days the indicator should use for its statistical analysis (default is 500).
Session Timezone : The calculation is locked to America/New_York as it is central to the Quarterly Theory concept, but this setting ensures correct alignment.
Dashboard Display: Fully customize the on-screen table, including its position and text size, or hide it completely.
⚠️ Important Notes
For maximum accuracy, use this indicator on hourly (H1) or lower timeframes.
The statistical probabilities are based on past performance and are not a guarantee of future results.
This tool is designed to sharpen your analytical skills and provide a robust, data-driven framework for your daily trading decisions. Use it to build confidence in your directional bias and to better understand the rhythm of the market.
Disclaimer: This indicator is for educational and informational purposes only and does not constitute financial advice. All trading involves risk.
Session Shading (Asia, London, NY)This indicator highlights the three major trading sessions — Asia, London, and New York — on your chart in any time zone. Each session is shaded a different color, with optional labels marking when each begins. It’s designed to help traders quickly see when global market centers are active, identify overlaps between sessions, and align entries or exits with periods of higher liquidity and volatility.
SMA compression goal is to identify when the 20/50/200 SMA are with in a certain % of each other. ideally finding consolidation
XAUUSD 1H – FVG Buy/Sell Signals XAUUSD 1H – Fair Value Gap (FVG) Buy/Sell Signals (No Boxes)
What it is:
A clean, signal-only indicator for Gold on the 1-hour chart. It detects 3-bar Fair Value Gaps, waits for a deep retest, then confirms with strong candle structure + trend + ADX before printing a BUY/SELL arrow. No rectangles or clutter—just selective, high-quality signals.
Why it works:
Instead of chasing breakouts, the script hunts for imbalances (FVGs) where price often returns to “fair value.” It only fires when:
price revisits the gap by a configurable depth,
the candle closes beyond the far edge with a small buffer,
the candle body is ≥ ATR × K (confirms intent),
the broader trend (EMA-50/EMA-200) agrees, and
ADX (Wilder, manual) shows sufficient strength.
Key features
✅ Signal-only: arrows/labels—no boxes on chart.
✅ Deep retest logic (percentage of zone), not just a touch.
✅ Strong close filter (edge + buffer) + ATR body filter.
✅ Trend filter (EMA-50 vs EMA-200) to keep trades with the regime.
✅ ADX strength to avoid chop.
✅ One signal per zone (optional “delete on use”).
✅ Alerts for both BUY and SELL.
✅ Built for Pine v6, non-repainting logic on bar close.
Inputs you can tune
Min FVG size (pts) – ignore tiny gaps.
Retest depth (%) – how deep price must come back into the gap.
Close buffer (pts) – extra confirmation beyond zone edge.
Min body ≥ ATR× – candle strength requirement.
Min ADX – trend strength threshold.
Expire after X bars – keep zones fresh.
Delete zone after signal – true = one-shot signals.
How I use it
Apply to XAUUSD 1H.
Keep default filters for selective signals.
For more setups, lower Min FVG size or ADX and reduce retest depth; for stricter signals, do the opposite.
Combine with S/R or session timing (London/NY) for added confluence.
Notes
Signals are generated on bar close.
Designed for clarity and discipline—fewer, cleaner arrows over constant noise.
Works on other symbols/timeframes, but tuned for Gold 1H.
Tags: #XAUUSD #Gold #FVG #SmartMoney #1H #TrendFollowing #ADX #ATR #PineV6 #TradingView
Linh Index Trend & Exhaustion SuitePurpose: One overlay to judge trend, reversal risk, overextension, and volatility squeezes on indexes (built for VNINDEX/VN30, works on any symbol & timeframe).
What it shows
Trend state: Bull / Bear / Transition via 20/50/200 EMAs + slope check.
Overextension heatmap: Background paints when price is stretched vs the 20-EMA by ATR or % (you set the thresholds).
Squeeze detection:
Squeeze ON (yellow dot): Bollinger Bands (20,2) inside Keltner Channels (20,1.5).
Squeeze OFF + Release: White dot; script confirms direction only when close > BB upper (up) or close < BB lower (down).
52-week context: Distance to 52-week high/low (%).
Higher-TF alignment: Optional weekly trend reading shown on the label while you’re on the daily.
Anchored VWAP(s): Two optional AVWAPs from dates you choose (e.g., YTD open, last big gap/earnings).
Plots & labels
EMAs 20/50/200 (toggle on/off).
Optional BB & KC bands for diagnostics.
AVWAP #1 / #2 (optional).
Status label with: Trend, EMAs, Dist to 20-EMA (%, ATR), 52-week distances, HTF state.
Built-in alerts (set “Once per bar close”)
EMA10 ↔ EMA20 cross (early momentum shift)
EMA20 ↔ EMA50 cross (trend confirmation/negation)
Price ↔ EMA200 cross (long-term regime)
Squeeze Release UP / DOWN (BB breakout after squeeze)
Overextension Cool-off UP / DN (stretched vs 20-EMA + momentum rolling)
Near 52-week High (within your % threshold)
How to use (playbook)
Map regime: Prefer trades when Daily = Bull and HTF (Weekly) = Bull (shown on label).
Hunt expansion: Yellow → White dot and close beyond BB = fresh move.
Avoid chasing stretch: If background is painted (overextended vs 20-EMA), wait for a pullback or intraday base.
Locations matter: 52-week proximity + HTF Bull improves breakout quality.
Anchors: Add AVWAP from YTD open or last major gap to frame support/resistance.
Suggested settings
Overextension: ATR = 2.0, % = 4.0 to start; tune per index volatility.
Squeeze bands: BB(20,2) & KC(20,1.5) default are balanced; tighten KC (1.3) for more signals, widen (1.8) for fewer/higher quality.
Timeframes: Daily for signals, Weekly for bias. Optional 65-min for entries.
Multi-Timeframe RSIRSI Divergence (Time-Based Engine)
This script is a powerful and highly customizable tool designed to automatically detect and display RSI divergences from up to three independent, user-defined timeframes directly on your chart. It eliminates the need to manually switch between timeframes to find these critical trading signals, allowing you to see long-term and short-term divergences all in one place.
The engine is built to be flexible, supporting both regular (reversal) divergences and hidden (trend-continuation) divergences. It's designed for traders who rely on divergence analysis as a core part of their strategy.
Key Features
Multi-Timeframe (MTF) Analysis: Configure and display divergences from up to three different timeframes simultaneously (e.g., show 4-Hour, Daily, and Weekly divergences on your 1-Hour chart). Each timeframe operates independently with its own settings.
Regular & Hidden Divergence: The script can detect both standard regular divergences that signal potential reversals and hidden divergences that suggest a trend may continue.
Configurable Pivot Strength: You have full control over the sensitivity of pivot detection. The 'Left Strength' and 'Right Strength' settings allow you to define what qualifies as a significant price pivot, filtering out market noise.
Bar Count Filter: Refine your signals by setting the minimum and maximum number of bars allowed between two pivots. This ensures you only see divergences that fit your specific strategic timeframe.
Dedicated Alerts: Each of the three timeframes has its own "Enable Alerts" toggle. When a new divergence line is drawn on the chart for a specific timeframe, a corresponding alert can be triggered, ensuring you never miss a potential setup.
Full Visual Customization: Tailor the look and feel of the indicator to your preference. Each timeframe has unique color settings for its bullish and bearish lines, allowing for easy visual identification. You can also toggle the visibility of various chart markers to keep your view clean.
How to Use
1. Add the indicator to your chart.
2. Open the Settings panel.
3. For each timeframe you wish to use (1, 2, or 3), check the "Enable Timeframe" box.
4. Select the desired Timeframe, RSI Length, and Pivot Strength for each active engine.
5. Adjust the Min/Max Bars filter to match your trading style.
6. If you want to receive notifications, check the "Enable Alerts" box for the desired timeframe(s). Then, create an alert using TradingView's alert manager, selecting the indicator and choosing the "Any alert() function call" option.
Price MapperPrice Mapper is a dynamic trading tool designed to map strike prices between two related financial instruments using real-time ratio calculations. The indicator displays a customizable table showing strike levels for your primary ticker alongside their equivalent mapped prices for a secondary instrument, making it invaluable for cross-market analysis, pairs trading, and hedging strategies. Whether you're comparing an ETF to its underlying futures, analyzing currency pairs, or exploring relationships between correlated assets, Price Mapper provides instant visual mapping of how price movements in one instrument translate to equivalent levels in another. The ratio calculation updates daily using 12:00 PM New York time closing prices, ensuring consistent reference points while maintaining relevance to current market conditions.
The tool automatically centers around the current market price and allows complete customization of display parameters including strike increments, number of price levels, decimal precision, and table positioning. Advanced color customization options let you highlight the current price level and adjust the appearance to match your trading setup. Price Mapper eliminates the mental math typically required when trading related instruments, instantly showing you equivalent entry and exit levels across different markets. This makes it particularly powerful for options traders working with ETFs and futures, forex traders analyzing currency correlations, or any trader looking to understand precise price relationships between connected financial instruments.