Lunch Session LinesLines at 12 noon and 13:00 so you can easily see when you are running up to the lunch session.Indicatore Pine Script®di b_ride_1
NSE ORB Pro Suite v6This is opening range breakout. Ypu can sen the time it also shows the range of the ORB candelIndicatore Pine Script®di Mahender19872
Doji Breakout Alert (Alternating)this confirms direction from a doji, when looking to find an entry with an alert it will be easier. Indicatore Pine Script®di piranha_trading2
MoonBoys BTC Production Cost Daily═════════════════════════════════════════════════════════════ MoonBoys BTC PRODUCTION COST DAILY ═════════════════════════════════════════════════════════════ Track Bitcoin's real-time production cost using comprehensive electricity consumption data and mining economics to identify macro support/resistance zones. ═══ OVERVIEW ═══ This indicator calculates Bitcoin's actual cost of production by combining Cambridge Bitcoin Electricity Consumption Index (CBECI) data with electricity pricing models across different mining eras. It reveals where miners are profitable or underwater, providing crucial macro-level support zones that have historically acted as psychological and economic floors. Perfect for: • Identifying long-term accumulation zones • Understanding miner profitability and capitulation risk • Spotting macro support levels during bear markets • Gauging healthy vs. overheated price levels • Planning dollar-cost averaging strategies ═══ KEY FEATURES ═══ 📊 COMPREHENSIVE HISTORICAL DATA └─ 378 data points spanning 2011-2026 └─ Complete CBECI electricity consumption dataset └─ Verified accuracy: all dates and values cross-checked └─ Updates every ~14 days with new CBECI releases ⚡ ELECTRICITY COST MODELING └─ Pre-June 2019: $0.05/kWh (Early mining era) └─ Pre-April 2021: $0.04/kWh (China dominance period) └─ Post-May 2021: $0.05/kWh (China exodus, Western migration) └─ Post-April 2024: $0.05/kWh (Post-4th halving era) └─ Fully customizable for scenario analysis 🎯 DUAL COST CURVES └─ Red line: Pure electricity cost per BTC └─ Purple line: Total production cost (electricity + operations) └─ Green line: Miner price (spot + transaction fee revenue) └─ Pink fill: Zones where miners are losing money 📈 AUTOMATIC HALVING ADJUSTMENTS └─ Integrates all Bitcoin halvings (2012, 2016, 2020, 2024) └─ Block reward automatically adjusts: 50 → 25 → 12.5 → 6.25 → 3.125 └─ Accurate per-day BTC production calculations 💰 PROFIT MARGIN TRACKING └─ Annual profit margin labels (optional) └─ Shows miner profitability percentage └─ Appears on chart at electricity cost level └─ Calculated using 365-day moving average ═══ HOW TO READ IT ═══ ┌─────────────────────────────────────────────────────────┐ │ INDICATOR │ MEANING │ ├─────────────────────────────────────────────────────────┤ │ 🟢 Green Line │ Miner Price (BTC price + fee revenue)│ │ (above purple) │ → Miners profitable, healthy market │ ├─────────────────────────────────────────────────────────┤ │ 🟢 Green Line │ Price below production cost │ │ (below purple) │ → Miner capitulation zone │ │ │ → Strong historical buy signal │ ├─────────────────────────────────────────────────────────┤ │ 🔴 Red Line │ Pure electricity cost per BTC │ │ │ → Absolute minimum mining cost │ ├─────────────────────────────────────────────────────────┤ │ 🟣 Purple Line │ Total production cost │ │ │ → Break-even for miners (60% elec) │ ├─────────────────────────────────────────────────────────┤ │ 🌸 Pink Fill │ Below-cost territory │ │ │ → Miners selling at a loss │ │ │ → Historical accumulation zone │ └─────────────────────────────────────────────────────────┘ ═══ TRADING APPLICATIONS ═══ 🐻 BEAR MARKET BOTTOMS → Price touching or breaking below production cost = high probability bottom → Extended periods below cost = miner capitulation → Historical bottoms: Nov 2011, Jan 2015, Dec 2018, Nov 2022 → Strongest buy signal in macro Bitcoin investing 📈 BULL MARKET HEALTH CHECKS → Distance above production cost = market heat level → 100-200% above cost = healthy bull market → 500%+ above cost = euphoric/bubble territory → Use as take-profit reference points 💎 ACCUMULATION STRATEGY → DCA when price approaches production cost → Increase buy size when price drops below cost → Maximum allocation when 10-20% below cost → Layer entry as margin shows negative percentages ⚖️ SUPPORT/RESISTANCE ZONES → Production cost acts as macro support in downtrends → Often becomes resistance after prolonged bear markets → Price reclaiming cost = bullish structural shift → Failed reclaims = continued weakness 🔄 HALVING CYCLE ANALYSIS → Cost doubles after each halving (supply cut) → Price typically consolidates near new cost basis → Historic pattern: break above cost = new bull cycle → Track 6-12 months post-halving for trend confirmation ═══ SETTINGS GUIDE ═══ ⚡ ELECTRICITY COST ASSUMPTIONS (USD/kWh) ├─ Pre-June 2019 (0.05): Early mining era, hobby miners ├─ Pre-China Exodus 2021 (0.04): Cheap Chinese hydropower ├─ Post-May 2021 (0.05): Western migration, higher costs └─ Post-April 2024 (0.05): Current era post-4th halving 💡 Adjust these for "what if" scenarios or local costs 💰 ELECTRICITY PERCENTAGE (Default: 60%) └─ Electricity as % of total mining costs └─ Remaining 40% = hardware, labor, rent, maintenance └─ Lower % = higher total cost (more conservative) └─ Typical range: 50-70% 🎨 VISUAL TOGGLES ├─ Plot BTC Miner Price: Show/hide green line │ └─ Includes transaction fee revenue per BTC ├─ Plot Production Cost Curves: Show/hide red & purple lines └─ Plot Annual Profit Margin Labels: Show/hide margin % └─ Appears annually (Jan 1st) and on last bar ═══ HOW IT WORKS ═══ 1. ELECTRICITY CONSUMPTION DATA • Cambridge Bitcoin Electricity Consumption Index (CBECI) • Actual network-wide energy usage in TWh (terawatt-hours) • Updated bi-weekly with real hash rate data • 378 historical data points (Aug 2011 - Jan 2026) 2. COST CALCULATION FORMULA Electricity Cost per BTC = (TWh per year / 365.25 days) × (10^9 to convert to kWh) / (BTC mined per day) × (Electricity price per kWh) Total Cost per BTC = Electricity Cost / (Electricity % of total costs) 3. BTC MINED PER DAY Blocks per day (144) × Block reward • 2009-2012: 50 BTC/block = 7,200 BTC/day • 2012-2016: 25 BTC/block = 3,600 BTC/day • 2016-2020: 12.5 BTC/block = 1,800 BTC/day • 2020-2024: 6.25 BTC/block = 900 BTC/day • 2024+: 3.125 BTC/block = 450 BTC/day 4. MINER PRICE METRIC Spot close price + (Transaction fees per day / BTC mined per day) • Currently simplified with fees = 0 • Shows true revenue per BTC for miners 5. PROFIT MARGIN CALCULATION ((Miner Price / Total Cost) - 1) × 100 • Smoothed with 365-day SMA • Shows sustainable annual profitability ═══ BEST PRACTICES ═══ ✅ DO: • Use on DAILY timeframe for accuracy (designed for daily data) • Combine with on-chain metrics (SOPR, MVRV, Puell Multiple) • Layer with traditional TA for entry/exit timing • Understand this is AVERAGE global cost (varies by miner) • Use as macro filter, not short-term trading signal • Check profit margins during capitulation events ❌ DON'T: • Use as sole indicator for short-term trades • Ignore that efficient miners have much lower costs • Forget that cost is constantly rising (hash rate + difficulty) • Assume price can't go below cost (it can temporarily) • Trade based only on cost - liquidity events can wick lower • Expect instant reversals at cost levels ═══ HISTORICAL PERFORMANCE ═══ Major Bitcoin bottoms near/below production cost: 📅 November 2011 Price: ~$2 | Cost: ~$5 → 60% below cost, -95% drawdown → Bottom signal ✓ 📅 January 2015 Price: ~$150 | Cost: ~$180 → 17% below cost, -85% drawdown → Bottom signal ✓ 📅 December 2018 Price: ~$3,200 | Cost: ~$3,500 → 9% below cost, -84% drawdown → Bottom signal ✓ 📅 November 2022 Price: ~$15,500 | Cost: ~$17,000 → 9% below cost, -77% drawdown → Bottom signal ✓ Pattern: When price trades below production cost, accumulation zone. ═══ TECHNICAL NOTES ═══ • Built with Pine Script v5 • Data source: Cambridge Centre for Alternative Finance (CBECI) Updated Quaterly by Request • All dates/values verified against official CSV dataset • Electricity price adjusts based on major mining regime shifts • Uses series variables for proper historical calculation • Forward-fills data between CBECI update periods • Accounts for all 4 halvings in BTC history ═══ DATA PERIODS EXPLAINED ═══ 🏭 PRE-JUNE 2019 ($0.05/kWh) Early mining era, distributed hobby miners, average global cost 🇨🇳 JUNE 2019 - APRIL 2021 ($0.04/kWh) China dominance period, cheap hydropower in Sichuan/Yunnan 🌍 MAY 2021 - APRIL 2024 ($0.05/kWh) China ban, Western migration, renewable energy transition 🔮 POST-APRIL 2024 ($0.05/kWh) 4th halving, institutional mining, current era ═══ UNDERSTANDING MINING ECONOMICS ═══ ⚡ ELECTRICITY = 60% OF COST (Default) └─ Largest variable expense for miners └─ Directly tied to hash rate and difficulty 🔧 OTHER COSTS = 40% ├─ ASIC hardware (depreciation) ├─ Facility rent and cooling ├─ Labor and maintenance ├─ Internet and infrastructure └─ Insurance and legal 💰 REVENUE SOURCES ├─ Block subsidy (newly minted BTC) └─ Transaction fees (variable, usually 2-10% of revenue) 📉 MINER BEHAVIOR • Profitable: Accumulate BTC, expand operations • Break-even: Hold BTC, maintain operations • Unprofitable: Forced selling, potential capitulation ═══ ADVANCED USE CASES ═══ 🔬 SCENARIO ANALYSIS → Adjust electricity costs to model different regions → US miners: $0.05-0.07/kWh → Nordic miners: $0.02-0.04/kWh → Middle East: $0.01-0.03/kWh 📊 COMBINE WITH ON-CHAIN DATA → Miner Net Position Change (selling pressure) → Hash Ribbons (miner capitulation indicator) → Difficulty Ribbon (hash rate compression) → Puell Multiple (miner revenue extremes) 🎯 MULTI-TIMEFRAME CONFLUENCE → Weekly chart: macro trend and cost support → Daily chart: precise entry/exit near cost → 4H chart: short-term reactions at cost levels 🌐 CORRELATION TRADING → Miner stocks (MARA, RIOT, CLSK) vs BTC cost → When BTC < cost, miner stocks typically -30-50% → Energy prices (oil, nat gas) affect mining costs ═══ LIMITATIONS & CONSIDERATIONS ═══ ⚠️ AVERAGE COST, NOT ACTUAL • Large miners with PPAs have costs as low as $0.02-0.03/kWh • Inefficient miners may have costs 2-3x the average • This shows network-wide average for reference ⚠️ ELECTRICITY PRICE ASSUMPTIONS • Static periods vs. dynamic energy markets • Renewable energy % growing = lower average cost over time • Geographic distribution matters (Texas vs. Kazakhstan) ⚠️ DOESN'T INCLUDE • ASIC efficiency improvements (more hash/watt) • Stranded energy and flare gas mining • Government subsidies or penalties • Seasonal variations (wet/dry seasons) ⚠️ LAGGING INDICATOR • CBECI data updates every ~14 days • Historical data, not forward-looking • Cost always rises, but at variable rate ═══ DISCLAIMER ═══ This indicator visualizes Bitcoin's estimated global average production cost based on publicly available electricity consumption data and modeled pricing assumptions. It does NOT: • Guarantee future price movements or bottoms • Account for individual miner profitability variations • Include all operational costs (simplified to electricity %) • Predict miner capitulation or selling pressure • Constitute financial advice or buy/sell signals Production cost is A REFERENCE POINT, not a hard floor. Price can and has traded below cost during extreme capitulation events. Market liquidity, macro conditions, and sentiment often override cost-basis logic in the short term. Always conduct your own research and use proper risk management. 📚 EDUCATIONAL USE ONLY | NOT FINANCIAL ADVICE ═══ RESOURCES ═══ Cambridge Bitcoin Electricity Consumption Index (CBECI) → ccaf.io Bitcoin Mining Economics → insights.braiins.com Block Reward Halving Schedule → www.bitcoinblockhalf.com Difficulty & Hash Rate Charts → www.blockchain.com Understanding ASIC Mining → academy.binance.com Mining Profitability Calculator → www.coinwarz.com On-Chain Miner Metrics → cryptoquant.com Energy & Mining Data → hashrateindex.com ═══════════════════════════════════════════════════════════ Built for the Bitcoin community 🚀 Because understanding the cost of production is fundamental analysis 💎 ═══════════════════════════════════════════════════════════Indicatore Pine Script®di VickzinBK1
RSI and MACD Buy/Sell SignalsBuy sell strategy, Green triangle indicates potential to buy. Red indicates potential to short. Still in beta stage so more testing and refinement to come.Indicatore Pine Script®di jpstokes83832
PDH / Asia / London Session Rays + Session MarkersMarks highs and lows with horizontal rays for: 1. Asia Session: 18:00 - 3:00 2. London Session: 3:00 - 8:30 3. Previous Day Marks Sessions with vertical rays at: - 18:00 (Asia Session start) - 3:00 (London Session start) - 8:30 (New York pre-market start) - 9:30 (New York Session Start)Indicatore Pine Script®di joeshmo5461
BR-DowTheory//@version=6 indicator("BTC道氏趋势指标", overlay=true, shorttitle="BTC Dow", precision=2) // 1. 参数设置 trend_length = input.int(10, title="趋势周期", minval=5) vol_length = input.int(15, title="成交量周期", minval=5) stop_loss = input.float(50.0, title="止损点数") tp_ratio = input.float(2.0, title="止盈倍数") vol_threshold = input.float(1.2, title="放量阈值") // 2. 趋势判断 uptrend = close > ta.highest(high, trend_length) downtrend = close < ta.lowest(low, trend_length) // 3. 放量信号 vol_ma = ta.sma(volume, vol_length) vol_bull = volume >= vol_ma * vol_threshold and close > open vol_bear = volume >= vol_ma * vol_threshold and close < open // 4. 开仓信号(去重) var string last_signal = na long_signal = uptrend and vol_bull and last_signal != "long" short_signal = downtrend and vol_bear and last_signal != "short" if long_signal last_signal := "long" if short_signal last_signal := "short" // 5. 开仓价与止损止盈 var float long_entry = na var float short_entry = na if long_signal long_entry := close short_entry := na if short_signal short_entry := close long_entry := na long_sl = long_entry - stop_loss long_tp = long_entry + stop_loss * tp_ratio short_sl = short_entry + stop_loss short_tp = short_entry - stop_loss * tp_ratio // 6. 绘制信号与线条 plotshape(long_signal, title="做多", location=location.belowbar, color=color.green, style=shape.labelup, text="L", textcolor=color.white) plotshape(short_signal, title="做空", location=location.abovebar, color=color.red, style=shape.labeldown, text="S", textcolor=color.white) plot(long_sl, title="多止损", color=color.red, style=plot.style_linebr) plot(long_tp, title="多止盈", color=color.blue, style=plot.style_linebr) plot(short_sl, title="空止损", color=color.red, style=plot.style_linebr) plot(short_tp, title="空止盈", color=color.blue, style=plot.style_linebr) // 7. 背景色 bgcolor(uptrend ? color.new(color.green, 90) : downtrend ? color.new(color.red, 90) : na)Indicatore Pine Script®di brio2158313
Linda on Cinderella's Electric Curfew Session Capital Control The Legendary Linda Bradford Raschke's Health and Life Balance Cinderella's Electric Curfew Strategy – Session-Aware Risk Strategy This strategy enforces a strict "curfew" on trades: new entries are only allowed during selected market sessions (the "ball"), and all positions are automatically closed at or shortly after session end (midnight). Inspired by the fairy tale, it prevents overnight holds to reduce gap risk and promote disciplined capital preservation. Key Features: • Supports major exchanges: NYSE, London, Germany (Xetra), Tokyo, Hong Kong, Sydney — select one via inputs • Timezone-aware session handling (uses chart's exchange timezone) • Risk-based position sizing: risks only a user-defined % of equity per trade, calculated via ATR stop distance • Forced curfew exit: flattens positions on last session bar or after grace period (customizable in minutes) • Optional ATR-based stop-loss and take-profit levels • Simple SMA crossover entry example (easy to replace with your own signals) • Visuals: green bgcolor during allowed sessions, entry shapes, SMA plots Why Useful? Most strategies ignore session boundaries, leading to risky overnight exposure on stocks/indices. This one adds strong capital control by design — ideal for intraday traders avoiding gaps/news events outside regular hours. How to Use: 1. Apply to intraday charts (5m–1h recommended) of exchange-matched symbols (e.g., AAPL for NYSE). 2. Enable only ONE session checkbox (first enabled wins). 3. Adjust risk %, ATR multipliers, curfew grace. 4. Replace SMA signals with your preferred entry logic if needed. 5. Backtest carefully — curfew forces exits, so optimize around session closes. Limitations: - Best on session-based instruments (stocks, indices); less relevant for 24/7 markets like forex/crypto. - Grace period is approximate (bar-based); test on your timeframe. - No multi-session support (extendable via code if desired). Original work — combines session filtering with dynamic risk sizing for better real-world capital protection. Happy trading! 🚀Strategia Pine Script®di uzair2join2
HTRHere is the step-by-step process: Copy the Code: Scroll up to the last block of code I provided (the "Final: Sessions + Days + Loopbacks (Replay Fixed)" version) and click the "Copy" button in the top right corner of the code block. Open Pine Editor: Go to your TradingView chart. Look at the very bottom of the screen. You will see a tab labeled "Pine Editor". Click it to open the panel. Paste the Code: If there is already code in there (like a default script), delete everything so the editor is completely blank. Paste the code you just copied (Ctrl+V or Cmd+V). Save the Script: Click the "Save" button (or "Untitled Script") in the top right of the Pine Editor panel. Give it a name, for example: My Custom Session & Days. Click Save. Add to Chart: Click the "Add to Chart" button (next to the Save buttonIndicatore Pine Script®di SunnyGRAggiornato 20
Multi-Timeframe SeparatorsDraws customisable separators for multiple timeframes - M, W, D, 4 H, 1 H, 30 MIN, 15 MIN, 5 MIN and 1 MIN.Indicatore Pine Script®di staarhoryAggiornato 1
Rolling sharpe ratio with SMARolling sharpe ratio with SMA, period can be changed. Recommend 365 day period to detect high value and low value areas (cycle lows and highs). As Sharpe ratio reaches extremes can signal good zones to DCA in or out of the market. Indicatore Pine Script®di niallhaughey5Aggiornato 2
Enrico_StevenTrading Skript für Long und Short Signale Basierend auf dem Croc 3.0Indicatore Pine Script®di drschelm2
Fokusinvestor Investment Club SektorenperformanceAlways a good overview of the sectors. We compare the performance of the various sectors over the selected viewing period. A relative chart is used for this purpose, comparing the performance to the selected time frame.Indicatore Pine Script®di stephanwolfacademy0
Vanna/Charm Flow Strategy - Locked 2-WeekIn essense it just marks on the chart the OPEX dates, VIX expiration dates and when vanna/charm flows come into the market (which is pegged 2 weeks prior to the OPEX) so nothing fancy but it is a good reminder when you see it on chart.Indicatore Pine Script®di S5_Trading_Desk9
BTC Market Cap / Global M2 weighted by GoldThe market cap of Bitcoin divided by the M2 money supply of a collection of the worlds fiat currencies converted into USD and weighted by the price of gold.Indicatore Pine Script®di benloveslamp2
UTC - London & NY SessionsHighlights London (08:00–17:00 UTC) and New York (13:00–22:00 UTC) trading sessions. Sessions are based strictly on UTC time. Friday sessions are colored differently for quick end-of-week visual identification.Indicatore Pine Script®di local_one1
MTF+ QuantMTF+ Quant - User Guide 📊 Overview MTF+ Quant Enhanced is a professional-grade technical indicator that combines correlation analysis with advanced market microstructure metrics. It's designed for traders who want institutional-level insights into trend strength, market regime, and order flow dynamics. 🎯 What It Measures Core Components Three Correlation Lines (Fast/Medium/Slow) Measures statistical correlation between price and time Values range from -1.0 to +1.0 Positive values = Uptrend (price rising over time) Negative values = Downtrend (price falling over time) Near zero = No clear trend / choppy market Microstructure Indicators Volume Profile (purple circles): Price deviation from volume-weighted average Order Flow Imbalance (orange stepped line): Buy vs sell pressure Autocorrelation: Measures momentum persistence Amplitude Overlay (blue line) Volume-weighted momentum indicator Shows price acceleration/deceleration Leads the correlation lines Regime Detection (background color) Green background: Low volatility regime (trending favorable) Red background: High volatility regime (caution) No color: Normal volatility Metrics Table (top right) Real-time quantitative measurements Order Flow, Vol Profile, Autocorrelation values Hurst Exponent (if enabled) Current volatility regime 📈 How to Read the Indicator Signal Zones +0.8 ═══════ EXTREME ZONE (overbought/exhaustion risk) +0.4 ─────── STRONG UPTREND ZONE +0.2 ······· SOFT UPTREND ZONE 0.0 ═══════ NEUTRAL (trend transition) -0.2 ······· SOFT DOWNTREND ZONE -0.4 ─────── STRONG DOWNTREND ZONE -0.8 ═══════ EXTREME ZONE (oversold/exhaustion risk) Line Interpretation Fast Line (tan/beige): Short-term trend (12 bars) Medium Line (cyan): Intermediate trend (24 bars) Slow Line (white): Long-term trend (36 bars) 🚀 Trading Strategies 1. Trend Following (Recommended) Entry Signals: ✅ All three lines above +0.2 and rising = Strong uptrend ✅ Fast crosses above Medium with both above zero = Buy signal ✅ Order Flow > 0.2 confirms buying pressure Exit Signals: 🛑 Fast line reaches +0.8 (extreme zone) = Take profits 🛑 Fast crosses below Medium = Exit longs 🛑 Order Flow turns negative while Fast > +0.6 = Divergence warning Example Trade: Setup: Fast (0.35) > Medium (0.28) > Slow (0.15) Order Flow: +0.25 Vol Profile: +0.18 Action: Enter long, target Fast = 0.7, stop below 0.0 2. Mean Reversion (Counter-Trend) Entry Signals: ✅ Fast > +0.8 with Order Flow < 0 = Exhaustion, short opportunity ✅ Fast < -0.8 with Order Flow > 0 = Capitulation, long opportunity ✅ Hurst Exponent < 0.45 confirms mean-reverting market Exit Signals: 🛑 Fast returns to zero line 🛑 Order Flow aligns with direction (divergence resolved) Example Trade: Setup: Fast = +0.85, Order Flow = -0.15 Autocorr: -0.3 (mean reversion mode) Action: Short, target Fast = +0.2, tight stop 3. Regime-Based Trading High Volatility Regime (red background): Reduce position size 50% Widen stops Avoid breakout trades Focus on support/resistance Low Volatility Regime (green background): Standard position sizing Trend following works best Breakouts more reliable Normal Regime (no color): Standard strategies apply 🔧 Configuration Guide For Day Trading (scalping/intraday) Fast: 8 Medium: 16 Slow: 24 Order Flow Window: 5 Vol Profile Window: 10 For Swing Trading (default - recommended) Fast: 12 Medium: 24 Slow: 36 Order Flow Window: 10 Vol Profile Window: 20 For Position Trading (long-term) Fast: 24 Medium: 50 Slow: 100 Order Flow Window: 20 Vol Profile Window: 50 📊 Advanced Features Hurst Exponent (Enable in settings) H > 0.55: Market is trending - use trend following H = 0.45-0.55: Random walk - be cautious H < 0.45: Mean reverting - use counter-trend strategies Z-Score Normalization When enabled, correlations are standardized across time periods. This helps identify truly extreme conditions vs normal volatility. ⚠️ Important Warnings Extreme zones (±0.8) are NOT automatic reversal signals Markets can stay extreme for extended periods Always confirm with Order Flow divergence Use multiple timeframes Check higher timeframe (4H/Daily) for major trend Use this indicator on your trading timeframe Volume matters Low volume signals are less reliable Order Flow needs volume to be meaningful Not a standalone system Combine with support/resistance Use proper risk management Consider market context (news, events) 🎓 Practical Examples Example 1: Perfect Bull Setup Fast: +0.45 (rising) Medium: +0.35 (rising) Slow: +0.22 (rising) Order Flow: +0.30 Vol Profile: +0.15 Amplitude: Rising Background: Green (low vol) Interpretation: Strong confirmed uptrend Action: Hold longs, add on pullbacks to +0.3 Example 2: Exhaustion Warning Fast: +0.82 (flattening) Medium: +0.65 (still rising) Slow: +0.48 (rising) Order Flow: -0.10 (negative!) Amplitude: Declining Interpretation: Buyers exhausted despite high correlation Action: Take profits, prepare for reversal Example 3: Choppy Market Fast: +0.15 → -0.10 → +0.05 (oscillating) Medium: -0.05 (near zero) Slow: +0.08 (near zero) Autocorr: -0.25 (mean reverting) Background: Red (high vol) Interpretation: No clear trend, range-bound Action: Avoid trend trades, wait for clarityIndicatore Pine Script®di ONLYORDERFLOW10
Game Theory Strategic Indicator - Archery & Horse Riding Model# Game Theory Strategic Indicator - Archery & Horse Riding Model ## Overview This indicator applies rigorous game theory mathematics to market analysis, modeling price action as a strategic two-player game between buyers and sellers. The methodology draws from economic game theory, evolutionary dynamics, and zero-sum game optimization. ## Theoretical Foundation The indicator implements five core game theory concepts: **1. Expected Utility (Mixed Strategies)** Calculates E = p×U₁ + (1-p)×U₂ where: - p = probability distribution based on volume dynamics - U₁, U₂ = utility payoffs for aggressive vs defensive strategies - Uses RSI momentum and ATR volatility to quantify payoffs **2. Nash Equilibrium Detection** Identifies market states where ui(σᵢ*, σ₋ᵢ*) ≥ ui(σᵢ, σ₋ᵢ*): - Measures when no participant can improve by changing strategy - Highlighted with yellow background zones - Signals reduced edge environments (avoid trading) **3. Replicator Dynamics** Models evolutionary strategy adaptation: dx/dt = x(f(x) - φ(x)) - Tracks frequency changes in bullish vs bearish strategies - Shows which approach is gaining evolutionary fitness - Purple line indicates strategy evolution trend **4. Minimax Algorithm** Implements zero-sum game optimal strategy L(x,y): - Calculates win/loss ratio over lookback period - Values > 1.0 suggest favorable risk/reward - Orange line shows deviation from neutral state **5. Best Response Function** Determines optimal action maximizing ui(aᵢ, a₋ᵢ): - Compares buyer vs seller expected utilities - Generates primary long/short signals - Confidence weighted by utility differential ## Visual Elements **Chart Plots:** - **Blue Line (Utility Differential)**: Buyer utility minus seller utility. Positive favors longs, negative favors shorts - **Purple Line (Replicator Dynamics)**: Rate of strategy evolution. Rising = bullish strategies gaining fitness - **Orange Line (Minimax Deviation)**: Zero-sum game value. Above zero = favorable conditions - **Pink Area (Mixed Strategy Bias)**: Probability-weighted strategy preference - **Yellow Background**: Nash equilibrium zones where no player has edge **Signals:** - **Green Triangle Up**: Long signal - buyer utility dominates outside equilibrium - **Red Triangle Down**: Short signal - seller utility dominates outside equilibrium - **Yellow Diamond**: Equilibrium warning - reduced edge state **Info Table (Top Right):** - EU Buyer/Seller: Current expected utilities - Nash Score: Equilibrium strength (>0.65 = equilibrium) - Mix Prob: Volume-based probability distribution - Minimax: Win/loss ratio indicator ## Strategy Metaphors **Archery (Buyer Strategy)**: Represents precision attacks - targeted entries at optimal risk/reward points, high accuracy required **Horse Riding (Seller Strategy)**: Represents mobile defense - flexible positioning, quick exits, adaptive to changing terrain ## Parameters - **Strategy Period (14)**: Lookback for RSI and ATR calculations - **Mixed Strategy Length (21)**: Period for minimax win/loss analysis - **Nash Equilibrium Threshold (0.65)**: Minimum score to identify equilibrium (0.5-0.9) - **Show Trade Signals**: Toggle buy/sell arrows - **Show Equilibrium Zones**: Toggle background highlighting ## How to Use 1. **Trend Trading**: Take long signals when utility differential (blue) is rising and no equilibrium zone present 2. **Counter-Trend**: Take signals when replicator dynamics (purple) diverges from price 3. **Risk Management**: Avoid trading during yellow equilibrium zones - market has no clear edge 4. **Confirmation**: Best signals occur when minimax > 1.0 and best response aligns with utility differential 5. **Monitoring**: Watch info table for real-time utility balance and equilibrium status ## Alerts Three alert conditions available: - **GT Long Signal**: Buyer utility dominates, composite score > 0.5 - **GT Short Signal**: Seller utility dominates, composite score < -0.5 - **Nash Equilibrium**: Market reaches balanced state, avoid new entries ## Mathematical Rigor All calculations use proper game theory formulations: - Payoff functions normalized by volatility - Probability distributions bounded - Zero-division protection implemented - Utilities properly weighted in composite score ## Originality Statement This indicator is original work implementing classical game theory mathematics in a novel market analysis framework. The code, calculations, and interpretation methodology are entirely my own creation. No external scripts were copied or modified. ## Disclaimer This indicator is for educational purposes. Game theory provides a framework for analyzing strategic interaction but does not guarantee profitable trading. Always use proper risk management, test thoroughly, and understand that past performance does not indicate future results. --- **Educational Resource**: For deeper understanding of game theory in economics, see Nash (1950) "Equilibrium Points in N-Person Games" and Maynard Smith (1982) "Evolution and the Theory of Games" ``` ---Indicatore Pine Script®di uzair2join22
Multi Moving AveragesThis indicator plots five moving averages using user-defined lengths Each moving average is calculated on the selected price source (default: close) with an internal standard deviation context, similar to Bollinger-basis behavior, ensuring visual consistency with advanced MA configurations. Features Five customizable MA lengths (default: 14, 21, 50, 200, 300) Uses chart timeframe (no higher/lower TF distortion) Configurable source, standard deviation, and offset Clean overlay designed for trend structure and bias analysis Use Case Identify short-, mid-, and long-term trend alignment Track dynamic support and resistance Useful for intraday, swing, and higher-timeframe biasIndicatore Pine Script®di OxAzan1
Liquidity Sweeps + MSS (Valid / Ignored)//@version=5 indicator("Liquidity Sweeps + MSS (Valid / Ignored)", overlay=true, max_labels_count=200, max_lines_count=200) //────────────────────────────────────────────────────────────── // Inputs structureLookback = input.int(20, "Structure Lookback (recent highs/lows)", minval=10) rangeLookback = input.int(80, "Range Lookback (to define extremes)", minval=30) extremeZonePct = input.float(0.25, "Extreme Zone % (0.25 = top/bottom 25%)", minval=0.05, maxval=0.45, step=0.05) useCloseReentry = input.bool(true, "Require close back inside level (reentry)") // MSS / Swings pivotLeft = input.int(3, "Swing Pivot Left", minval=1) pivotRight = input.int(3, "Swing Pivot Right", minval=1) mssMode = input.string("Close", "MSS Break uses", options= ) // Close = stricter useImpulseFilter = input.bool(true, "Filter strong impulse candles") impulseATRmult = input.float(1.0, "Max body size (ATR multiple)", minval=0.3, maxval=3.0, step=0.1) atrLen = input.int(14, "ATR Length", minval=5) showOnlyValid = input.bool(true, "Show only VALID signals") showPending = input.bool(true, "Show PENDING label") plotStructureLvls = input.bool(false, "Plot recent structure levels") plotMssLevel = input.bool(true, "Plot MSS level while pending") //────────────────────────────────────────────────────────────── // Helpers atr = ta.atr(atrLen) body = math.abs(close - open) // Recent structure (dynamic) recentHigh = ta.highest(high, structureLookback) recentLow = ta.lowest(low, structureLookback) // Bigger “range” to determine if we are at extremes vs middle rngHigh = ta.highest(high, rangeLookback) rngLow = ta.lowest(low, rangeLookback) rng = math.max(rngHigh - rngLow, syminfo.mintick) pos = (close - rngLow) / rng // 0..1 isTopExtreme = pos >= (1.0 - extremeZonePct) isBotExtreme = pos <= extremeZonePct impulseOk = not useImpulseFilter or (body <= atr * impulseATRmult) //────────────────────────────────────────────────────────────── // Swings for MSS (pivot-based) ph = ta.pivothigh(high, pivotLeft, pivotRight) pl = ta.pivotlow(low, pivotLeft, pivotRight) var float lastSwingHigh = na var float lastSwingLow = na // Update latest confirmed swing points (they appear pivotRight bars late, that's fine) if not na(ph) lastSwingHigh := ph if not na(pl) lastSwingLow := pl // Optional: plot structure levels plot(plotStructureLvls ? recentHigh : na, "Recent High", color=color.new(color.red, 70), style=plot.style_linebr, linewidth=2) plot(plotStructureLvls ? recentLow : na, "Recent Low", color=color.new(color.lime,70), style=plot.style_linebr, linewidth=2) //────────────────────────────────────────────────────────────── // Raw sweeps (wick through recent level + optional close reentry) rawSweepHigh = high > recentHigh and (useCloseReentry ? close < recentHigh : true) rawSweepLow = low < recentLow and (useCloseReentry ? close > recentLow : true) // Location filter preValidHigh = rawSweepHigh and isTopExtreme and impulseOk preValidLow = rawSweepLow and isBotExtreme and impulseOk //────────────────────────────────────────────────────────────── // State machine: PENDING → VALID/IGNORED based on MSS break var int pendingDir = 0 // 1 = high sweep pending, -1 = low sweep pending, 0 = none var int pendingStartBar = na var float pendingMssLevel = na var label pendingLabel = na // MSS break condition breakDown = mssMode == "Close" ? close < pendingMssLevel : low < pendingMssLevel breakUp = mssMode == "Close" ? close > pendingMssLevel : high > pendingMssLevel confirmMSSHigh = pendingDir == 1 and not na(pendingMssLevel) and breakDown confirmMSSLow = pendingDir == -1 and not na(pendingMssLevel) and breakUp // If no MSS level exists at sweep time, we will ignore (strict = fewer signals) noMssLevel = pendingDir != 0 and na(pendingMssLevel) // Pending visualization of MSS level plot(plotMssLevel and pendingDir != 0 ? pendingMssLevel : na, "Pending MSS Level", color=color.new(color.yellow, 0), style=plot.style_linebr, linewidth=2) //────────────────────────────────────────────────────────────── // Label helpers makeIgnoredLabel(_isHigh, _reason) => if not showOnlyValid float y = _isHigh ? high : low labelStyle = _isHigh ? label.style_label_down : label.style_label_up label.new(bar_index, y, "SWEEP IGNORED " + _reason, style=labelStyle, color=color.new(color.gray, 0), textcolor=color.white) makePendingLabel(_isHigh, _mss) => if showPending float y = _isHigh ? high : low labelStyle = _isHigh ? label.style_label_down : label.style_label_up string txt = "SWEEP PENDING MSS: " + (na(_mss) ? "na" : str.tostring(_mss, format.mintick)) label.new(bar_index, y, txt, style=labelStyle, color=color.new(color.orange, 0), textcolor=color.white) else na setValidLabel(_lbl, _isHigh) => if not na(_lbl) label.set_text(_lbl, "SWEEP VALID (MSS)") label.set_color(_lbl, _isHigh ? color.new(color.red, 0) : color.new(color.lime, 0)) label.set_textcolor(_lbl, color.white) //────────────────────────────────────────────────────────────── // Main flow if pendingDir == 0 // New HIGH sweep candidate if rawSweepHigh if preValidHigh pendingDir := 1 pendingStartBar := bar_index // MSS level for HIGH sweep = lastSwingLow (the low we want to break) pendingMssLevel := lastSwingLow pendingLabel := makePendingLabel(true, pendingMssLevel) // If we cannot define MSS level => ignore (strict) if na(pendingMssLevel) makeIgnoredLabel(true, "no swing low (MSS) yet") if not na(pendingLabel) label.delete(pendingLabel) pendingDir := 0 pendingStartBar := na pendingMssLevel := na pendingLabel := na else makeIgnoredLabel(true, "filters (location/impulse/reentry)") // New LOW sweep candidate (only if no pending created above) if rawSweepLow and pendingDir == 0 if preValidLow pendingDir := -1 pendingStartBar := bar_index // MSS level for LOW sweep = lastSwingHigh (the high we want to break) pendingMssLevel := lastSwingHigh pendingLabel := makePendingLabel(false, pendingMssLevel) if na(pendingMssLevel) makeIgnoredLabel(false, "no swing high (MSS) yet") if not na(pendingLabel) label.delete(pendingLabel) pendingDir := 0 pendingStartBar := na pendingMssLevel := na pendingLabel := na else makeIgnoredLabel(false, "filters (location/impulse/reentry)") else // Pending: confirm with MSS if confirmMSSHigh setValidLabel(pendingLabel, true) // Reset pendingDir := 0 pendingStartBar := na pendingMssLevel := na pendingLabel := na else if confirmMSSLow setValidLabel(pendingLabel, false) // Reset pendingDir := 0 pendingStartBar := na pendingMssLevel := na pendingLabel := na // Alerts only on VALID MSS alertcondition(confirmMSSHigh, "Sweep VALID High (MSS)", "VALID liquidity sweep HIGH confirmed by MSS") alertcondition(confirmMSSLow, "Sweep VALID Low (MSS)", "VALID liquidity sweep LOW confirmed by MSS")Indicatore Pine Script®di harderwijksay29
Unified Field: Clean FVG + Session POCTry it free. No guarantees. I find it useful for scalping. My ai wrote the code for it albeit, my idea. : )Indicatore Pine Script®di johnkling3004
Sakalau02 Yearly Monthly Sessions Sakalau02 Yearly Monthly Sessions is an advanced time-mapping tool designed to highlight monthly cycles throughout the year. The indicator converts raw price data into a clean visual structure, using arrays for optimized performance. Macro Perspective: It allows you to visualize how price interacts with previous monthly highs and lows, making it ideal for identifying seasonal trends. Array-Based Structure: Unlike traditional scripts, this dynamically handles data for all 12 months, ensuring low resource consumption even with a multi-year lookback. Display Modes: Offers full flexibility by using Boxes (monthly price range), Zones (full-height background shading), or Timeline (discrete bottom markers). Key Features: Reference Levels: Includes the monthly Open price and the Equilibrium level (0.5 Level) for every session. Individual Customization: Each month can be toggled and colored separately to highlight specific quarters or fiscal periods. Alert System: Automated notifications for month starts and breakouts of monthly extremes (High/Low). By Sakalau02 ( Andrei )Indicatore Pine Script®di Aa0022
PoW Floor OscillatorThis model was proposed by @paulewaulpaul as an attempt to model the cost of BTC production using Difficulty (input) and Issuance (output) as the key parameters. The following is paraphrased from the original research piece: Difficulty D is taken as the estimated number of hashes required to mine a block (denoted in raw hashes). This is proportional to the energy consumption and the energy efficiency and reflects the demand. We use difficulty to estimate production costs. As mining becomes more efficient over time, hash rate becomes cheaper. Therefore we add a damping coefficient k and a scaling factor a (the cost per unit of adjusted difficulty). To get the value per coin, we divide by the issuance I. We get the values for a and k by fitting the function to price. For this we use the lows of the last two halving cycles, deep in the bear market when only the most efficient mining was profitable. The PoW Floor Model is thus calculated as follows: PoW Floor Pricing Model = 2/3 * (sma(D,180)^0.41 / sum(I,180)) The damping coefficient is k = 0.41 and scaling factor a = 2/3. Statistically, this means that doubling the difficulty increases the estimated production cost by ~33%. We use a moving average for the difficulty and look at a 180 day period. For the upper bands we use the 1.41 and 2 multiples where the factor of 2 estimates the cost of production after the next halving event (assuming constant difficulty). Coined By kuntah in Bitcoin: Difficulty per Issuance - A PoW Pricing Model, Oct 2022Indicatore Pine Script®di M483846