Vertical Line Timeline 10 Inputs by LK**Vertical Line Timeline (10 Inputs)**
This TradingView indicator plots vertical lines on your chart at up to **10 specific times of day**. You can define each time in **HH.MM format** (e.g., `9.30` for 9:30 AM). When the current bar’s time matches any of the defined times (based on the chart’s timezone), the indicator automatically draws a **full-height vertical line** at that bar.
**Features:**
* **Up to 10 custom time inputs** (HH.MM format)
* **Custom color** for each time marker
* **Adjustable line width** (1–6 px)
* **Solid or dotted style** toggle
* **Full-height vertical lines** (extend through the entire chart height)
* Works on any intraday timeframe where bar start times can match the defined times
* No labels or extra elements — clean and minimal display
**Use cases:**
* Marking important market sessions (e.g., London Open, New York Open, Asian Close)
* Highlighting personal trade execution windows
* Visual cues for strategy backtesting or time-based setups
Indicators and strategies
Market Clarity Pro Market Clarity Pro — See Key Zones, Trend & Volume Signals
Spot yesterday’s High (Supply) and Low (Demand) instantly — and know exactly where big buyers and sellers are likely waiting.
Red zones = strong selling pressure.
Green zones = strong buying pressure.
Plus, a built-in trend line keeps you trading in the right direction and away from sudden reversals.
You’ll also see:
🔴 Red arrow — not a sell signal, but a sign of heavy sellers stepping in, with volume confirmation and a candle breaking the previous one.
🔵 Blue arrow — not a buy signal, but a sign of strong buyers stepping in, with volume confirmation and a candle breaking the previous one.
These arrows highlight potential volume spikes and breakouts for confirmation only — you still confirm with the higher time frame for more market clarity.
Break above supply. Possible uptrend.
Break below demand. Possible downtrend.
📌 Before using this tool, watch the tutorial video to learn exactly how to apply it and how to spot profitable trades with confidence.
Breakout Volume Momentum [5m]Breakout Volume Momentum Indicator (Pine Script v5)
This TradingView Pine Script v5 indicator plots a green dot below a 5-minute price bar whenever all the breakout and volume conditions are met. It is optimized for live intraday trading (not backtesting) and includes customizable inputs for thresholds and trading session times. Key features and conditions of this indicator:
Gap Up Threshold: Current price is up at least X% (default 20%) from the previous day’s close (uses higher-timeframe daily data) before any signal can trigger.
Relative Volume (RVOL): Current bar’s volume is at least Y× (default 2×) the average volume of the last 20 bars. This ensures unusually high volume is present, indicating strong interest.
Trend Alignment: Price is trading above the VWAP (Volume-Weighted Average Price) and above a fast EMA. In addition, the fast EMA (default 9) is above the slower EMA (default 20) to confirm bullish momentum
tradingview.com
tradingview.com
. These filters ensure the stock is in an intraday uptrend (above the average price and rising EMAs).
Intraday Breakout (optional): Optionally require the price to break above the recent intraday high (default last 30 bars). If enabled, a signal only occurs when the stock exceeds its prior range high, confirming a breakout. This can be toggled on/off in the settings.
Avoid Parabolic Spikes: The script skips any bar with an excessively large range (default >12% from low to high), to avoid triggering on spiky or unsustainable parabolic candles.
Time Window Filter: Signals are restricted to a specific session window (by default 09:30 – 11:00 exchange time, typically the morning session) and will not trigger outside these hours. The session window is adjustable via inputs
stackoverflow.com
.
Alerts: An alert condition is provided so you can set a Trading View alert to send a push notification when a green dot signal fires. The alert message includes the ticker and price at the time of signal.
VWAP CALENDARThe VWAP CALENDAR indicator plots up to 20 anchored Volume-Weighted Average Price (VWAP) lines on your chart, each starting from a user-defined date and time (e.g., April 20, 2024). Designed for simplicity, it helps traders visualize VWAPs for key events or dates, with customizable labels and colors. The indicator is optimized for crypto markets (e.g., BTC/USD) but works with any symbol providing volume data.
Features: Multiple VWAPs: Configure up to 20
independent VWAPs, each with a custom anchor date and time.
Dynamic Labels: Labels update in real-time, aligning precisely with each VWAP line’s price level, positioned to the right of the chart for clarity.
Customizable Settings: Adjust label text (e.g., “Event A”), line colors, line widths (1–5 pixels), text colors, and text sizes (8–40 points, default 22).
Bubble or No-Background Labels: Choose between bubble-style labels (with colored backgrounds) or plain text labels without backgrounds.
Timeframe Support: Accurate on daily, 4-hour, 1-hour, and 30-minute charts for anchors within ~1.5 years (e.g., April 20, 2024, from August 2025).
Limitations: VWAP accuracy for anchors like April 20, 2024 (~477 days back) is reliable on 1-hour and larger timeframes. Below 30-minute (e.g., 15-minute, 24-minute), VWAPs may start later or be unavailable due to TradingView’s 5,000-bar historical data limit. For distant anchors, use 4-hour or daily charts to ensure accuracy.
Requires sufficient chart history (e.g., premium account or deep exchange data) for older anchors on 1-hour or 30-minute charts.
Usage Notes: Set anchor dates via the indicator settings (e.g., “2024-04-20 00:00”).
Enable/disable individual VWAPs as needed.
Zoom out to load maximum chart history for best results, especially on 1-hour or 30-minute timeframes.
Ideal for crypto symbols with continuous trading data, but verify data availability for other markets.
Disclaimer:
This is a free indicator provided as-is
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.
Contador de VelaThis indicator displays a seconds counter on the chart that updates continuously.
It uses a small vertical offset trick to simulate movement when scrolling the chart, making the counter more visually dynamic.
Ideal for monitoring elapsed time since the chart loaded.
To use, simply add the indicator to any chart with price candles. The counter will appear near the current bar.
Fractal Suite: MTF Fractals + BOS/CHOCH + OB + FVG + Targets Kese Way
Fractals (Multi-Timeframe): Automatically detects both current-timeframe and higher-timeframe Bill Williams fractals, with customizable left/right bar settings.
Break of Structure (BOS) & CHoCH: Marks structural breaks and changes of character in real time.
Liquidity Sweeps: Identifies sweep patterns where price takes out a previous swing high/low but closes back within range.
Order Blocks (OB): Highlights the last opposite candle before a BOS, with customizable extension bars.
Fair Value Gaps (FVG): Finds 3-bar inefficiencies with a minimum size filter.
Confluence Zones: Optionally require OB–FVG overlap for high-probability setups.
Entry, Stop, and Targets: Automatically calculates entry price, stop loss, and up to three take-profit targets based on risk-reward ratios.
Visual Dashboard: Mini on-chart table summarizing structure, last swing points, and settings.
Alerts: Set alerts for new fractals, BOS events, and confluence-based trade setups.
Volume/Price Movement Indicator## Volume/Price Movement Indicator (VPM)
The **Volume/Price Movement Indicator (VPM)** is a technical analysis tool designed to identify the strength and potential direction of a trend by combining price momentum with volume analysis. Unlike indicators that only look at price, VPM uses volume as a confirming factor to gauge the conviction behind a price move. This helps traders distinguish between strong, high-conviction trends and weak, low-conviction movements that may be prone to reversal.
***
### Key Concepts
* **Price Trend**: The indicator smooths out daily price changes to determine the underlying trend direction. A positive price trend suggests upward momentum, while a negative trend suggests downward momentum.
* **Volume Analysis**: The VPM calculates a **Volume Ratio**, which compares the current bar's volume to its moving average. A high volume ratio indicates that the current volume is significantly higher than recent average volume, suggesting strong market participation. The **Volume Threshold Multiplier** is used to define what constitutes "high volume."
* **Net Pressure**: This component measures the difference between buying pressure and selling pressure, providing an additional layer of confirmation. Positive net pressure indicates that buying activity is outpacing selling, and vice versa.
***
### How to Use the Indicator
The VPM plots its findings on a histogram below the main chart, using colors to clearly signal the market's state.
* **🟢 Strong Bull (Green)**: This is the most powerful bullish signal. It indicates a clear upward price trend that is confirmed by both high volume and positive net pressure. This is a strong signal of conviction and potential continuation of the uptrend.
* **🔵 Weak Bull (Lime)**: This signal indicates a clear upward price trend, but with low volume. The positive net pressure suggests buying is still dominant, but the lack of high volume means there may not be strong market conviction. This signal suggests caution and may precede a consolidation or reversal.
* **🔴 Strong Bear (Red)**: The strongest bearish signal. It indicates a clear downward price trend confirmed by high volume and negative net pressure. This suggests strong selling conviction and a high probability of the downtrend continuing.
* **🟠 Weak Bear (Orange)**: This indicates a clear downward price trend but with low volume. Negative net pressure confirms selling dominance, but the low volume suggests a lack of strong conviction. Like the "Weak Bull" signal, this suggests caution.
* **⚫ Neutral (Gray)**: This signal is displayed when there is no clear trend or when price and volume are diverging. It's a signal of market indecision and suggests waiting for a clearer signal.
***
### Indicator Settings
* **Trend Length**: This input controls the sensitivity of the price trend calculation. A smaller value will make the indicator more responsive to short-term price changes, while a larger value will filter out noise and focus on longer-term trends.
* **Volume MA Length**: This determines the length of the moving average used as a baseline for volume. A longer length will make the "high volume" condition harder to meet.
* **Volume Threshold Multiplier**: This is a key setting for tuning the indicator. It determines how much higher the current volume must be than its moving average to be considered "high volume." For example, a value of `1.2` means volume must be at least 20% higher than the moving average to trigger a high-volume signal.
Simple Leveraged PnLThis script shows your live trade PnL, ROE, R:R ratio, margin, leverage, entry, TP, and SL directly on the chart.
It draws:
Green/red zones for your Take Profit and Stop Loss ranges.
A pinned info card (movable to any corner of the chart) showing all key trade details in one place.
You can fully customize:
Card position (top/middle/bottom × left/middle/right)
Text size, colors, and background
Zone transparency
It works for both Long and Short positions and updates in real time.
Buy/Sell Alert Strong Signals [TCMaster]This indicator combines Smoothed Moving Averages (SMMA), Stochastic Oscillator, and popular candlestick patterns (Engulfing, 3 Line Strike) to highlight potential trend reversal zones.
Main features:
4 SMMA lines (21, 50, 100, 200) for short-, medium-, and long-term trend analysis.
Trend Fill: Background shading when EMA(2) and SMMA(200) are aligned, visually confirming trend direction.
Stochastic Filter: Filters signals based on overbought/oversold conditions to help reduce noise.
Candlestick pattern recognition:
Bullish/Bearish Engulfing
Bullish/Bearish 3 Line Strike
Alerts for each pattern when Stochastic conditions are met.
⚠️ Note: This is a technical analysis tool. It does not guarantee accuracy and is not financial advice. Always combine with other analysis methods and practice proper risk management.
🛠 How to Use:
1. SMMA Settings
21 SMMA & 50 SMMA: Short- and medium-term trend tracking.
100 SMMA: Optional mid/long-term filter (toggle on/off).
200 SMMA: Major trend direction reference.
2. Trend Fill
EMA(2) > SMMA(200): Background shaded green (uptrend bias).
EMA(2) < SMMA(200): Background shaded red (downtrend bias).
Can be enabled/disabled in settings.
3. Stochastic Filter
K Length, D Smoothing, Smooth K: Adjust sensitivity.
Overbought & Oversold: Default 80 / 20 thresholds.
Buy signals only valid if Stochastic is oversold.
Sell signals only valid if Stochastic is overbought.
4. Candlestick Patterns
3 Line Strike:
Bullish: Three consecutive bullish candles followed by one bearish candle closing below the previous, with potential reversal.
Bearish: Three consecutive bearish candles followed by one bullish candle closing above the previous, with potential reversal.
Engulfing:
Bullish: Green candle fully engulfs the prior red candle body.
Bearish: Red candle fully engulfs the prior green candle body.
5. Alerts
Alerts available for each pattern when Stochastic conditions are met.
Example: "Bullish Engulfing + Stochastic confirm".
📌 Important Notes
Do not use this indicator as the sole basis for trading decisions.
Test on a demo account before applying to live trades.
Combine with multi-timeframe analysis, volume, and proper position sizing.
Gamma & Max Pain HelperGamma & Max Pain Helper
Plots Call Wall, Put Wall, and Max Pain levels directly on your chart so you can see where options positioning might influence price.
Features:
Manually enter Call Wall, Put Wall, and Max Pain strike prices.
Lines auto-update each bar — no redrawing needed.
Labels display name + strike price.
Option to only show lines near current price (within a % you choose).
Color-coded:
Red = Call Wall (potential resistance)
Green = Put Wall (potential support)
Blue = Max Pain (price magnet into expiry)
Adjustable line width & extension.
Use Case:
Perfect for traders combining options open interest/gamma analysis with price action, pivots, VWAP, and other intraday levels. Quickly spot overlaps between option walls and technical barriers for high-probability reaction zones.
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.
☑️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.