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.
Penunjuk dan strategi
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.
Session Shading (Asia, London, NY) — ESTThis indicator highlights the three major trading sessions — Asia, London, and New York — on your chart in Eastern Time. 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.
Session Shading (Asia, London, NY) — PSTThis indicator highlights the three major trading sessions — Asia, London, and New York — on your chart in Pacific Time. 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.
Range Trends Enhanced (eleven11)This indicator automatically draws your Range Trend lines based upon your timeframe. When you select a timeframe, in the options, those lines will be locked in, whenever you switch timeframes on the chart. This allows you to "lock in" a timeframe's trendlines and then view it on different timeframes. But if you want to view the current trendlines for a timeframe then you need to select that "lockdown" timeframe in the settings. The original code was created by eleven11
Engulfing&Hammer - BullishEngulfing&Hammer - Bullish
Engulfing&Hammer - Bullish
Engulfing&Hammer - Bullish
Recent Range DetectorOverview
The Recent Range Detector is a specialized indicator designed to identify when an asset is currently range-bound, providing traders with clear support and resistance levels for range trading strategies. Unlike traditional indicators that focus on trend detection, this tool specifically answers the question: "Is the price range-bound right now, and what are the exact trading levels?"
Key Features
✅ Smart Range Detection - Uses a multi-factor scoring system to identify legitimate ranges
✅ Dynamic Support/Resistance Levels - Automatically calculates and displays key trading levels
✅ Range Quality Scoring - Provides confidence levels (Strong/Moderate/Weak Range)
✅ Touch Validation - Counts actual price touches to confirm range reliability
✅ Breakout Detection - Alerts when price exits the established range
✅ Visual Clarity - Clean boxes, lines, and labels for easy interpretation
How It Works
The indicator analyses recent price action using three core metrics:
Touch Quality (40%) - How many times price has respected support/resistance levels
Containment Quality (40%) - What percentage of recent bars stayed within the range
Recent Respect (20%) - Whether the latest price action confirms the range
These combine into a Range Score (0-1) that determines range strength and reliability.
Settings & Parameters
Range Lookback Period (Default: 15)
Number of bars to analyse for range detection
Shorter periods = more responsive to recent ranges
Longer periods = more stable, fewer false signals
Range Tolerance (Default: 2.0%)
Tolerance for price touches around exact highs/lows
Lower values = stricter range requirements
Higher values = more flexible range detection
Minimum Touches (Default: 3)
Required number of support/resistance touches for valid range
Higher values = more confirmed ranges, fewer signals
Lower values = more sensitive, earlier detection
Visual Options
Show Range Box: Displays the range boundaries
Show Support/Resistance Lines: Extends levels into the future
Understanding the Output
Range Score (0.000 - 1.000)
0.7+ = Strong Range (Green) - High confidence range trading setup
0.5-0.7 = Moderate Range (Yellow) - Decent range with some caution
0.3-0.5 = Weak Range (Orange) - Low confidence, be careful
<0.3 = Not Ranging - Avoid range trading strategies
Range Status Classifications
Strong Range - Perfect for range trading strategies
Moderate Range - Good range with normal risk
Weak Range - Marginal range, use smaller positions
Not Ranging - Price is trending or too choppy for range trading
Key Metrics in Info Table
Range Size (%) - Size of the range relative to price level
5-15% = Ideal range size for most strategies
<5% = Tight range, lower profit potential
>15% = Wide range, higher profit potential but more risk
Support/Resistance Levels - Exact price levels for entries/exits
Use these as your key trading levels
Support = potential buy zone
Resistance = potential sell zone
Total Touches - Number of times price respected the levels
3-5 touches = Newly formed range
6-10 touches = Well-established range
10+ touches = Very strong, reliable range
Price Position (%) - Current location within the range
0-20% = Near support (potential long opportunity)
80-100% = Near resistance (potential short opportunity)
40-60% = Middle of range (wait for better entry)
Visual Elements
Range Box
Green Box = Strong Range (Score ≥ 0.7)
Yellow Box = Moderate Range (Score 0.5-0.7)
Orange Box = Weak Range (Score 0.3-0.5)
Support/Resistance Lines
- Horizontal lines showing exact trading levels
- Extend into the future for forward guidance
- Colour matches the range strength
Background Colouring
- Subtle background tint during range periods
- Helps quickly identify ranging vs trending markets
Breakout Signals
- 📈 RANGE BREAK UP - Price breaks above resistance
- 📉 RANGE BREAK DOWN - Price breaks below support
- Only appears for confirmed ranges (Score ≥ 0.5)
Trading Applications
Range Trading Strategy
1. Look for Range Score ≥ 0.5
2. Buy near support (Price Position 0-20%)
3. Sell near resistance (Price Position 80-100%)
4. Set stops just outside the range
5. Exit on breakout signals
Breakout Strategy
1. Identify strong ranges (Score ≥ 0.7)
2. Wait for volume-confirmed breakout
3. Enter in breakout direction
4. Use previous resistance as support (or vice versa)
Market Context
- Strong ranges often occur after trending moves
- Use higher timeframes to confirm overall market structure
- Combine with volume analysis for better entries/exits
Best Practices
What to Look For
✅ Range Score ≥ 0.5 for trading consideration
✅ Multiple touches (5+) for confirmation
✅ Clear price rejection at levels
✅ Reasonable range size (5-15% for most assets)
✅ Recent price respect of boundaries
What to Avoid
❌ Trading ranges with Score < 0.3
❌ Very tight ranges (<3% size) - low profit potential
❌ Ranges with only 1-2 touches - not confirmed
❌ Ignoring breakout signals
❌ Trading against the higher timeframe trend
Alerts Available
- Range Detected - New range formation
- Range Break Up - Upward breakout
- Range Break Down - Downward breakout
- Range Ended - Range condition ended
Timeframe Recommendations
- Daily Charts - Best for swing trading ranges
- 4H Charts - Good for intermediate-term ranges
- 1H Charts - Suitable for day trading ranges
- Lower Timeframes - May produce more noise
Conclusion
The Recent Range Detector eliminates guesswork in range identification by providing objective, quantified range analysis. It's particularly valuable for traders who prefer range-bound strategies or need to identify when trending strategies should be avoided.
Remember: No indicator is perfect. Always combine with proper risk management, volume analysis, and broader market context for best results.
Disclaimer
This indicator is for educational purposes only and should not be considered as financial advice. Trading involves risk, and past performance does not guarantee future results. Always conduct your own research and consider your risk tolerance before making any trading decisions.
Ria TsiPlots TTM Squeeze momentum histogram (green/red).
Plots RSI (blue) in the same pane.
Shows squeeze dots and RSI overbought/oversold lines.
VN30 Effort-vs-Result Multi-Scanner — LinhVN30 Effort-vs-Result Multi-Scanner (Pine v5)
Cross-section scanner for Vietnam’s VN30 stocks that surfaces Effort vs Result footprints and related accumulation/distribution and volatility tells. It renders a ranked table (Top-N) with per-ticker signals and key metrics.
What it does
Scans up to 30 tickers (editable input.symbol slots) using one security() call per symbol → stays under Pine’s 40-call limit and runs reliably on any chart.
Scores each ticker by counting active signals, then ranks and lists the top names.
Optional metrics columns: zVol(60), zTR(60), ATR(20), HL/ATR(20).
Signals (toggleable)
Price/Volume – Effort vs Result
EVR Squeeze (stealth): z(Vol,60) > 4 & z(TR,60) < −0.5
5σ Vol, ≤1σ Ret: z(Vol,60) > 5 & |z(Return,60)| < 1
Wide Effort, Opposite Result: z(Vol,60) > 3 & close < open & z(CLV×Vol,60) > 1
Spread Compression, Heavy Tape: (H−L)/ATR(20) < 0.6 & z(Vol,60) > 3
No-Supply / No-Demand: close < close & range < 0.6×ATR(20) & vol < 0.5×SMA(20)
Momentum & Volatility
Vol-of-Vol Kink: z(ATR20,200) rising & z(ATR5,60) falling
BB Squeeze → Expansion: BBWidth(20) in low regime (z<−1.3) then close > upper band & z(Vol,60) > 2
RSI Non-Confirmation: Price LL/HH with RSI HL/LH & z(Vol,60) > 1
Accumulation/Distribution
OBV Divergence w/ Flat Price: OBV slope > 0 & |z(ret20,260)| < 0.3
Accumulation Days Cluster: ≥3/5 bars: up close, higher vol, close near high
Effort-Result Inversion (Down): big vol on down day then next day close > prior high
How to use
Set the timeframe (works best on 1D for EOD scans).
Edit the 30 symbol slots to your VN30 constituents.
Choose Top N, toggle Show metrics/Only matches and enable/disable scenarios.
Read the table: Rank, Ticker, (metrics), Score, and comma-separated Signals fired.
Method notes
Z-scores use a population-std estimate; CLV×Vol is used for effort/location.
Rolling counts avoid ta.sum; OBV is computed manually; all logic is Pine v5-safe.
Intraday-only ideas (true VWAP magnets, auction volume, flows, futures/options) are not included—Pine can’t cross-scan those datasets.
Disclaimer: Educational tool, not financial advice. Always confirm signals on the chart and with your process.
RSI Wave squeezePlots TTM Squeeze momentum histogram (green/red).
Plots RSI (blue) in the same pane.
Shows squeeze dots and RSI overbought/oversold lines.
ICT SMC Custom — BOS/MSS + OB + FVGWant me to fill that box? Here’s a ready‑to‑paste description for your publish screen:
⸻
ICT SMC Custom — BOS/MSS + OB + FVG (Crypto‑friendly)
A clean Smart Money Concepts tool that marks Break of Structure (BOS), Market Structure Shift (MSS), Order Blocks (OB), and Fair Value Gaps (FVG) with bold, easy‑to‑see visuals. Built for crypto but works on any market and timeframe.
What it does
• BOS & MSS detection with optional body/wick logic
• Order Blocks: auto‑draws the last opposite candle before a BOS, keeps only the most recent N, and fades when mitigated
• FVGs: 3‑candle gaps with a minimum size filter and a cap on how many to keep
• HTF Swings (optional): plots higher‑timeframe pivot highs/lows for top‑down context
• Alerts for BOS/MSS and FVG formation
Inputs
• Swing pivot length (default 3): sensitivity for structure pivots
• Use candle bodies for breaks: close vs level (on) or wicks (off)
• Show BOS/MSS labels, Show FVG, Show Order Blocks
• Min FVG size (ticks) and Max boxes to keep for FVG/OB
• OB uses candle body: body range vs full wick range
• Show higher timeframe swings + HTF timeframe
• Bullish/Bearish colors
How it works
• BOS triggers when price breaks the last opposite swing.
• MSS flags when the break flips the prior bias.
• OB is the most recent opposite candle prior to BOS; it’s marked and later greyed out once price closes through it (mitigation).
• FVG is detected when candle 1’s high < candle 3’s low (bear) or candle 1’s low > candle 3’s high (bull).
Alerts included
• BOS Up / BOS Down
• MSS Up / MSS Down
• FVG Up / FVG Down
Tips
• Start on 15m/1h for crypto, pivot length 3–5.
• Turn Use candle bodies ON for stricter confirmations, OFF for more signals.
• If boxes look cluttered, lower “Max boxes to keep.”
Note: This is a visual/educational tool, not financial advice. Always confirm with your own plan and risk management.