ATR% Z-Score Z-Score of ATR% measures price volatility intensity relative to its historical average to identify extreme panic.Indikator Pine Scriptยฎoleh boromeywang3
TorHzpk EMA with Config & Values (v5) + Cross AlertsTorHzpk EMA with Config & Values (v5) + Cross Alerts Indikator Pine Scriptยฎoleh TorHzpk7
Trend Matrix: Institutional Confluence EngineTrend Matrix: Institutional Confluence Engine The Institutional Confluence Engine is a professional-grade diagnostic tool designed to solve the two biggest problems in technical analysis: market noise and false breakouts. Unlike standard lagging indicators, the Institutional Confluence Engine uses a sentient resolution engine to adapt its logic based on whether you are scalping or swing trading. It provides a real-time "Efficiency Grade" for the market, allowing you to ignore "C-Grade" chop and focus exclusively on "A-Grade" institutional trends. Institutional Confluence and Alerts: Notifies you only when the Local, HTF1, and HTF2 timeframes all align at an "A-Grade" efficiencyโthe hallmark of a major structural move. How to Trade It Identify Confluence: Look for the Status Hub in the top right. When all three grades turn Green (A), institutional alignment is at its peak. This is also visible on the chart. Monitor Trend Core: The ribbon acts as dynamic support/resistance. "Trend Flares" (brightening of the ribbon) indicate significant volume spikes entering the trend. Profit Targets: Use the dynamic Green/Red expansion lines. These are volatility-adjusted targets that stretch or contract based on market energy (ATR). Volume Intelligence 1. The Big Money Heatmap (Volume Intelligence) Institutional players leave footprints in the form of volume. This engine visualizes these footprints using a dynamic Volume Profile integrated directly into your price action. Big Money Clusters: These are price levels where massive institutional orders are being "filled." They represent high-conviction zones that act as magnets for price. Major Buy/Sell Zones (POC): This marks the Point of Controlโthe exact price where the highest volume has transacted. It represents "Fair Value." Breakouts away from this zone often lead to the most explosive moves. Gap Prediction: The engine analyzes the sentiment within volume nodes to predict if the market is preparing for an institutional "Gap Up" or "Gap Down." 2. The Golden Bridge (Structural Confluence) The system calculates the Golden Bridgeโa dynamic threshold based on the 0.618 Fibonacci ratio between major structural pivots. The Logic: In institutional finance, the 0.618 level is the "Line in the Sand." If a rally holds above the Golden Bridge, the trend is structurally sound. Golden Cluster Stronghold: When the Golden Bridge aligns perfectly with a Big Money Cluster, the system identifies a "Stronghold." This is the highest-probability support or resistance level generated by the engine. 3. MTF Efficiency Grading (A/B/C) The Trend Matrix doesn't just show direction; it calculates Efficiency. Grade A (High Efficiency): Price is tracking the trend core with minimal deviation. This is where institutional momentum is strongest. Grade B (Moderate Efficiency): Healthy trending with standard pullbacks. Grade C (Low Efficiency/Chop): Price is oscillating. The system will automatically "dim" the interface during these periods to prevent you from over-trading. 4. Status Hub & Intelligent Alerts The Status Hub provides a real-time cockpit of your trading environment, displaying the "Trend Reliability Score" (0-100%) and Multi-Timeframe grades. Confluence Alerts: Get notified when the Local, HTF1, and HTF2 timeframes all reach "A-Grade" status simultaneously. Exhaustion Pillars: Vertical pillars on your chart highlight "Volume Spikes," warning you of potential trend exhaustion before the reversal happens. How to Use Check the Hub: Ensure the Trend Reliability is above 75%. Verify Grade: Look for "A-Grade" efficiency on your local timeframe. Find the Stronghold: Enter trades where the Golden Bridge and Big Money Clusters overlap for the highest-probability entries. Target Expansion: Follow the dynamic Green/Red target lines for volatility-adjusted take-profits. Disclaimer: Trading involves significant risk. This tool is designed for educational and diagnostic purposes and should be used as part of a comprehensive trading plan.Indikator Pine Scriptยฎoleh TrendMatrix_Labs16
stelaraX - DPOstelaraX โ DPO stelaraX โ Detrended Price Oscillator (DPO) is a cycle-based indicator designed to remove long-term trend components from price action. By isolating short- to medium-term price cycles, it helps traders focus on market rhythm and cyclical turning points rather than overall trend direction. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Detrended Price Oscillator subtracts a displaced simple moving average from the current price. This displacement shifts the moving average back in time, effectively removing the dominant trend component. Key principles: * the lookback period defines the dominant cycle length * the moving average is shifted backward by half the period plus one * values above zero indicate price above the detrended mean * values below zero indicate price below the detrended mean * oscillations highlight cyclical highs and lows The DPO is not designed to follow trends but to analyze price cycles and mean reversion behavior. Visualization The script plots: * the DPO line in a separate indicator pane * green coloring when values are above zero * red coloring when values are below zero * a zero reference line for cycle symmetry This presentation makes cyclical expansions and contractions clearly visible. Use case This indicator is intended for: * identifying cyclical market highs and lows * timing entries and exits in ranging markets * analyzing mean reversion behavior * confirming cycle-based divergences * supporting non-trend-following and oscillation strategies It works best when used independently from trend indicators or alongside regime filters. Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Indikator Pine Scriptยฎoleh stelaraX_official5
stelaraX - Coppock CurvestelaraX โ Coppock Curve stelaraX โ Coppock Curve is a long-term momentum indicator designed to identify major trend transitions and long-term buying opportunities. It combines rate-of-change momentum with weighted smoothing to highlight broad market shifts rather than short-term noise. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Coppock Curve is calculated by summing two rate-of-change (ROC) values with different lookback periods and smoothing the result using a weighted moving average (WMA). Key principles: * the long ROC captures broader market momentum * the short ROC adds sensitivity to more recent price changes * the WMA smooths combined momentum to reduce noise * values above zero indicate positive long-term momentum * values below zero indicate negative long-term momentum The Coppock Curve is traditionally used to assess major trend shifts rather than precise entry timing. Visualization The script plots: * the Coppock Curve as a histogram in a separate indicator pane * green bars when long-term momentum is positive * red bars when long-term momentum is negative * a zero reference line for directional context This clean histogram view emphasizes dominant long-term momentum cycles. Use case This indicator is intended for: * identifying major market trend transitions * spotting long-term accumulation phases * confirming primary trend direction * filtering short-term trades in alignment with macro momentum * supporting position trading and investment-focused strategies It is especially effective on higher timeframes and when combined with trend structure or AI-assisted market analysis. Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Indikator Pine Scriptยฎoleh stelaraX_official6
stelaraX - Chaikin Money FlowstelaraX โ Chaikin Money Flow stelaraX โ Chaikin Money Flow is a volume-based momentum indicator designed to measure buying and selling pressure over a defined period. By combining price location within the candle and traded volume, it helps identify whether capital is flowing into or out of an asset. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Chaikin Money Flow (CMF) evaluates where the closing price lies within the highโlow range and weights this position by volume. The result is averaged over a user-defined lookback period and normalized by total volume. Key principles: * closes near the high contribute positive money flow * closes near the low contribute negative money flow * values above zero indicate net buying pressure * values below zero indicate net selling pressure * higher absolute values reflect stronger conviction Readings beyond typical threshold levels suggest sustained accumulation or distribution rather than short-term noise. Visualization The script plots: * the Chaikin Money Flow as a histogram in a separate indicator pane * green bars when CMF values are positive * red bars when CMF values are negative * a zero reference line for directional context * additional reference levels at +0.05 and โ0.05 for pressure strength This layout makes shifts in capital flow and volume-backed momentum easy to interpret. Use case This indicator is intended for: * identifying accumulation and distribution using volume flow * confirming trend direction with volume confirmation * spotting divergences between price and money flow * filtering false breakouts and weak price moves * supporting volume-based and smart money concepts It works particularly well when combined with price structure, trend filters, or AI-assisted chart evaluation. Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Indikator Pine Scriptยฎoleh stelaraX_official1
SMC Valid/Invalid PullbacksThis indicator helps to identify valid / invalid price pullbacks from smc perspectiveIndikator Pine Scriptยฎoleh fantor7010
UK Dual-Session HighlighterOverview This indicator is a specialized volatility-window tool designed for traders operating in UK Time (Europe/London). It specifically isolates the two highest-probability trading windows for the Nasdaq (NQ) and other US/European indices, while intentionally leaving the "Lunch Lull" period unhighlighted to help traders avoid low-liquidity "chop." The Dual-Session Strategy The script highlights two distinct phases of the trading day: London Morning (09:15 โ 12:00): Captures the core European institutional flow and the establishment of the morning trend. The US Active Window (13:30 โ 17:15): Covers the critical 13:30 US Economic Data releases, the 14:30 New York Open, and the high-volume London-NY Overlap. Key Features for 2026 Timezone Locked: Hard-coded to Europe/London. You do not need to adjust your chart settings; the indicator stays accurate regardless of your local time. Automatic DST Handling: Fully compatible with 2026 Daylight Saving transitions (GMT/BST). It automatically adjusts when the UK clocks change in March and October. The "Lunch Lull" Filter: By leaving the 12:00โ13:30 window blank, the indicator provides a visual "stop" signal during the period when London traders are at lunch and US pre-market volume is typically at its lowest. Fully Customizable: Toggle sessions on/off and adjust colors, transparency, and specific start/end times via the Inputs menu.Indikator Pine Scriptยฎoleh ManWithDPlanDiupdate 3
stelaraX - Choppiness IndexstelaraX โ Choppiness Index stelaraX โ Choppiness Index is a market state indicator designed to quantify whether price action is trending or ranging. It measures how efficiently price moves over time and helps traders distinguish between directional phases and choppy, sideways market conditions. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Choppiness Index evaluates the relationship between cumulative volatility and total price range over a user-defined lookback period. Key principles: * the sum of true range (ATR) represents total market movement * the highโlow range defines net price displacement * the resulting value is normalized on a 0โ100 scale * higher values indicate choppy, non-directional markets * lower values indicate efficient, trending price movement Readings above the upper threshold suggest consolidation or range-bound conditions, while readings below the lower threshold signal trending environments. Visualization The script plots: * the Choppiness Index line in a separate indicator pane * a configurable upper threshold highlighting choppy market phases * a configurable lower threshold highlighting trending market phases * a filled background zone between both thresholds for visual clarity This visualization makes regime shifts between trend and consolidation phases easy to identify at a glance. Use case This indicator is intended for: * distinguishing trending from ranging market conditions * filtering trend-following strategies during consolidation * selecting appropriate strategies based on market regime * improving entry timing by avoiding low-quality setups * supporting multi-indicator and AI-assisted market analysis It is especially effective when used as a regime filter alongside momentum or trend indicators. Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Indikator Pine Scriptยฎoleh stelaraX_official2
Palko Long 1 This confirms RSI > 70 High Vol on 4HR At least 2 1Hr candles have high vol ****** Need to check 15 min rule manually *****Indikator Pine Scriptยฎoleh palko173
stelaraX - ALMAstelaraX โ ALMA stelaraX โ ALMA is a trend-following moving average designed to reduce lag while maintaining smooth price representation. It uses a Gaussian-weighted distribution to emphasize recent price data without the excessive noise often seen in faster averages. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Arnaud Legoux Moving Average (ALMA) applies a Gaussian weighting scheme across a user-defined lookback period. Unlike traditional moving averages, it shifts the weighting curve using an offset parameter, allowing fine control over responsiveness and smoothness. Key principles: * the lookback period defines the smoothing horizon * the offset controls the center of the Gaussian curve and thus the balance between lag and responsiveness * the sigma parameter adjusts the width of the Gaussian distribution * rising ALMA values indicate bullish trend momentum * falling ALMA values indicate bearish trend momentum The ALMA reacts faster to price changes than classic moving averages while remaining visually smooth and stable. Visualization The script plots: * the ALMA line directly on the price chart * dynamic color changes based on ALMA slope direction * green coloring for rising ALMA values * red coloring for falling ALMA values This color-coded display provides immediate visual feedback on short-term trend direction and momentum shifts. Use case This indicator is intended for: * identifying trend direction and trend changes * acting as a dynamic support and resistance guide * filtering entries in trend-following strategies * confirming momentum in breakout or pullback setups * replacing traditional moving averages with reduced lag It integrates well with price action, structure-based systems, and AI-assisted chart analysis. Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Indikator Pine Scriptยฎoleh stelaraX_official1
CTR Dual Custom MAs ProFurther improved indicator with easier access to seeing only bearish signals or bullish signals or both by using the Global Bias drop down option. Simplifies everything so you can quickly see what you want without having to check all the different boxes for bull signals and bear signals. Indikator Pine Scriptยฎoleh amatthews112
stelaraX - Accumulation/DistributionstelaraX โ Accumulation/Distribution stelaraX โ Accumulation/Distribution is a volume-based indicator designed to analyze buying and selling pressure by combining price movement with traded volume. It helps traders assess whether an asset is being accumulated (smart money buying) or distributed (selling pressure), even when price action appears sideways or unclear. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Accumulation/Distribution (A/D) line evaluates where the closing price sits within the candle range and weights this position by volume. Key principles: * closes near the high with high volume increase the A/D value (accumulation) * closes near the low with high volume decrease the A/D value (distribution) * values are cumulatively summed, creating a running pressure profile * a simple moving average (SMA) of the A/D line is applied for smoothing and trend confirmation A rising A/D line indicates underlying buying pressure, while a falling A/D line signals increasing selling pressure. Visualization The script plots: * the Accumulation/Distribution line in a separate indicator pane * a configurable moving average of the A/D line * customizable colors for both the raw A/D line and its moving average This clean layout makes shifts in volume-backed momentum and pressure changes easy to spot. Use case This indicator is intended for: * identifying accumulation and distribution phases * confirming trend strength using volume confirmation * spotting divergences between price and volume pressure * filtering false breakouts in low-quality price moves * supporting smart money and volume-based trading concepts It works especially well when combined with price structure, trend filters, or AI-assisted chart interpretation. Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.Indikator Pine Scriptยฎoleh stelaraX_official0
Sam BB V14 Bollinger Bands Ribbon with custom inter-band fills looks well-structured and mostly correct for Pine Script v5. It implements: Four independent, customizable Bollinger Band sets (different lengths, MA types, multipliers, sources, colors) Individual inner fills (inside each band) Inter-band "ribbon" fills (the zones between bands on both upper and lower sides) Toggle visibility per band Clean input grouping Design by Sam Mahboubeh, V1Indikator Pine Scriptยฎoleh sammahboubeh1
RT Signals & Overlays Signals & Overlaysโข is an all-in-one toolkit made up of more than 20+ features primarily focused on generating useful signals & overlays to fulfill any trader's technical analysis needs with relevant data.Indikator Pine Scriptยฎoleh rohitwangaskar789650
Sector Rotation & Allocation StrategySector Rotation & Allocation Strategy Overview This advanced indicator analyzes the relationship between Defensive and Cyclical sectors to identify market regimes and generate precise buy/sell signals. It automatically detects which asset you're viewing and provides tailored recommendations based on current sector rotation dynamics. What It Does Identifies Market Regime โ Determines if markets are in Risk-On (growth) or Risk-Off (defensive) mode Auto-Detects Your Asset โ Classifies the current chart into one of 11 sectors Generates Trading Signals โ Provides BUY/SELL signals based on sector alignment with market conditions Multi-Timeframe Analysis โ Offers allocation recommendations from 1 week to 12 months Value Assessment โ Scores each asset 0-100 to determine if it's a good trade NOW How It Works Market Regime Detection The indicator compares Defensive Sectors (Health Care, Consumer Staples, Utilities) against Cyclical Sectors (Technology, Financials, Energy, Industrials, Materials, Real Estate, Discretionary, Communication). Risk-On Market (Green, >0): Cyclical sectors outperforming Economic growth expected Investors favoring growth stocks Action : Buy cyclicals, reduce defensives Risk-Off Market (Red, <0): Defensive sectors outperforming Uncertainty or fear in markets Flight to safety occurring Action : Buy defensives, reduce cyclicals Understanding the Four Tables 1. MARKET REGIME (Top Left) Market Regime : Current state โ RISK-ON or RISK-OFF Bias : Which sector type is favored right now Strength : STRONG/MODERATE/WEAK โ conviction level Current Sector : Your asset's sector classification Signal : Trading recommendation for your specific asset 2. SECTOR RANKINGS (Top Right) Shows relative strength of all 11 sectors vs SPY benchmark. Rel Str : Percentage outperformance/underperformance vs market Signal : โ = Outperforming, โ = Underperforming, โ = Neutral 3. ALLOCATION RECOMMENDATIONS (Bottom Center) Suggested portfolio allocation between Defensive and Cyclical sectors. 1 Week : Tactical โ follows current regime closely (70/30 split) 1 Month : Near-term positioning (65/35 split) 3 Months : Medium-term allocation (60/40 split) 6 Months : Balanced approach (50/50 split) 12 Months : Strategic/Contrarian โ assumes mean reversion (40/60 split) 4. ASSET ANALYSIS (Bottom Left) Sector : Auto-detected sector classification Value Rating : STRONG BUY / BUY / HOLD / REDUCE / AVOID Value Score : 0-100 numerical assessment Rel Strength : How this asset performs vs SPY Regime Fit : Is this asset aligned with current market regime? Trading Signals Explained BUY Signals Oscillator crosses above oversold (30) Asset's sector is gaining momentum Regime is favorable for that sector SELL Signals Oscillator crosses below overbought (70) Asset's sector is losing momentum Regime is turning unfavorable for that sector How Value Score Works (0-100) Relative Strength (40 points max) : Asset outperforming SPY by 5%+ โ 40 points Asset outperforming SPY by 2-5% โ 30 points Asset outperforming SPY by 0-2% โ 20 points Asset underperforming slightly โ 10 points Asset underperforming significantly โ 0 points Sector Alignment (30 points max) : Defensive in Risk-Off OR Cyclical in Risk-On โ 30 points Misaligned sector โ 0 points Unclassified โ 15 points Momentum (30 points max) : RSI > 60 โ 30 points RSI 50-60 โ 20 points RSI 40-50 โ 10 points RSI < 40 โ 0 points Interpretation : 80-100 : STRONG BUY โ High conviction opportunity 65-79 : BUY โ Favorable setup 45-64 : HOLD โ No clear edge 30-44 : REDUCE โ Unfavorable conditions 0-29 : AVOID โ High risk of underperformance Best Practices Use Daily Timeframe or Higher โ More reliable signals Combine with Price Action โ Confirm with support/resistance Monitor Regime Changes โ Transitions offer the highest ROI Respect Risk Management โ Always use stop losses Don't Fight the Regime โ Buying defensives during Risk-On is low probability Disclaimer This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Conduct your own research before making investment decisions. Version: 6.0 Author: @bigcitytom Last Updated: February 2026Indikator Pine Scriptยฎoleh bigcitytom17
Custom Time Highlighter (UK time adjusted)Overview This indicator is designed to visually isolate a specific custom time window on your chart. It automatically adjusts for British Summer Time (BST) and Greenwich Mean Time (GMT) transitions, ensuring your session start and end times remain accurate throughout the year. Customizable Window: While the default is set to 9:15 AM - 5:15 PM, users can easily modify the session hours via the input settings.Indikator Pine Scriptยฎoleh ManWithDPlanDiupdate 1
XAUUSD Power @ Strict Pivot S/RThis indicator identifies who is in control (buyers or sellers) when price reaches key support and resistance zones, defined using strict pivot points. How it works Automatically plots support and resistance using confirmed pivots. Analyzes candle structure: candle direction (bullish / bearish) body size wick dominance A signal is shown only when: price is near support or resistance (ATR-based filter) there is clear buying or selling strength Signals appear only after the candle closes (no repaint). Signals ๐บ Green triangle โ buyers gain control at support ๐ป Red triangle โ sellers gain control at resistance Best use Scalping / intraday trading Recommended timeframe: 5-minute Works well on volatile markets such as XAUUSD, US30, NASDAQ Important Confirmation tool, not a prediction system Not an automated trading strategy Should be used with proper risk managementIndikator Pine Scriptยฎoleh Arduzai1999Diupdate 8
Put Spread Signals Daily v5 (NO ta.sum)//@version=5 indicator("Put Spread Signals Daily v5 (NO ta.sum)", overlay=true) // Inputs ma20Len = input.int(20, "MA20") ma50Len = input.int(50, "MA50") ma200Len = input.int(200, "MA200") pullbackPct = input.float(0.01, "Pullback near MA20 (1%=0.01)", step=0.005) minRedDays = input.int(1, "Min red days (last 5)", minval=0, maxval=5) stopBelow200Pct = input.float(0.005, "Stop below MA200 %", step=0.0025) // MAs ma20 = ta.sma(close, ma20Len) ma50 = ta.sma(close, ma50Len) ma200 = ta.sma(close, ma200Len) // Trend + pullback bullTrend = close > ma50 and close > ma200 and ma50 > ma200 nearMA20 = close <= ma20 * (1 + pullbackPct) // Red candle count last 5 bars (NO ta.sum) red0 = close < open ? 1 : 0 red1 = close < open ? 1 : 0 red2 = close < open ? 1 : 0 red3 = close < open ? 1 : 0 red4 = close < open ? 1 : 0 redCount = red0 + red1 + red2 + red3 + red4 hasMinRed = redCount >= minRedDays // Bounce bounce = close > open and close > close // Signals enter = bullTrend and nearMA20 and hasMinRed and bounce takeProfit = ta.crossover(close, ma20) stopOut = close < ma200 * (1 - stopBelow200Pct) // Plots plot(ma20, "MA20", linewidth=2) plot(ma50, "MA50", linewidth=2) plot(ma200, "MA200", linewidth=2) plotshape(enter, title="ENTER", style=shape.labelup, location=location.belowbar, text="ENTER", size=size.small) plotshape(takeProfit, title="EXIT_TP", style=shape.labeldown, location=location.abovebar, text="TP", size=size.small) plotshape(stopOut, title="EXIT_STOP", style=shape.labeldown, location=location.abovebar, text="STOP", size=size.small) // Alerts alertcondition(enter, title="ENTER Alert", message="ENTER: Trend up + pullback near MA20 + bounce. Consider selling put credit spread (30-45 DTE).") alertcondition(takeProfit, title="EXIT TP Alert", message="EXIT TP: Price reclaimed MA20. Consider taking profit.") alertcondition(stopOut, title="EXIT STOP Alert", message="EXIT STOP: Close below MA200 threshold. Consider closing/rolling.") Indikator Pine Scriptยฎoleh JosephGanapathy228
Scalp Master EliteWe present Scalp Master Elite ๐ This is an advanced trading indicator designed to identify high-probability reversal and take-profit zones ๐. It combines a dynamic EMA + ATR channel ๐ with multiple confirmation indicators (RSI, Stochastic, CCI, Supertrend, Price Action and more) to reduce noise and false signals ๐ซ๐. Thanks to its volatility-adaptive logic ๐, the indicator works perfectly for scalping and intraday trading โก, while also adapting smoothly to higher timeframes and long-term trades ๐โณ. Inverted bullish / bearish triangle signals ๐บ๐ป are followed by one confirmed target per setup ๐ฏ, helping traders manage exits with clarity and discipline. Optional targets ๐ฏ, smart alerts ๐, ATR-based filters ๐ and a real-time win-rate table ๐ provide full trade context with clean and intuitive visuals ๐ง โจ.Indikator Pine Scriptยฎoleh jake_theboss22294
Put Spread Signals Daily v5 (NO ta.sum)//@version=5 indicator("Put Spread Signals Daily v5 (NO ta.sum)", overlay=true) // Inputs ma20Len = input.int(20, "MA20") ma50Len = input.int(50, "MA50") ma200Len = input.int(200, "MA200") pullbackPct = input.float(0.01, "Pullback near MA20 (1%=0.01)", step=0.005) minRedDays = input.int(1, "Min red days (last 5)", minval=0, maxval=5) stopBelow200Pct = input.float(0.005, "Stop below MA200 %", step=0.0025) // MAs ma20 = ta.sma(close, ma20Len) ma50 = ta.sma(close, ma50Len) ma200 = ta.sma(close, ma200Len) // Trend + pullback bullTrend = close > ma50 and close > ma200 and ma50 > ma200 nearMA20 = close <= ma20 * (1 + pullbackPct) // Red candle count last 5 bars (NO ta.sum) red0 = close < open ? 1 : 0 red1 = close < open ? 1 : 0 red2 = close < open ? 1 : 0 red3 = close < open ? 1 : 0 red4 = close < open ? 1 : 0 redCount = red0 + red1 + red2 + red3 + red4 hasMinRed = redCount >= minRedDays // Bounce bounce = close > open and close > close // Signals enter = bullTrend and nearMA20 and hasMinRed and bounce takeProfit = ta.crossover(close, ma20) stopOut = close < ma200 * (1 - stopBelow200Pct) // Plots plot(ma20, "MA20", linewidth=2) plot(ma50, "MA50", linewidth=2) plot(ma200, "MA200", linewidth=2) plotshape(enter, title="ENTER", style=shape.labelup, location=location.belowbar, text="ENTER", size=size.small) plotshape(takeProfit, title="EXIT_TP", style=shape.labeldown, location=location.abovebar, text="TP", size=size.small) plotshape(stopOut, title="EXIT_STOP", style=shape.labeldown, location=location.abovebar, text="STOP", size=size.small) // Alerts alertcondition(enter, title="ENTER Alert", message="ENTER: Trend up + pullback near MA20 + bounce. Consider selling put credit spread (30-45 DTE).") alertcondition(takeProfit, title="EXIT TP Alert", message="EXIT TP: Price reclaimed MA20. Consider taking profit.") alertcondition(stopOut, title="EXIT STOP Alert", message="EXIT STOP: Close below MA200 threshold. Consider closing/rolling.") Indikator Pine Scriptยฎoleh JosephGanapathy1
DafeSPALibDafeSPALib: The Shadow Portfolio Adaptation & Strategy Selection Engine This is not a backtester. This is a live, adaptive portfolio manager. It is a reinforcement learning system that learns which of your strategies to trust in the ever-changing chaos of the market. โ CHAPTER 1: THE PHILOSOPHY - BEYOND A SINGLE STRATEGY The search for a single "holy grail" trading strategy is a fool's errand. No single set of rules can perform optimally in all market conditions. A trend-following system that thrives in a bull run will be decimated by a choppy, range-bound market. A mean-reversion strategy that profits from ranges will be run over by a powerful breakout. The DafeSPALib (Shadow Portfolio Adaptation Library) was created to solve this fundamental problem. It is built on a powerful principle from modern quantitative finance: instead of searching for one perfect strategy, a truly robust system should intelligently allocate to a portfolio of different strategies, dynamically favoring the one that is currently most effective. This is not just a concept; it is a complete, production-grade engine built in Pine Script. It allows a developer to run multiple "shadow portfolios"โhypothetical trading accounts for each of your strategiesโin parallel, in real time. The library tracks the actual equity curve, win rate, Sharpe ratio, and drawdown of each strategy. It then uses a sophisticated selection algorithm to determine which strategy is the "alpha" in the current market regime and tells you which one to follow. It is an AI portfolio manager that lives on your chart. โ CHAPTER 2: THE CORE INNOVATIONS - WHAT MAKES THIS A REVOLUTIONARY ENGINE? This library is not a simple strategy switcher. It is a suite of genuine, academically recognized machine learning and statistical concepts, adapted for the Pine Script environment. Shadow Portfolio Tracking: This is the heart of the system. For each of your strategy "arms," the library maintains a complete, independent set of performance analytics. It doesn't just keep a simple "score." It tracks every hypothetical trade, calculates real P&L;, and updates a full suite of institutional metrics, including the Sharpe Ratio (risk-adjusted return), Sortino Ratio (downside-risk-adjusted return), Profit Factor , and Maximum Drawdown . This provides a rich, data-driven foundation for all decision-making. Advanced Selection Algorithms: The library doesn't just pick the strategy with the highest recent win rate. It uses sophisticated, battle-tested algorithms from the "multi-armed bandit" problem in machine learning to solve the critical "explore vs. exploit" dilemma: Thompson Sampling: The default and most powerful. Instead of just picking the "best" arm, it samples from each arm's learned probability distribution of success (its Beta distribution). This naturally balances "exploitation" (using the strategy that works) with "exploration" (giving less-proven strategies a chance to shine), making it incredibly robust against changing conditions. Upper Confidence Bound (UCB): A deterministic algorithm that is "optimistic in the face of uncertainty." It favors strategies that have both a high win rate and a high degree of uncertainty (fewer trades), encouraging intelligent exploration. Epsilon-Greedy: A classic RL algorithm that mostly exploits the best-known strategy but, with a small probability (epsilon), explores a random one to prevent getting stuck on a sub-optimal choice. Trauma-Based Memory Compression: This is a groundbreaking, proprietary concept. When the market experiences a "regime shock" (a sudden explosion in volatility, a violent trend reversal), a simple learning system can be paralyzed or make catastrophic errors. The SPA engine's "trauma" cycle is an intelligent response. It does not erase all learned knowledge. Instead, it compresses the memory : it preserves the direction of what it has learned (e.g., "Strategy A is generally better than B") but it destroys the confidence. The AI "remembers" its experiences but becomes highly uncertain, forcing it to re-learn and adapt to the new market personality with incredible speed. Think of it like PTSD for an AI: the memory of the event remains, but the trust is shattered. Multi-Layer Concept Drift Detection: This is the system's "earthquake detector." It is constantly scanning for signs that the market's fundamental character is changing ("concept drift"). It uses three layers of detectionโ Structural (trend slope changes), Volatility (ATR explosions), and Participation (volume anomalies)โto identify a regime shock and trigger the trauma compression cycle. โ CHAPTER 3: A DUAL-PURPOSE FRAMEWORK - MODES OF OPERATION This library, along with its companion DAFE libraries, is designed for ultimate flexibility. As a developer, you have complete freedom to use these tools independently or as a fully integrated system. MODE 1: STANDALONE ENGINE OPERATION (Independent Power) The DafeSPALib can be used entirely on its own to build a powerful portfolio-of-strategies indicator without any external ML. This approach is perfect for comparing, validating, and dynamically selecting from your own existing, rule-based trading ideas. The Workflow: Your indicator initializes the SPA engine with a set number of "arms" (e.g., 4). On each bar, you calculate the signals for each of your independent strategies (e.g., an EMA Crossover, an RSI Mean Reversion, a Bollinger Breakout). You feed this array of signals ( ) into the SPA's feed_signals() function. The SPA engine updates the shadow portfolio for each of the four strategies based on these signals. You then call the select() function, and the SPA's chosen algorithm (e.g., Thompson Sampling) will return the index of the single strategy arm that it trusts the most right now. Your indicator's final output signal is the signal from that selected arm. The Result: A complete, self-contained meta-strategy. Your indicator is no longer just one strategy; it is an intelligent manager that dynamically switches between multiple strategies, adapting to the market by selecting the one with the best real-time, risk-adjusted performance. MODE 2: BRIDGED SUPER-SYSTEM OPERATION (The Ultimate AI) This is the pinnacle of the DAFE ecosystem. In this advanced mode, the DafeSPALib acts as the "strategic brain" or "portfolio manager" that is fused with a tactical machine learning engine (like the DafeRLMLLib) via a master communication protocol (the DafeMLSPABridge). The Workflow: The ML engine generates proposals. The Bridge Library translates these proposals into a portfolio of micro-strategies. The SPA engine (this library) receives this portfolio of signals, tracks their shadow performance, and uses its advanced selection algorithms to choose the single best micro-strategy to follow. This becomes the final trade decision. The final P&L; from the SPA's selection is then routed back through the Bridge to the ML engine as a highly qualified reward signal for learning. The Result: A hybrid intelligence that is more robust and adaptive than either system alone. The ML provides tactical creativity, while the SPA provides ruthless, performance-based strategic oversight. โ CHAPTER 4: THE DEVELOPER'S MASTERCLASS - IMPLEMENTATION GUIDE This library is a professional framework. This guide provides the complete, unabridged instructions and templates required to integrate the DAFE SPA engine into your own custom Pine Script indicators. PART I: THE INPUTS TEMPLATE (THE CONTROL PANEL) To give your users full control over the AI, copy this entire block of inputs into your indicator script. It is professionally organized with groups and detailed tooltips. // โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ // โ INPUTS TEMPLATE (COPY INTO YOUR SCRIPT) โ // โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ // INPUT GROUPS string G_SPA_ENGINE = "โโโโโโโโโโโโ ๐ง SPA ENGINE โโโโโโโโโโโโ" string G_SPA_DRIFT = "โโโโโโโโโโโโ ๐ CONCEPT DRIFT โโโโโโโโโโ" string G_SPA_DASH = "โโโโโโโโโโโโ ๐ DIAGNOSTICS โโโโโโโโโโโ" // SPA ENGINE int i_spa_num_arms = input.int(4, "Number of Strategy Arms", minval=2, maxval=10, group=G_SPA_ENGINE, tooltip="The number of parallel strategies the SPA will track.") string i_spa_selection = input.string("Thompson Sampling", "๐ค Selection Algorithm", options= , group=G_SPA_ENGINE, tooltip="The machine learning algorithm used to select the best arm. " + "โข Thompson Sampling: Bayesian approach, samples from each arm's success probability. Balances explore/exploit perfectly (Recommended). " + "โข UCB: Optimistic approach that favors arms with high uncertainty. Excellent for exploration. " + "โข Epsilon-Greedy: Mostly exploits the best arm, but explores randomly with a small probability (epsilon). " + "โข Softmax: Selects arms based on a probability distribution weighted by their performance.") float i_spa_epsilon = input.float(0.15, "๐งญ Epsilon (for Epsilon-Greedy)", minval=0.01, maxval=0.5, step=0.01, group=G_SPA_ENGINE, tooltip="The probability of taking a random action to explore. This value automatically decays over time.") float i_spa_decay = input.float(0.995, "๐ง Memory Decay Rate", minval=0.98, maxval=0.9999, step=0.0005, group=G_SPA_ENGINE, tooltip="Controls recency bias. A value of 0.995 means the AI gives slightly more weight to recent performance. Lower values create a very short-term memory.") // CONCEPT DRIFT & TRAUMA bool i_spa_use_drift = input.bool(true, "๐ Enable Concept Drift & Trauma", group=G_SPA_DRIFT, tooltip="Allows the engine to detect market regime shocks and trigger a 'Trauma Compression' cycle to accelerate re-learning.") float i_spa_trauma_sens = input.float(2.0, "Trauma Sensitivity", minval=1.2, maxval=4.0, step=0.1, group=G_SPA_DRIFT, tooltip="How sensitive the shock detector is. A lower value will trigger trauma cycles more frequently on smaller volatility/volume spikes.") // DIAGNOSTICS bool i_spa_show_dash = input.bool(true, "๐ Show Diagnostics Dashboard", group=G_SPA_DASH) PART II: THE IMPLEMENTATION LOGIC (THE HEART OF YOUR SCRIPT) This is the boilerplate code you will adapt to your indicator. It shows the complete loop of feeding signals, detecting drift, and selecting the best strategy. // โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ // โ USAGE EXAMPLE (ADAPT TO YOUR SCRIPT) โ // โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ // 1. INITIALIZE THE ENGINE (happens only on the first bar) int sel_method_id = i_spa_selection == "Thompson Sampling" ? 0 : i_spa_selection == "Upper Confidence Bound (UCB)" ? 1 : i_spa_selection == "Epsilon-Greedy" ? 2 : 3 var spa.SPAEngine engine = spa.init( num_arms = i_spa_num_arms, arm_names = array.from("TrendArm", "ReversionArm", "BreakoutArm", "MomentumArm"), // Give your arms names! selection_method = sel_method_id, decay_rate = i_spa_decay, trauma_sensitivity = i_spa_trauma_sens, epsilon = i_spa_epsilon ) // 2. DEFINE YOUR STRATEGY SIGNALS (runs on every bar) // These are your own custom, rule-based strategies. The signal should be +1 for Buy, -1 for Sell, 0 for Neutral. int trend_signal = close > ta.ema(close, 200) and ta.crossover(ta.ema(close, 20), ta.ema(close, 50)) ? 1 : close < ta.ema(close, 200) and ta.crossunder(ta.ema(close, 20), ta.ema(close, 50)) ? -1 : 0 int reversion_signal = ta.crossunder(ta.rsi(close, 14), 30) ? 1 : ta.crossover(ta.rsi(close, 14), 70) ? -1 : 0 int breakout_signal = ta.crossover(close, ta.highest(high, 20) ) ? 1 : ta.crossunder(close, ta.lowest(low, 20) ) ? -1 : 0 int momentum_signal = ta.crossover(ta.mom(close, 10), 0) ? 1 : ta.crossunder(ta.mom(close, 10), 0) ? -1 : 0 // Create an array of your signals. The order MUST be consistent. array all_signals = array.from(trend_signal, reversion_signal, breakout_signal, momentum_signal) // 3. THE MAIN LOOP (Feed -> Detect -> Select) - runs on every bar // --- FEED: Update the shadow portfolios with the latest signals and price --- engine := spa.feed_signals(engine, all_signals, close) // --- DETECT: Run the concept drift engine --- if i_spa_use_drift float trend_slope = ta.linreg(close, 20, 0) - ta.linreg(close, 20, 1) engine := spa.detect_drift(engine, close, volume, ta.atr(14), trend_slope) engine := spa.apply_trauma_cycle(engine) // This will compress memory if a shock was detected // --- SELECT: Ask the engine for its best choice --- = spa.select(engine) engine := updated_engine // CRITICAL: Always update the engine state // --- ACT: Use the final, selected signal for your indicator's logic --- int final_signal = array.get(all_signals, selected_arm) string selected_name = spa.get_name(engine, selected_arm) // Example: Color bars based on the final, SPA-vetted signal barcolor(final_signal == 1 ? color.new(color.green, 70) : final_signal == -1 ? color.new(color.red, 70) : na) // 4. DISPLAY DIAGNOSTICS if i_spa_show_dash and barstate.islast string diag_text = spa.diagnostics(engine) label.new(bar_index, high, diag_text, style=label.style_label_down, color=color.new(#0A0A14, 10), textcolor=#00E5FF, size=size.small, textalign=text.align_left) โ DEVELOPMENT PHILOSOPHY The DafeSPALib was born from the realization that market adaptation is the true holy grail of trading. While any single strategy is brittle, a portfolio of strategies, managed by an intelligent selection algorithm, is antifragileโit can learn, adapt, and potentially thrive in the face of chaos. This library is an open-source tool for the systems thinker, the quantitative analyst, and the professional developer. It is designed to provide the foundational architecture for building the most robust, adaptive, and intelligent trading systems on the TradingView platform. This library is a tool for that wisdom. It is not about having the single smartest algorithm, but about having a disciplined, data-driven process for selecting the one that is working right now. โ DISCLAIMER & IMPORTANT NOTES THIS IS A LIBRARY FOR ADVANCED DEVELOPERS: This script does nothing on its own. It is a powerful engine that must be integrated into other indicators and fed with valid strategy signals. PERFORMANCE IS HYPOTHETICAL: The shadow portfolio tracking is a simulation. It does not account for slippage, fees (unless manually added to P&L;), or the psychological pressure of live trading. LEARNING REQUIRES DATA: The selection algorithms require a sufficient number of trades (at least 20-30 per arm) to make statistically meaningful decisions. The engine will be less reliable during the initial "warm-up" period. "You don't need to be a rocket scientist. Investing is not a game where the guy with the 160 IQ beats the guy with the 130 IQ." โ Warren Buffett Taking you to school. - Dskyz, Create with RL. Perpustakaan Pine Scriptยฎoleh DskyzInvestments7
Market Structure Context Engine (SCE)Market Structure Context Engine (SCE) is a price-geometry based contextual analysis tool designed to help traders understand where price is operating within the broader market structure. Unlike traditional indicators that focus on entries or direction, SCE provides a structural map of the market, highlighting balance, expansion, and key reaction zones that influence how price is likely to behave. ๐น What This Indicator Shows SCE organizes market structure into three clear dimensions: Structure (Market Frame) Identifies whether the market is operating in a balanced (rotational) environment or a directional (accepting) environment. This helps traders understand whether continuation or mean-reversion behavior is more likely. Regime (Internal Behavior) Distinguishes between rotational and expanding price behavior using swing geometry, offering insight into how price is progressing within the current structure. Location (Context Zones) Highlights structural extreme zones using envelope bands near the upper and lower boundaries of the active range. These zones represent areas of higher sensitivity where reactions, pauses, or failures are more likely. ๐ฏ How to Use SCE Use SCE as a context overlay, not a signal generator Combine it with momentum, volume, or volatility tools to improve decision quality Expect different behavior near: Structural extremes Balanced vs directional environments Use it to filter trades, manage expectations, and understand risk SCE does not provide buy or sell signals and does not imply bullish or bearish direction. โ Key Characteristics Pure market structure and geometry logic Non-directional, context-only design Clean and minimal chart visuals Stable across timeframes Designed to reduce false expectations and improve trade context โ ๏ธ Disclaimer This indicator is provided for educational and analytical purposes only. It does not constitute financial advice. Trading involves risk, and users are responsible for their own trading decisions.Indikator Pine Scriptยฎoleh Market_Logic_India12