iFVG Ultimate+ | DodgysDDOVERVIEW
iFVG Ultimate+ | DodgysDD is a professional-grade visualization framework that automates the identification and management of Inversion Fair Value Gaps (IFVGs)
It is designed for analysts and educators studying institutional price behavior, liquidity dynamics, and displacement-based imbalances.
This indicator does not provide trading signals or forecasts.
All logic serves educational and analytical purposes only.
A Fair Value Gap (FVG) appears when strong directional displacement prevents candle bodies from overlapping.When a liquidity sweep occurs and price later closes through that gap, the imbalance is considered inverted. This often marks a shift in order-flow.
iFVG Ultimate+ tracks these transitions using a rule-based sequence:
Liquidity Sweep – Price sweeps a previous swing high or low.
Displacement – Body-to-body gap forms as price accelerates away.
Inversion – Full candle body closes through the gap after raid.
Validation and Tracking – Confirmed inversions are stored and managed until completion or invalidation.
-----------------------------------------------------------------------------------------------
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
The framework serves as a research tool to document and analyze IFVG behavior within liquidity and session contexts.
It is commonly used to:
-Record and journal IFVG formations for back-testing and model study.
-Assess how often gaps complete or invalidate after sweeps.
-Evaluate session-based patterns (London, Asia, New York).
-Overlay HTF PD Arrays to observe inter-timeframe delivery.
-Receive custom alerts to your phone
-----------------------------------------------------------------------------------------------
LOGIC STRUCTURE
-----------------------------------------------------------------------------------------------
iFVG Ultimate+ runs a five-stage validation process to ensure sequential, non-repainting behavior.
Liquidity Framework:
• Detects swing highs and lows on aligned timeframes (automatic or manual selection).
• Logs session highs/lows for Asia (20:00–00:00 NY) and London (02:00–05:00 NY).
• Includes data wicks around 08:30 NY for event reference.
FVG Detection and Displacement Filter:
• Identifies body-based imbalances using ATR-scaled sensitivity modes (Sensitive / Normal / Strict).
• Supports “Single” or “Series” modes to merge adjacent gaps.
• Excludes weak displacements using minimum ATR thresholds.
Inversion Validation:
• Confirms only when a complete candle body closes through a qualifying FVG within a user-defined window (6 or 15 bars).
• Duplicate detections are ignored; mitigation states are recorded.
HTF Context Integration:
• Maps higher-time-frame PD Arrays and tracks their delivery status.
• Labels active zones (e.g. “H4 PDA”) and updates on HTF close.
Model Lifecycle and Limits:
• Plots the inversion line and derives educational limit levels: Break-Even and Stop-Loss.
• Tracks until opposing liquidity is swept (model complete) or an invalidation event occurs.
-----------------------------------------------------------------------------------------------
COMPONENTS AND VISUALS
-----------------------------------------------------------------------------------------------
-IFVG Line — Marks confirmed inversion at close.
-Break-Even / Stop-Loss Lines — Calculated retrospectively for journal grading.
-Session High/Low Markers — London and Asia reference levels.
-Data Wicks — 8:30 NY “DATA.H/L” labels for event volatility.
-SMTs — Compares current symbol to correlated instrument for divergence confirmation.
-Checklist Panel — Tracks liquidity, momentum, HTF delivery, and SMT conditions.
-Setup Grade Display — Computes qualitative score (A+ to C) based on met conditions.
-----------------------------------------------------------------------------------------------
INPUT CATEGORIES
-----------------------------------------------------------------------------------------------
General — Detection mode, ATR strictness, bias filter, long/short window.
Liquidity — Automatic or manual timeframe alignment, session visuals.
FVG — Color themes, label sizes, inversion color change, HTF inclusion.
Entry / Limits — Enable or hide Entry, Break-Even, and Stop-Loss levels.
Alerts — Individual toggles for IFVG formation, session sweeps, multi-TF inversions, and invalidations.
Display — Info Box, relationship table, and grade styling.
All alerts output plain text messages only and do not execute orders.
-----------------------------------------------------------------------------------------------
ALERT FRAMEWORK
-----------------------------------------------------------------------------------------------
When enabled, alerts may notify for:
-Potential inversion detected.
-Confirmed IFVG formation.
-Liquidity sweeps (high/low or session).
-Multi-time-frame inversion.
-Invalidation or close warning.
-Alerts serve as educational markers only, not trade triggers.
The user will have the ability to create custom messages for each of these alert events.
-----------------------------------------------------------------------------------------------
USAGE GUIDELINES
-----------------------------------------------------------------------------------------------
iFVG Ultimate+ is suited for review and documentation of displacement-based price behavior.
Recommended educational workflows:
-Annotate IFVG events and review delivery into PD Arrays.
-Analyze frequency by session or timeframe.
-Assess how often IFVGs complete versus invalidate.
-Teach ICT-style liquidity mechanics in mentorship or training contexts.
-The indicator works across forex, futures, and crypto markets.
-----------------------------------------------------------------------------------------------
OPERATIONAL NOTES AND LIMITATIONS
-----------------------------------------------------------------------------------------------
-HTF calculations finalize on bar close (no look-ahead).
-ATR filter strength affects small-gap visibility.
-Session windows use New York time.
-Break-Even and Stop-Loss lines are visual aids only.
-Performance depends on chart density and bar count.
-No strategy module or backtest engine is included.
-----------------------------------------------------------------------------------------------
ORIGINALITY AND PROTECTION
-----------------------------------------------------------------------------------------------
iFVG Ultimate+ | DodgysDD integrates multiple independent systems into a single engine:
-PD Array context alignment with liquidity tracking.
-Dynamic session detection and macro data integration.
-Sequential IFVG validation pipeline with grade assignment.
-Multi-time-frame SMT confirmation module.
-Structured alerts and mitigation tracking.
The logic is entirely original, written in Pine v6, and protected as invite-only to preserve methodology integrity.
-----------------------------------------------------------------------------------------------
ATTRIBUTION
-----------------------------------------------------------------------------------------------
Core concepts such as Fair Value Gaps, Liquidity Sweeps, PD Arrays, and SMT Divergence are publicly taught within ICT-style market education. This implementation was designed and engineered by TakingProphets as iFVG Ultimate+ | DodgysDD, authored for TradingView publication by TakingProphets.
-----------------------------------------------------------------------------------------------
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is for educational and informational use only. It does not provide financial advice or predictive output. Historical patterns do not guarantee future results. All users remain responsible for their own decisions.Use of this script implies agreement with TradingView’s Vendor Requirements and Terms of Use.
-----------------------------------------------------------------------------------------------
ACCESS INSTRUCTIONS
-----------------------------------------------------------------------------------------------
Access is managed through TradingView’s invite-only framework. Users request access via private message to TakingProphets or access link
Indikatoren und Strategien
Custom Stock Indicator with Bollinger Bands9, 20, 50, 200 sma, Bollinger bands, MACD bullish crossover signal (blue dot) and candle counting
This TradingView indicator overlays on the price chart to provide trend analysis, volatility bands, momentum signals, and a consecutive candle counter for bullish sequences above the 9-period SMA. Key features include:
Moving Averages:
9-period SMA (green line).
50-period SMA (orange line).
200-period SMA (red line).
20-period SMA (yellow line, used as Bollinger Bands basis).
Bollinger Bands:
Standard 20-period SMA basis with 2 standard deviations.
Gray upper and lower bands with a semi-transparent gray fill (90% transparency) for volatility visualization.
MACD Bullish Crossover Signal:
Uses default MACD (12, 26, 9).
Tiny electric blue circles plotted below the bar (shifted down by 2 bars) when the MACD line crosses above the signal line, indicating potential bullish momentum.
Candle Counter for Bullish Sequence:
Activates only when SMA9 > SMA200 (alignment condition).
Starts/Increments: When the entire candle (including wicks: low > SMA9) fully closes above the SMA9.
Stops/Resets: When the entire candle (high < SMA9) fully closes below SMA9.
Straddling Candles (overlapping SMA9): Continues incrementing the count if the sequence has already started; otherwise, stays at 0.
Displays small white number labels (e.g., "1", "2") above the high of the current bar if count > 0, ensuring immediate visual feedback on historical and real-time bars.
The script is lightweight, focuses on bullish confirmation (e.g., for stocks like AMD), and avoids clutter by using tiny shapes and transparent fills. It evaluates conditions on the current bar for accurate historical counting without delays. No RSI signals are included, as per the latest updates. To use, paste into TradingView's Pine Editor and apply to a chart.
Candlestick Body Ratio with MAHow It Works (Brief Overview):
It computes the ratio of the candle’s body size to its total range (high–low).
• A ratio close to 1 means a strong, decisive candle.
• A ratio near 0 means a weak or indecisive candle (like a doji).
• Visual Output:
• Plots the body ratio as an orange line. (Black Histogram)
• Optionally marks strong-bodied candles with a green triangle above the bar. (Orange Diamond)
Why It’s Useful:
Helps identify momentum candles with conviction. Filters out weak signals in breakout or reversal strategies. Can be combined with divergence or volume tools for confluence.
Think Like A Market Maker: ThePipAssassin
Order Imbalance Radar
🧭 Overview
Order Imbalance Radar is a sophisticated volume–flow and imbalance detection system designed to visualize real-time shifts in buyer–seller dominance, absorption events, and market equilibrium. It combines delta-volume analysis, volatility filtering, and orderflow-style signals to help identify high-probability zones of reversal, continuation, or liquidity imbalance.
The indicator includes a top-right analytical dashboard, visual imbalance bubbles, and multiple overlays (absorption, overbought/oversold hotspots, equilibrium ribbon, liquidity sweeps, and session delta tracking).
⚙️ Core Logic & Signal Framework
1. Delta Volume Z-Score Model
Calculates delta (buy vs. sell volume) per bar based on directional close changes.
Uses a z-score normalization of delta over a user-defined lookback (zLookback) to detect statistically significant imbalances.
Highlights two tiers of imbalance:
Normal Imbalance (|z| ≥ zThresh1)
Big Imbalance (|z| ≥ zThresh2)
Filters results by requiring volume ≥ moving average × minVolMul.
Optionally limits signals to volatility squeeze conditions (via Bollinger Band width).
Visual Output:
✅ Green/red bar tints show intensity of buyer/seller imbalance.
🟢/🔴 Circle bubbles with Δ and Z-score values mark detected imbalances.
2. Absorption Detection
Detects bars where price rejects continuation despite high delta extremes, suggesting absorption of aggressive orders by passive liquidity.
Conditions:
|zΔ| exceeds absorbZ threshold
Candle body ≤ % of total range
Opposite wick ≥ % of range
Markers:
🟢 “ABSORB↑” below bars = buyer absorption (sellers absorbed)
🔴 “ABSORB↓” above bars = seller absorption (buyers absorbed)
3. OB/OS Hotspots
Integrates RSI and Bollinger Band positioning to identify volume-confirmed overbought/oversold zones.
Overbought → RSI ≥ rsiOB and price above upper band or high volume.
Oversold → RSI ≤ rsiOS and price below lower band or high volume.
Markers:
🔶 “OB” for overbought zones
🟩 “OS” for oversold zones
These can indicate short-term exhaustion points, particularly when confluenced with imbalance or absorption.
4. Liquidity Sweeps
Identifies stop-hunts / failed breakouts within recent swing lookback:
Sweep Up: Price makes a higher high but closes below previous swing → likely liquidity grab above highs.
Sweep Down: Price makes a lower low but closes above previous swing → liquidity grab below lows.
Markers:
“SW↑” (yellow) = bullish sweep
“SW↓” (yellow) = bearish sweep
5. Equilibrium Map & Ribbon
Analyzes rolling imbalance ratio (Δ / total volume) over a sliding window to gauge market equilibrium vs. imbalance bias.
Plots a dynamic ribbon above price scaled by ATR.
Ribbon color:
🟢 = buyer-dominant imbalance
🔴 = seller-dominant imbalance
Gray band marks the equilibrium zone (|imbalance| ≤ eqBand).
Fuchsia “FLIP” marker signals a change in imbalance polarity.
This provides a macro order-flow bias visualization.
6. Session Dashboard (Top-Right)
Compact dashboard showing real-time flow metrics within a defined trading session (e.g., 09:30–16:00):
Metric Description
Session Δ Total cumulative delta since session start
Bar Δ Current bar delta (buy vs. sell flow)
Bar Vol Bar volume relative to average
Absorb “BUY” / “SELL” / “—”
Hotspot “OB” / “OS” / “—”
Sweep “UP” / “DN” / “—”
Imb % / Eq Imbalance ratio & equilibrium state
Colors dynamically adapt to flow direction (green/red/fuchsia/gray).
7. CumDelta Line
Optional cumulative delta plot for continuous volume-flow tracking.
Helps confirm bias shifts and divergence vs. price.
🧩 Alerts
Pre-built alert conditions for all key events:
Buyer/Seller Imbalances
BIG Buyer/Seller Imbalances
Absorption (Buy/Sell)
Hotspot Overbought/Oversold
Liquidity Sweeps (Up/Down)
Equilibrium Flips
These allow automated alerts for advanced orderflow setups or backtesting triggers.
For More Premium Indicators please visit whop.com
NSR FVG High Time FramesIndicator Name : NSR FVG High Time Frames
Short Title : NSR FVGHTF
Description :The NSR FVG High Time Frames indicator identifies and visualizes Fair Value Gaps (FVGs) on higher timeframes (4-hour, Daily, and Weekly) directly on your chart. FVGs are price gaps formed between the high and low of non-consecutive candles, often indicating areas of market inefficiency that price may revisit. This indicator is designed for traders who incorporate multi-timeframe analysis into their strategies, providing a clear visual representation of bullish and bearish FVGs with customizable settings.
Unique Feature :Unlike traditional FVG indicators that mark a gap as closed when the current candle’s close crosses the gap’s boundaries, NSR FVG High Time Frames employs a distinctive closure logic. It allows an additional candle to determine whether the price re-enters the gap or continues beyond it. This approach provides a more nuanced assessment of gap closure, potentially reducing false signals by giving the market an extra candle to confirm its direction. This feature makes the indicator particularly suitable for traders seeking to validate FVG interactions with greater precision.
Key Features :
Multi-Timeframe Support : Detects FVGs on 4-hour, Daily, and Weekly timeframes, with options to enable or disable each timeframe.
Customizable Appearance : Users can adjust the visual style (Line, Dotted, Dashed) and colors for bullish and bearish FVGs, as well as enable/disable extension of FVG boxes to the right.
Flexible Lookback : Configurable lookback periods for entry (up to 10,000 candles) and FVG detection (up to 70 FVGs), allowing users to tailor the indicator to their trading style.
Minimum FVG Size : Set a minimum gap size (in ticks) to filter out insignificant FVGs, ensuring only meaningful gaps are displayed.
Closed FVG Removal : Option to automatically remove closed FVGs from the chart for a cleaner view.
Alert Integration : Generates alerts for new FVGs and changes in their status (e.g., verified, partial, closed), enabling traders to set up custom notifications.
How to Use :
Add to Chart : Apply the indicator to any chart. It works best on lower timeframes (e.g., 1H, 4H) to visualize higher-timeframe FVGs.
Configure Settings : Adjust the inputs in the settings panel:
Enable/disable 4-hour, Daily, or Weekly FVGs based on your analysis needs.
Set the lookback periods and minimum FVG size to match your trading strategy.
Customize colors and line styles for better chart readability.
Interpret FVGs :
Bullish FVGs (green boxes): Represent gaps where price may act as support, potentially attracting price back to the gap.
Bearish FVGs (red boxes): Represent gaps where price may act as resistance.
Boxes are drawn between the relevant high and low of the candles forming the FVG, with text labels indicating the timeframe (e.g., "4H", "D", "Weekly").
Monitor Closure : Watch for price interaction with FVGs. The indicator considers an FVG closed only after an additional candle confirms the price has moved beyond the gap or failed to re-enter it, unlike standard FVG indicators.
Set Alerts : Use the alert feature to receive notifications when new FVGs form or their status changes (e.g., "partial" or "closed").
Settings :
Entry Lookback (candles) : Number of candles to look back for FVG detection (default: 10,000).
Number of FVG to Lookback : Maximum number of FVGs to display (default: 70).
Minimum FVG Size : Minimum gap size in ticks (default: 5).
Remove Closed : Toggle to remove closed FVGs from the chart (default: true).
Show/Extend 4Hour/Daily/Weekly : Enable/disable FVGs for each timeframe and choose whether to extend boxes to the right.
Color and Style Options : Customize fill and border colors, and select line styles (Line, Dotted, Dashed) for each timeframe.
Use Cases :
Swing Trading : Identify potential support/resistance zones on higher timeframes for entry or exit points.
Price Action Analysis : Use FVGs to confirm market inefficiencies or reversal zones.
Multi-Timeframe Strategies : Combine with lower-timeframe indicators to align entries with higher-timeframe FVGs.
Notes :
The indicator is optimized for lower timeframes to display higher-timeframe FVGs. Avoid using it on Weekly or Monthly charts for Daily/Weekly FVGs to prevent overlap issues.
The unique closure logic may delay FVG closure signals compared to other indicators, which can help filter out premature closures but requires patience for confirmation.
Performance may vary on very low timeframes with large lookback periods due to the number of FVGs processed.
Disclaimer :This indicator is for informational purposes only and does not constitute financial advice. Always conduct your own analysis and test the indicator thoroughly before using it in live trading.
Arcane Market Structure + Key LevelsThe Arcane Market Structure + Key Levels script is built to help traders decode real-time structure shifts, key support/resistance levels, and market intent. This tool draws from the Arcane Model’s proprietary trading framework—refined over 7+ years of backtesting and live execution.
It detects:
• Highs/lows that define expansion, manipulation, and distribution cycles
• Dynamic support/resistance zones based on 15m fair value gaps
• Session-based levels and structure breaks for intraday context
Whether you’re trading Prop Firm or Live accounts, this script helps simplify decision-making by visualizing the cleanest levels and directional flows on your chart.
Use it to:
✅ Confirm entries near liquidity levels
✅ Spot structural breaks aligned with volume and price action
✅ Build confluence with ICT, FVG, or manipulation-based setups
For traders mastering the Arcane Model or building systematic edge, this is a must-have chart companion.
NFTs vs SOL - Momentum Divergence RadarSee when NFT activity (proxy volumes) leads or lags SOL momentum
About:
A TradingView indicator that normalizes SOL momentum and a composite NFT proxy volume into comparable z-scores, then plots their difference (divergence). You get zero-line cross signals (“lead/lag”) and a rolling correlation table to judge regime quality.
What it does (concept):
SOL side: Rate of Change of SOL (ROC(len_mom)) → standardized over len_z → smoothed (smooth) → sol_z.
NFT side: Weighted sum of proxy volumes (BLUR, LOOKS, TNSR, MAGIC, APE, optional ME & PENGU) → log() to tame skew → standardized over len_z → smoothed → v_z.
Divergence: div = v_z - sol_z.
div > 0 → NFT activity is stronger than SOL momentum (possible lead).
div < 0 → NFT activity weaker than SOL momentum (possible lag).
On-chart elements
Orange histogram: div (NFT volume Z − SOL momentum Z).
Purple line: v_z (NFT composite activity).
Blue line: sol_z (SOL momentum).
Green/Red triangles: Zero-line crosses of div → lead (up) / lag (down).
Top-right table: Rolling Pearson correlation (len_z) + list of active proxies (non-blank & weight ≠ 0).
How to use (quick start):
Add to chart on your timeframe (30m–1D are common).
Fill proxy symbols with exchange prefixes (e.g., KUCOIN:BLURUSDT, GATEIO:LOOKS_USDT, MEXC:TNSR_USDT, OKX:MAGIC-USDT). Leave ME/PENGU blank until you have the exact tickers.
Set weights to reflect relevance/liquidity (start at 1; set 0 to exclude).
Trade the crosses with context:
Lead (↑0): NFTs heating up vs SOL → look for long setups if price structure agrees.
Lag (↓0): NFTs cooling vs SOL → reduce risk/hedge or look for shorts in downtrends.
Consult correlation:
High (+0.5~1): Both move together; rely more on cross timing than magnitude.
Low/negative: Decoupling regime; divergence magnitude gains importance.
Settings (what they mean):
SOL Symbol (sol_tkr) – Default BINANCE:SOLUSDT.
Proxy symbols (*_sym) – Enter exchange:pair strings; blank = ignored.
Weights (w_*) – Linear weights before log; emphasize reliable/liquid proxies.
Momentum Length (len_mom, 14) – ROC lookback for SOL. Bigger = smoother/slower.
Z-Score Length (len_z, 50) – Window for mean/stdev and correlation. Bigger = more stable normalization.
Smoothing (smooth, 5) – SMA applied to both z-scores to cut noise.
Preset ideas:
Swing (1D/4H): len_mom=14, len_z=100, smooth=7; BLUR=1, LOOKS=1, TNSR=1, MAGIC=0.5, APE=0.5.
Active (2H/1H): len_mom=10, len_z=50, smooth=5; same weights; alert on lead.
Reading the signals (playbook)
Fresh Lead (div crosses ↑0): Accumulation/participation rising; enter on pullbacks or structure breaks; confirm with volume/HTF trend.
Persistent Positive div: Momentum follow-through likely; trail stops below swing structure.
Fresh Lag (div crosses ↓0): Early cooling; take profits, tighten stops, or rotate.
Extreme bars (|div| > ~2): Outlier conditions; expect mean-reversion or breakout continuation—use price action to decide.
Re-cross whipsaws: Filter with higher smooth or require bar close confirmation.
Practical notes & tips:
Symbol validity: Always use exchange prefixes. If a token is unavailable on your TV plan/exchange, leave it blank (script treats it as zero volume).
Liquidity bias: Thin alts can distort the composite; set their weights low or 0.
Timeframe consistency: All request.security() calls run at the chart TF—no lower-TF aggregation.
Risk management: Treat crosses as context, not standalone buy/sell. Combine with S/R, trend filters, ATR stops, and volume profile.
Alerts (recommended):
Lead Cross Up: div crosses above 0.
Lag Cross Down: div crosses below 0.
Extreme Divergence: div > +2 or div < −2 (user threshold).
(Add alertcondition() lines if you want hard alerts.)
Troubleshooting
“Invalid symbol” popup: The input contains an unsupported/typo ticker. Use exact EXCHANGE:SYMBOL (e.g., OKX:MAGIC-USDT, not MAGICUSDT). Leave fields blank if unsure.
Flat/NaN early bars: Not enough history for len_z—normal; resolves as data accumulates.
No proxies listed in table: Ensure at least one proxy is non-blank and weight ≠ 0.
Limitations:
Proxy selection matters; if the set doesn’t reflect current NFT flow, signals degrade.
Z-scoring assumes local stationarity; regime shifts compress/expand readings.
Exchange symbol formats vary (- vs _); match TradingView exactly.
Changelog:
v1.2 (2025-10-14): Stability pass, proxy inputs default to blank to avoid symbol errors; refined table; kept v5 compatibility logic.
Лунный Индикатор с RSI и Импульсными АлертамиЭтот индикатор для TradingView сочетает астрономические данные о фазах Луны с техническим анализом (RSI) для выявления потенциальных импульсных движений на рынках, таких как S&P 500 (SPY) и Bitcoin (BTCUSD). Он основан на исторических корреляциях: повышенная доходность и импульсы вверх вокруг новой Луны, а также рост волатильности и риски падений около полнолуния. Индикатор помогает трейдерам получать алерты о возможных торговых возможностях, фильтруя сигналы через RSI для большей точности.
Ключевые функции:
Расчёт фазы Луны: Использует формулу Julian Day для определения текущей фазы (0% — новая Луна, 50% — полнолуние, 100% — следующая новая). Референс: новая Луна 6 января 2000 г. (JD ≈ 2451550.2597). Длина цикла — 29.530588 дней.
Визуализация:
Линия "Фаза Луны (%)" (синяя) отображает фазу в процентах.
Метки на графике: 🌑 Новая (0-3.3% или >96.7%), 🌓 1-я четверть (21.7-28.3%), 🌕 Полная (46.7-53.3%), 🌗 Последняя четверть (71.7-78.3%).
Линия RSI (оранжевая) для мониторинга перекупленности/перепроданности (период настраивается, по умолчанию 14).
Сигналы и алерты (на основе исторических паттернов):
Новая Луна: Алерты о потенциале импульса вверх, если RSI < 50 (не перекуплено). Исторически: выше доходность для S&P 500 и BTC (bullish реверсы). Фон — зелёный.
Полнолуние: Алерты о рисках волатильности/падения, если RSI > 50 (перекуплено). Исторически: sharp moves для BTC, ниже доходность для S&P. Фон — красный.
Алерты срабатывают на переходах фаз (с помощью ta.change), чтобы избежать повторений.
Настройки:
Период RSI: Изменяйте в input для адаптации под таймфрейм (рекомендуется D1 или H4 для лунных циклов).
Как использовать:
Добавьте индикатор на график SPY или BTCUSD.
Настройте алерты в TradingView для уведомлений.
Тестируйте на исторических данных: проверьте корреляции с реальными движениями цен.
Важно: Это не финансовая рекомендация. Рынки непредсказуемы; комбинируйте с другими инструментами. Точность фазы ±1 день; для идеальной — обновите ref_jd по актуальным данным.
Источник данных: Основан на астрономических формулах и исследованиях корреляций Луны с рынками (например, из JSTOR, SSRN). Разработано для образовательных целей.
Description of the Indicator: Lunar Indicator with RSI and Impulse Alerts
Overview:
This TradingView indicator combines astronomical data on lunar phases with technical analysis (RSI) to identify potential impulse movements in markets like S&P 500 (SPY) and Bitcoin (BTCUSD). It is based on historical correlations: higher returns and upward impulses around the new moon, as well as increased volatility and downside risks near the full moon. The indicator helps traders receive alerts about possible trading opportunities, filtering signals through RSI for greater accuracy.
Key Features:
Lunar Phase Calculation: Uses the Julian Day formula to determine the current phase (0% — new moon, 50% — full moon, 100% — next new moon). Reference: new moon on January 6, 2000 (JD ≈ 2451550.2597). Cycle length — 29.530588 days.
Visualization:
"Moon Phase (%)" line (blue) displays the phase in percentages.
Chart labels: 🌑 New (0-3.3% or >96.7%), 🌓 First Quarter (21.7-28.3%), 🌕 Full (46.7-53.3%), 🌗 Last Quarter (71.7-78.3%).
RSI line (orange) for monitoring overbought/oversold conditions (period adjustable, default 14).
Signals and Alerts (Based on Historical Patterns):
New Moon: Alerts for potential upward impulse if RSI < 50 (not overbought). Historically: higher returns for S&P 500 and BTC (bullish reversals). Background — green.
Full Moon: Alerts for volatility/downside risks if RSI > 50 (overbought). Historically: sharp moves for BTC, lower returns for S&P. Background — red.
Alerts trigger on phase transitions (using ta.change) to avoid repetitions.
Settings:
RSI Period: Adjust in input to adapt to timeframe (recommended D1 or H4 for lunar cycles).
How to Use:
Add the indicator to a SPY or BTCUSD chart.
Set up alerts in TradingView for notifications.
Test on historical data: check correlations with real price movements.
Important: This is not financial advice. Markets are unpredictable; combine with other tools. Phase accuracy ±1 day; for perfection — update ref_jd based on current data.
Data Source: Based on astronomical formulas and studies on lunar correlations with markets (e.g., from JSTOR, SSRN). Developed for educational purposes.
SGM Gold Day Trading EMAsWhat it does
This tool plots four Exponential Moving Averages (EMAs) with practical default periods for gold intraday analysis: 9 (Momentum), 21 (Pullback), 50 (Trend Filter), and 200 (Macro). The goal is to provide a clear, multi-horizon structure so traders can quickly assess momentum, pullbacks, intermediate trend, and long-term bias on the same chart.
How it works (method)
Each line is a standard EMA computed on the close price.
The defaults map to common roles:
EMA 9 – Momentum: immediate changes in short-term flow.
EMA 21 – Pullback: typical retracement area within ongoing trends.
EMA 50 – Trend Filter: medium-term confirmation of direction.
EMA 200 – Macro: long-term bias and market context.
Optional dynamic color for EMA9/EMA21 highlights whether EMA9 ≥ EMA21 (green) or not (red). This is a visual aid only; it does not generate signals.
Originality & usefulness
The script focuses on clarity and control rather than automation. It combines a neutral, high-contrast palette with independent line thickness per EMA and an optional visual crossover mode. The configuration encourages disciplined analysis across time horizons without embedding opaque entry/exit logic.
Inputs & customization:
Periods: 9, 21, 50, 200 (all adjustable).
Colors: fully customizable for each EMA; optional crossover color mode for 9/21.
Line thickness: set individually per EMA to emphasize your primary reference.
How to use:
Add the script on any timeframe/asset (gold defaults are provided but not required).
Use EMA 200 for long-term bias; trade with caution against it.
Use EMA 50 to filter intermediate trend; prefer setups aligned with it.
Watch EMA 21 as a pullback reference within trends.
Use EMA 9 to gauge momentum around pullbacks/breakouts.
(Optional) Enable the crossover color to quickly see when momentum (9) is above/below pullback (21).
Notes & limitations:
This script does not produce buy/sell signals or alerts.
It is intended as a visual framework to support analysis and risk management.
Always validate with your own rules, risk controls, and market conditions.
Portfolio Command Center📊 Portfolio Command Center — Real-Time Trading Portfolio Dashboard
Overview:
The Portfolio Command Center is an advanced management and tracking system designed for discretionary traders who manually plan their trades and want to monitor performance, exposure, and risk in real time — all directly on the chart.
Core Concept:
This tool transforms your TradingView chart into a live trading dashboard, allowing you to log your active trades, monitor their progress, calculate real-time P/L, and visualize your portfolio-wide risk exposure.
Analytical Framework:
The indicator uses a dynamic calculation engine that continuously analyzes the relationship between the current market price and your predefined trade parameters (entry, stop, and targets).
It measures Active Risk Exposure for each trade based on volatility and position size.
It aggregates results across all active trades to display real-time portfolio health metrics (balance, total profit/loss, and risk utilization).
A visual alert system highlights trades exceeding risk limits or reaching targets using color-coded cells.
Practical Purpose:
To help traders make objective decisions based on structured risk metrics rather than emotions. It serves as your personal trading command center, ensuring that every trade aligns with your predefined plan.
How to Use:
In settings, define your total portfolio balance and acceptable risk per trade.
Enter your trades manually (symbol, entry price, stop-loss, take-profit).
Monitor your performance instantly as the dashboard updates in real time.
Watch for color alerts indicating risk breaches or achieved targets.
Why is it closed-source?
The script is protected because it implements a proprietary algorithm for dynamic risk distribution and real-time performance calculation.
While the source code is private to safeguard the original methodology, the description provides a clear explanation of its purpose, concept, and use, allowing traders and moderators to understand its functionality effectively.
Fmfm100 الوصف بالعربية:
هذا المؤشر متقدم ويعرض اتجاه السوق والترند بشكل واضح، ويحدد مناطق العرض والطلب (Supply & Demand) بالإضافة إلى فجوات القيمة العادلة (FVG). يوفر إشارات شراء وبيع (Call و Put) عند كسر أو اختراق المستويات الهامة. كما يحدد أهدافًا ومستويات دعم ومقاومة رئيسية. المؤشر مناسب لجميع المتداولين الراغبين في تحليل السوق بدقة واتخاذ قرارات تداول مستنيرة.
الوصف بالإنجليزية:
This is an advanced indicator that clearly displays the market direction and trend, and identifies Supply & Demand zones along with Fair Value Gaps (FVG). It provides Buy and Sell signals (Call and Put) when key levels are broken or breached. It also defines targets and major support and resistance levels. The indicator is suitable for all traders who want precise market analysis and informed trading decisions.
BSArea - Buy/Sell Pressure Area Indicator# 📊 BSArea - Buy/Sell Pressure Area Indicator
## Overview
The **BSArea (Buy/Sell Area)** indicator is an advanced swing point analysis tool that identifies and visualizes significant support and resistance zones based on pivot highs and lows. Unlike traditional pivot point indicators, BSArea measures the **actual trading activity** within these zones by tracking volume and bar count, providing traders with a quantitative measure of price rejection or acceptance at key levels.
## 🎯 Key Concept
When price approaches a previous swing high or low, one of two things typically occurs:
1. **Strong rejection** - Price bounces quickly with minimal trading activity
2. **Weak rejection/breakthrough** - Price lingers, accumulating volume before breaking through or reversing
BSArea quantifies this behavior by measuring how many bars and how much volume trades within these critical zones, giving you insight into the **strength of support and resistance levels**.
## 🔧 How It Works
### Pivot Point Detection
The indicator uses Pine Script's `ta.pivothigh()` and `ta.pivotlow()` functions to identify swing points with a customizable lookback period. Each pivot point creates a zone based on your selected area type:
**Wick Extremity**: Zone from the swing high/low to the candle body (default)
**Full Range**: Zone covering the entire candle range
### Volume and Bar Accumulation
Once a zone is established, the indicator begins tracking:
**Bar Count**: Number of candles that touch or overlap the zone
**Volume**: Cumulative volume from candles interacting with the zone
### Intrabar Precision (Optional)
Enable the "Intrabar Precision" feature to analyze lower timeframe data within each candle, providing more accurate volume measurements when price wicks into zones without closing inside them.
---
## 📈 Visual Components
### 1. **Support/Resistance Zones** (Shaded Areas)
- **Red zones**: Previous swing highs (resistance)
- **Teal zones**: Previous swing lows (support)
- Zones extend rightward as long as they remain unbroken
- Zone width represents the number of bars that have interacted with the level
### 2. **Horizontal Lines**
- Solid lines mark active zones
- Dashed lines indicate broken/crossed levels
- Lines appear only when the volume/count threshold is met
### 3. **Volume Labels**
- Display accumulated volume within each zone
- Positioned at the swing point for easy reference
- Helps identify which levels have seen the most trading activity
---
## 🎛️ Settings & Parameters
### Core Settings
**Pivot Lookback** (Default: 14)
- Controls the sensitivity of swing point detection
- Lower values = more frequent, minor swings
- Higher values = fewer, more significant swings
**Swing Area Type**
*Wick Extremity*: Measures rejection from the extreme point to the candle body
*Full Range*: Measures the complete candle range
**Intrabar Precision**
- Enable to analyze lower timeframe data within candles
- Select the lower timeframe (default: 1 minute)
- Provides more accurate volume readings for zones
### Filtering Options
**Filter Areas By**
*Count*: Filter based on number of bars touching the zone
*Volume*: Filter based on cumulative volume in the zone
**Filter Value** (Default: 0)
- Minimum threshold for displaying zones and lines
- Set higher values to show only the most tested levels
- Helps reduce chart clutter on busy timeframes
### Styling
**Color Customization**
- Adjust colors for resistance zones, support zones, lines, and labels
- Transparency is pre-set but can be modified in the code
**Label Size**
- Choose between Tiny, Small, or Normal label sizes
- Affects the volume display readability
## 💡 Trading Applications
### 1. **Strength Assessment**
Higher volume and bar counts at a level indicate:
- Strong institutional interest
- Potential for significant breakout/breakdown
- Important decision points in the market
Lower counts suggest:
- Weak levels that may not hold
- Quick rejection zones
- Less significance for future tests
### 2. **Breakout Confirmation**
When price breaks through a high-volume zone:
- Watch for the line to turn dashed (indicates crossing)
- High volume breakouts are more reliable
- Consider the volume accumulated versus typical average volume
### 3. **Support/Resistance Trading**
**Bounce trades**: Look for low bar counts (quick rejection) at key levels
**Breakdown/Breakout trades**: High bar counts with increasing volume signal potential breaks
**Multiple tests**: Zones tested multiple times with increasing volume often break eventually
### 4. **Multi-Timeframe Analysis**
- Use higher timeframes (Daily, 4H) for major levels
- Use lower timeframes (15m, 1H) for intraday zones
- Combine with Intrabar Precision for accurate lower TF volume analysis
## 🔍 Understanding the Visuals
### Active Zone Example
Price approaches a previous high (red zone)
├─ Solid red line = Level not yet broken
├─ Expanding box = More bars testing the level
└─ Volume label = Total volume accumulated
### Broken Zone Example
Price breaks above a previous high
├─ Dashed red line = Level has been crossed
├─ Box stops expanding
└─ Historical reference remains visible
## 📚 Educational Value
### Key Concepts Demonstrated
1. **Volume Profile Principles**: Understanding where volume accumulates helps predict future price behavior
2. **Auction Theory**: Markets move from areas of high volume (fair value) to areas of low volume (inefficiency)
3. **Support/Resistance Dynamics**: Not all S/R levels are equal - volume tells the story
4. **Time at Price**: The longer price consolidates at a level, the more significant the eventual move
## ⚙️ Technical Details
### Performance Optimizations
- Uses `var` declarations for persistent variables to reduce memory usage
- Efficient array handling with lower timeframe data
- Maximum limits set (500 lines, labels, boxes) to prevent overload
### Compatibility
- Pine Script v5
- Works on all timeframes
- Compatible with all asset types (stocks, forex, crypto, futures)
- Lower timeframe requests work with any available resolution
## 🎓 Best Practices
### For Day Traders
- Use 5-15 minute charts with Intrabar Precision
- Set pivot lookback to 7-10 for faster signals
- Filter by count (threshold: 2-3) to see active zones
### For Swing Traders
- Use 1H-4H charts as primary timeframe
- Set pivot lookback to 10-20 for stronger levels
- Filter by volume to identify institutional zones
### For Position Traders
- Use Daily or Weekly charts
- Set pivot lookback to 14-28 for major pivots
- Focus on zones with high volume accumulation
## 🚫 Limitations & Disclaimers
### What This Indicator Does NOT Do
- Does not predict future price movements
- Does not generate buy/sell signals
- Does not guarantee support/resistance will hold
- Does not account for fundamental factors or news events
### Important Notes
- Historical volume does not guarantee future behavior
- Always use proper risk management
- Combine with other forms of analysis
- Markets can remain irrational longer than you can remain solvent
### Educational Purpose
This indicator is designed for **educational and analytical purposes only**. It is not financial advice, and should not be the sole basis for trading decisions. Users are responsible for their own trading choices and risk management.
## 🔄 Version History
**v1.0** - Initial Release
- Pivot-based zone detection
- Volume and bar count accumulation
- Intrabar precision analysis
- Customizable filtering and styling
- Multiple area calculation methods
## 🤝 Credits & Inspiration
This indicator builds upon classical pivot point analysis while incorporating volume profile concepts to provide a more comprehensive view of support and resistance dynamics. The combination of time-at-price and volume analysis offers traders a quantitative approach to level assessment.
## 📝 Usage Notes
1. **Start with default settings** to understand how the indicator behaves on your preferred timeframe
2. **Adjust the pivot lookback** based on the timeframe and asset volatility
3. **Use filtering** to reduce noise and focus on significant zones
4. **Enable Intrabar Precision** for more accurate volume readings on lower timeframes
5. **Combine with price action** analysis for best results
## ⚡ Quick Start Guide
1. Add the indicator to your chart
2. Observe the red (resistance) and teal (support) zones forming at swing points
3. Watch the volume labels accumulate as price tests these levels
4. Note when lines turn dashed (level broken) vs solid (level holding)
5. Use higher volume zones as more significant levels for your analysis
**Remember**: No indicator is perfect. Always use multiple forms of analysis, practice proper risk management, and trade according to your own risk tolerance and strategy.
*If you find this indicator useful, please leave a rating and share your feedback. Your input helps improve future versions and assists other traders in the community.*
FVG Buy/Sell [Multi-TF] by akshaykiriti1443The FVG Buy/Sell indicator is a precision trading tool designed for traders who operate with a clear directional bias. It excels at identifying high-probability entry points by detecting when price interacts with Fair Value Gaps (FVGs).
This indicator is built on a core principle: instead of predicting the market's direction, it provides the timing for an entry after you, the trader, have established your market bias. By automatically pinpointing bullish and bearish imbalances on both the current and a higher timeframe, it allows you to wait for the market to pull back to a key level and then provides a clear signal for execution.
The Core Strategy: Bias First, Entry Second
This indicator is most powerful when used as part of a two-step trading process. It is not a standalone signal generator; it is an entry confirmation tool.
Step 1: Determine Your Directional Bias
Before looking for any signals from this indicator, you must first have an opinion on the market's most likely direction. This bias should be derived from your primary analysis method, such as:
The Golden Rule:
If your bias is BULLISH, you will ONLY look for BUY signals generated by bullish (green/blue) FVGs. You will ignore all SELL signals.
If your bias is BEARISH, you will ONLY look for SELL signals generated by bearish (pink/orange) FVGs. You will ignore all BUY signals.
Step 2: Execute with the FVG Tap-In Signal
Once your bias is set, the indicator does the rest of the work. You simply wait for the price to pull back into an FVG zone that aligns with your bias and then wait for the confirmation arrow to appear.
A green up arrow confirms that price has tapped a bullish FVG and closed above it, signaling that support has held and it's a valid moment to enter a long position.
A red down arrow confirms that price has tapped a bearish FVG and closed below it, signaling that resistance has held and it's a valid moment to enter a short position.
How to Take a Trade (Step-by-Step Examples)
Example of a Bullish (Long) Trade Setup:
Establish Bias: Your primary analysis shows the market is in a clear uptrend. Your bias is Bullish. You are now only looking for buying opportunities.
Identify Zone: The indicator draws a bullish FVG (a green or blue box) during an impulsive up-move.
Wait for Pullback: Be patient and let the price retrace down into this FVG zone. Do not chase the price.
Confirmation Signal: A green UP arrow appears below a candle. This is your signal. It confirms that buyers have stepped in at the FVG level and defended it.
Entry: Enter a long (buy) position at the open of the candle immediately following the signal candle.
Stop Loss: Place your stop loss below the low of the signal candle or, for a safer stop, below the bottom of the FVG zone itself.
Take Profit: Target a previous high, a higher-timeframe resistance level, or use a risk-to-reward ratio like 1:2 or 1:3.
Example of a Bearish (Short) Trade Setup:
Establish Bias: Your primary analysis shows the market is breaking down into a downtrend. Your bias is Bearish. You are now only looking for selling opportunities.
Identify Zone: The indicator draws a bearish FVG (a pink or orange box) during an impulsive down-move.
Wait for Pullback: Patiently wait for the price to rally back up into this FVG zone.
Confirmation Signal: A red DOWN arrow appears above a candle. This is your confirmation that sellers have rejected the price at this level.
Entry: Enter a short (sell) position at the open of the next candle.
Stop Loss: Place your stop loss above the high of the signal candle or above the top of the FVG zone.
Take Profit: Target a previous low, a key support level, or the next major FVG below.
Features Explained in Detail
Multi-Timeframe (MTF) Analysis: HTF zones (dotted lines) carry more weight. A signal from a 4-hour FVG while you are on a 15-minute chart is significantly more powerful than a signal from a 15-minute FVG alone. Use HTF zones as major points of interest.
Confirmed Tap-In Logic: The arrow only appears after price has touched the zone and then closed outside of it in the expected direction. This built-in confirmation filters out wicks that simply pass through a zone without a real market reaction.
Dual Alert System:
Entry Alert ("Price has entered..."): This is a heads-up alert. It tells you to pay attention because price is now in your pre-defined zone of interest.
Tap-In Alert ("Confirmed tap-in..."): This is the execution alert. It signals that the conditions for a trade have been met according to the indicator's logic.
Fade on Tapped: When enabled, a zone will become transparent after a confirmed signal. This visually cleans up your chart, showing you which zones have already been tested and "mitigated."
Minimum FVG Size (Ticks): In volatile or ranging markets, many tiny, insignificant FVGs can form. Use this setting to filter out the noise. Increase the value to only display larger, more significant imbalances.
Disclaimer: Trading involves substantial risk. This indicator is a tool for analysis and should not be used as a sole reason to enter a trade. Always practice robust risk management and use this tool in conjunction with your own trading plan. Past performance is not indicative of future results.
Swing Line Gabriel__ionescuEMA for swing trading, to be used for trend continuations. If you message me on IG, I'll tell you how to make entries using the moving average.
RTACoreLibrary "RTACore"
Advanced multi-timeframe technical analysis framework for Pine Script
@author WavesUnchained
@build 2025-10-14 22:41:47
newFloatResult(value, context)
Create a successful Result with float value
Parameters:
value (float)
context (string)
newStringResult(value, context)
Create a successful Result with string value
Parameters:
value (string)
context (string)
newBoolResult(value, context)
Create a successful Result with boolean value
Parameters:
value (bool)
context (string)
newErrorResult(errorCode, errorMessage, floatFallback, stringFallback, boolFallback, context)
Create an error Result with fallback values
Parameters:
errorCode (string)
errorMessage (string)
floatFallback (float)
stringFallback (string)
boolFallback (bool)
context (string)
addResultTag(result, tag)
Add a tag to Result
Parameters:
result (Result)
tag (string)
newSignalResult(signalStrength, signalType)
Create a signal Result with trading-specific tags
Parameters:
signalStrength (float)
signalType (string)
newIndicatorResult(value, indicatorName)
Create an indicator calculation Result with indicator tag
Parameters:
value (float)
indicatorName (string)
newTimeframeResult(value, timeframe, context)
Create a timeframe-specific Result
Parameters:
value (float)
timeframe (string)
context (string)
newConfluenceResult(confluenceScore, confidenceLevel)
Create a confluence Result with confidence level
Parameters:
confluenceScore (float)
confidenceLevel (string)
newValidationResult(context)
Create a new validation result (starts as valid)
Parameters:
context (string)
newValidationSuccess(context)
Create a successful validation result
Parameters:
context (string)
newValidationFailure(errors, context)
Create a failed validation result with errors
Parameters:
errors (array)
context (string)
addValidationError(result, field, error)
Add an error to validation result
Parameters:
result (ValidationResult)
field (string)
error (string)
addValidationWarning(result, field, warning)
Add a warning to validation result
Parameters:
result (ValidationResult)
field (string)
warning (string)
addValidationCorrection(result, correction)
Add a correction to validation result
Parameters:
result (ValidationResult)
correction (string)
setValidationMode(result, mode)
Set validation mode
Parameters:
result (ValidationResult)
mode (string)
getValidationMode(result)
Get validation mode
Parameters:
result (ValidationResult)
incrementValidatedFields(result)
Increment validated fields counter
Parameters:
result (ValidationResult)
setValidationTotalFields(result, total)
Set total fields for validation
Parameters:
result (ValidationResult)
total (int)
calculateValidationScore(result)
Calculate and update validation score based on errors/warnings
Parameters:
result (ValidationResult)
newPerformanceProfile(functionName)
Create a new performance profile
Parameters:
functionName (string)
startTiming(profile)
Start timing a performance profile (simple)
Parameters:
profile (PerformanceProfile)
endTiming(profile, hadError)
End timing and update performance profile
Parameters:
profile (PerformanceProfile)
hadError (bool)
updateMemoryEstimate(profile, arrayElements)
Set estimated memory usage (array elements)
Parameters:
profile (PerformanceProfile)
arrayElements (int)
newHealthyStatus()
Create a new healthy status
setComponentHealth(status, component, isOK, message)
Set component health status
Parameters:
status (HealthStatus)
component (string)
isOK (bool)
message (string)
isHealthyOverall(status)
Quick health check - are all components OK?
Parameters:
status (HealthStatus)
getHealthSummary(status)
Get simple health summary
Parameters:
status (HealthStatus)
hasValidFloat(result)
Check if Result contains a valid float value
Parameters:
result (Result)
hasValidString(result)
Check if Result contains a valid string value
Parameters:
result (Result)
getFloat(result, fallback)
Get float value from Result with fallback
Parameters:
result (Result)
fallback (float)
getString(result, fallback)
Get string value from Result with fallback
Parameters:
result (Result)
fallback (string)
getBool(result, fallback)
Get boolean value from Result with fallback
Parameters:
result (Result)
fallback (bool)
hasResultTag(result, tag)
Check if Result has specific tag
Parameters:
result (Result)
tag (string)
getResultTags(result)
Get all tags from Result
Parameters:
result (Result)
setResultContext(result, context)
Set operation context for Result
Parameters:
result (Result)
context (string)
filterResultsByTag(results, tag)
Filter Results by tag (utility for arrays of Results)
Parameters:
results (array)
tag (string)
getAllResultTags(results)
Get all unique tags from array of Results
Parameters:
results (array)
newDefaultAnalysisConfig()
Create default analysis configuration
newAggressiveAnalysisConfig()
Create aggressive trading configuration
newConservativeAnalysisConfig()
Create conservative trading configuration
newDefaultTimeframeConfig()
Create default timeframe configuration
newIntradayTimeframeConfig()
Create intraday timeframe configuration
newSwingTimeframeConfig()
Create swing trading timeframe configuration
getConfigSummary(config)
Get configuration summary string
Parameters:
config (AnalysisConfig)
cloneAnalysisConfig(source)
Clone analysis configuration
Parameters:
source (AnalysisConfig)
newGenericAnalysis(analysisType, timeframe)
Create a new generic analysis result
Parameters:
analysisType (string)
timeframe (string)
newConsensusData()
Create empty consensus data
newNeutralSignal(reason)
Create a neutral signal result
Parameters:
reason (string)
newBuySignal(score, confidence, reason)
Create a buy signal result
Parameters:
score (float)
confidence (float)
reason (string)
newSellSignal(score, confidence, reason)
Create a sell signal result
Parameters:
score (float)
confidence (float)
reason (string)
newMultiTimeframeResult(config, tfConfig)
Create new multi-timeframe result
Parameters:
config (AnalysisConfig)
tfConfig (TimeframeConfig)
getAnalysisAction(analysis)
Get analysis action string
Parameters:
analysis (GenericAnalysis)
isBullish(analysis)
Check if analysis is bullish
Parameters:
analysis (GenericAnalysis)
isBearish(analysis)
Check if analysis is bearish
Parameters:
analysis (GenericAnalysis)
getSignalSummary(signal)
Get signal summary string
Parameters:
signal (SignalResult)
hasStrongConsensus(consensus)
Check if consensus is strong
Parameters:
consensus (ConsensusData)
getConsensusSummary(consensus)
Get consensus summary
Parameters:
consensus (ConsensusData)
isActionableSignal(signal)
Check if signal is actionable
Parameters:
signal (SignalResult)
getSignalColor(signal)
Get signal color for UI display
Parameters:
signal (SignalResult)
validateAnalysisConfig(config)
Validate analysis configuration
Parameters:
config (AnalysisConfig)
validateTimeframeConfig(config)
Validate timeframe configuration
Parameters:
config (TimeframeConfig)
validatePriceData(prices)
Validate price data array
Parameters:
prices (array)
sanitizeFloat(value, minVal, maxVal, defaultVal)
Sanitize numeric input
Parameters:
value (float)
minVal (float)
maxVal (float)
defaultVal (float)
sanitizeInt(value, minVal, maxVal, defaultVal)
Sanitize integer input
Parameters:
value (int)
minVal (int)
maxVal (int)
defaultVal (int)
sanitizeFloatArray(arr)
Sanitize array by removing invalid values
Parameters:
arr (array)
logError(message)
Log error message
Parameters:
message (string)
logWarning(message)
Log warning message
Parameters:
message (string)
safeExecute(operationName, condition)
Safe execute wrapper
Parameters:
operationName (string)
condition (bool)
shouldAllowOperation(errorCount, maxErrors)
Circuit breaker pattern
Parameters:
errorCount (int)
maxErrors (int)
retryOperation(maxRetries)
Retry mechanism
Parameters:
maxRetries (int)
atrDistance(value1, value2, atr)
Calculate ATR-normalized distance between two values
Parameters:
value1 (float)
value2 (float)
atr (float)
atrDistance(value, reference, atrLength)
Calculate ATR-normalized distance between values
Parameters:
value (float)
reference (float)
atrLength (simple int)
percentDistance(value1, value2)
Calculate percentage-based distance between two values
Parameters:
value1 (float)
value2 (float)
withinATRTolerance(value, reference, atr, multiplier)
Check if value is within ATR-based tolerance of reference
Parameters:
value (float)
reference (float)
atr (float)
multiplier (float)
withinATRTolerance(value, reference, multiplier)
Check if value is within ATR-based tolerance of reference
Parameters:
value (float)
reference (float)
multiplier (float)
withinPercentTolerance(value, reference, percentTolerance)
Check if value is within percentage tolerance of reference
Parameters:
value (float)
reference (float)
percentTolerance (float)
proximityScore(value, reference, maxDistance)
Get proximity score (0-1, where 1 = very close)
Parameters:
value (float)
reference (float)
maxDistance (float)
sortArrayByValue(values, sortOrder)
Efficient array sorting using Pine Script native sort
Note: Replaces inefficient bubble sort implementations found in modules
Parameters:
values (array)
sortOrder (string)
safeArrayAverage(values)
Safe array average with null handling
Parameters:
values (array)
formatTableHeader(title, width)
Create formatted header for display tables
Parameters:
title (string)
width (int)
formatTableRow(key, value, width)
Format table row with key-value pair
Parameters:
key (string)
value (string)
width (int)
formatTableFooter(width)
Close table formatting
Parameters:
width (int)
truncateText(txt, maxLength, suffix)
Truncate text to specified length
Parameters:
txt (string)
maxLength (int)
suffix (string)
padText(txt, width, padChar, align)
Pad text to specified width
Parameters:
txt (string)
width (int)
padChar (string)
align (string)
titleCase(txt)
Convert text to title case
Parameters:
txt (string)
joinStrings(strings, separator)
Join array of strings with separator
Parameters:
strings (array)
separator (string)
formatTimestamp(timestamp, format)
Format timestamp to readable date/time
Parameters:
timestamp (int)
format (string)
evictLRU(cache)
Evict least recently used entry
Parameters:
cache (CacheManager)
newRiskAssessment()
Create a default risk assessment
calculateRiskAssessment(signal, volatility, volumeLevel)
Calculate comprehensive risk assessment
Parameters:
signal (SignalResult)
volatility (float)
volumeLevel (float)
newPositionData()
Create new empty position data
getConservativeStrategy()
Create conservative strategy template
getAggressiveStrategy()
Create aggressive strategy template
newDefaultStrategy()
Create default balanced strategy template
getStandardATR()
Get standard ATR(14) - cached per bar
getATR(length)
Get custom ATR with specified length
Parameters:
length (simple int)
getATRTolerance(multiplier)
Get ATR-based tolerance for distance calculations
Parameters:
multiplier (float)
getStandardVolumeAverage()
Get standard volume average SMA(20) - cached per bar
getVolumeAverage(length)
Get custom volume average
Parameters:
length (int)
getVolumeRatio()
Get volume ratio (current vs average)
getVolumeConfirmation(threshold)
Get volume confirmation (above threshold)
Parameters:
threshold (float)
getStandardEMAs()
Get standard EMAs (21, 50, 200) - cached per bar
getEMA21()
Get individual standard EMAs
getEMA50()
getEMA200()
getEMATrendAlignment()
Get EMA trend alignment score
getStandardRSI()
Get standard RSI(14) - cached per bar
getRSILevels(overbought, oversold)
Get RSI with overbought/oversold levels
Parameters:
overbought (float)
oversold (float)
getStandardMACD()
Get standard MACD (12, 26, 9) - cached per bar
getMACDSignal()
Get MACD trend signal
getMomentumScore()
Get comprehensive momentum score
getTrendStrength()
Get trend strength (0-100)
getIndicatorSummary()
Get indicator calculation summary (for debugging)
newZoneDetectionConfig()
Create default zone configuration
newZoneDetection(upperBoundary, lowerBoundary, creationBar, zoneType)
Create new zone
Parameters:
upperBoundary (float)
lowerBoundary (float)
creationBar (int)
zoneType (string)
calculateZoneOverlap(zone1Upper, zone1Lower, zone2Upper, zone2Lower)
Calculate zone overlap ratio
Parameters:
zone1Upper (float)
zone1Lower (float)
zone2Upper (float)
zone2Lower (float)
isPriceTouchingZone(zone, currentPrice, touchTolerance)
Check if price is touching zone
Parameters:
zone (ZoneDetection)
currentPrice (float)
touchTolerance (float)
getZonesInRange(zones, minPrice, maxPrice)
Get zones within price range
Parameters:
zones (array)
minPrice (float)
maxPrice (float)
getNearestZones(zones, currentPrice)
Get nearest support and resistance zones
Parameters:
zones (array)
currentPrice (float)
processZoneDetection(zones, config)
Complete zone detection and management system
Parameters:
zones (array)
config (ZoneDetectionConfig)
processZoneDetectionEngine(zones, config)
Parameters:
zones (array)
config (ZoneDetectionConfig)
newChannelConfig()
calcKeltnerChannel(config)
Parameters:
config (ChannelConfig)
checkKeltnerTouch(upper, lower)
Parameters:
upper (float)
lower (float)
getKeltnerDepth(basis, upper, lower)
Parameters:
basis (float)
upper (float)
lower (float)
checkKeltnerBreakout(upper, lower)
Parameters:
upper (float)
lower (float)
calcDonchianChannel(config)
Parameters:
config (ChannelConfig)
checkDonchianTouch(upper, lower)
Parameters:
upper (float)
lower (float)
checkDonchianReentry(upper, lower)
Parameters:
upper (float)
lower (float)
getDonchianWidth(upper, lower)
Parameters:
upper (float)
lower (float)
calcBollingerBands(config)
Parameters:
config (ChannelConfig)
calcSqueezeRatio(bbStdev, kcMultiplier, kcAtr)
Parameters:
bbStdev (float)
kcMultiplier (float)
kcAtr (float)
detectSqueezeState(squeezeRatio)
Parameters:
squeezeRatio (float)
detectSqueezeBreak(squeezeRatio, kcUpper, kcLower)
Parameters:
squeezeRatio (float)
kcUpper (float)
kcLower (float)
getSqueezeIntensity(squeezeRatio)
Parameters:
squeezeRatio (float)
processChannelDetection(config)
Parameters:
config (ChannelConfig)
detectChannelSignals(state)
Parameters:
state (ChannelState)
detectQualityZones(state)
Parameters:
state (ChannelState)
getChannelSignalText(state)
Parameters:
state (ChannelState)
analyzeChannelTrend(state)
Parameters:
state (ChannelState)
getChannelConfluence(state)
Parameters:
state (ChannelState)
newVwapConfig()
newVwapAnchors()
calcSessionVwap()
getPreviousSessionVwap(sessionVwap)
Parameters:
sessionVwap (float)
updateVwapAnchors(anchors, config)
Parameters:
anchors (VwapAnchors)
config (VwapConfig)
calcAnchoredVwap(anchors, isHigh)
Parameters:
anchors (VwapAnchors)
isHigh (bool)
detectPriceCrosses(sessionVwap)
Parameters:
sessionVwap (float)
detectStructureCrosses(sessionVwap, anchoredHigh, anchoredLow)
Parameters:
sessionVwap (float)
anchoredHigh (float)
anchoredLow (float)
detectVwapCluster(sessionVwap, anchoredHigh, anchoredLow, config)
Parameters:
sessionVwap (float)
anchoredHigh (float)
anchoredLow (float)
config (VwapConfig)
canShowSignal(anchors, config, signalType)
Parameters:
anchors (VwapAnchors)
config (VwapConfig)
signalType (string)
updateSignalThrottle(anchors, signalType)
Parameters:
anchors (VwapAnchors)
signalType (string)
calcCrossStrength(sessionVwap, isPriceCross)
Parameters:
sessionVwap (float)
isPriceCross (bool)
calcClusterStrength(vwapsInCluster, priceInCluster, tolerance)
Parameters:
vwapsInCluster (bool)
priceInCluster (bool)
tolerance (float)
calcStructureStrength(sessionVwap, anchoredHigh, anchoredLow)
Parameters:
sessionVwap (float)
anchoredHigh (float)
anchoredLow (float)
analyzeVwapTrend(sessionVwap)
Parameters:
sessionVwap (float)
processVwapDetection(anchors, config)
Parameters:
anchors (VwapAnchors)
config (VwapConfig)
generateVwapSignals(state)
Parameters:
state (VwapState)
getVwapBias(state)
Parameters:
state (VwapState)
getVwapConfluence(state)
Parameters:
state (VwapState)
newZoneConfig()
newZoneState()
stringToFloats(s)
Parameters:
s (string)
calculateBias(config)
Parameters:
config (ZoneConfig)
createZone(top, bottom, isBull, isHTF)
Parameters:
top (float)
bottom (float)
isBull (bool)
isHTF (bool)
updateZoneStatus(zone)
Parameters:
zone (Zone)
detectFVGOverlap(zone)
Parameters:
zone (Zone)
scoreZone(zone, config)
Parameters:
zone (Zone)
config (ZoneConfig)
sortAndTrimZones(zones, config)
Parameters:
zones (array)
config (ZoneConfig)
adjustZoneVisibility(zones, config)
Parameters:
zones (array)
config (ZoneConfig)
calculateTargetsATR(base, stepsString, atrLength)
Parameters:
base (float)
stepsString (string)
atrLength (simple int)
calculateTargetsSigma(base, stepsString, sigmaLength)
Parameters:
base (float)
stepsString (string)
sigmaLength (int)
calculateTargetsLiquidity(isLong, config)
Parameters:
isLong (bool)
config (ZoneConfig)
detectZoneSignals(zones, bias, config)
Parameters:
zones (array)
bias (int)
config (ZoneConfig)
processZoneManagement(state, config)
Parameters:
state (ZoneState)
config (ZoneConfig)
findNearestZones(state)
Parameters:
state (ZoneState)
newVolumeConfig()
newVolumeState()
getPriceSource(config)
Parameters:
config (VolumeConfig)
isInSession(config)
Parameters:
config (VolumeConfig)
isNewSession(config)
Parameters:
config (VolumeConfig)
calculateWindow(config)
Parameters:
config (VolumeConfig)
calculateProfile(config, windowStart, windowLength)
Parameters:
config (VolumeConfig)
windowStart (int)
windowLength (int)
detectVolumeNodes(binVolumes, binPrices, totalVolume)
Parameters:
binVolumes (array)
binPrices (array)
totalVolume (float)
calculateVolumeChoppiness(config)
Calculate choppiness index for volume profile
Parameters:
config (VolumeConfig)
detectMarketRegime(state, config)
Detect market regime based on multiple factors
Parameters:
state (VolumeState)
config (VolumeConfig)
calculateAdaptiveParameters(state, config)
Calculate adaptive volume profile parameters
Parameters:
state (VolumeState)
config (VolumeConfig)
updateMarketConditions(state, config)
Update volume state with market conditions
Parameters:
state (VolumeState)
config (VolumeConfig)
applyAdaptiveConfig(config, state)
Apply adaptive parameters to profile calculation
Parameters:
config (VolumeConfig)
state (VolumeState)
getHTFPivots(config)
Parameters:
config (VolumeConfig)
checkPivotConfluence(price, config, pivotHigh1, pivotLow1, pivotHigh2, pivotLow2)
Parameters:
price (float)
config (VolumeConfig)
pivotHigh1 (float)
pivotLow1 (float)
pivotHigh2 (float)
pivotLow2 (float)
calculateMOST()
Calculate MOST (Moving Stop) indicator
calculateTrendFilters(config)
Parameters:
config (VolumeConfig)
findNearestNodes(hvnNodes, lvnNodes)
Parameters:
hvnNodes (array)
lvnNodes (array)
detectVolumeSignals(config, profile, trendBullish, htfConfluence)
Parameters:
config (VolumeConfig)
profile (VolumeProfile)
trendBullish (bool)
htfConfluence (bool)
calculateVolumeScore(profile, trendBullish)
Parameters:
profile (VolumeProfile)
trendBullish (bool)
processVolumeProfile(state, config)
Parameters:
state (VolumeState)
config (VolumeConfig)
newHTFConfig()
newHTFStackState()
getOptimalTimeframes(chartTF)
Parameters:
chartTF (string)
calculateChoppiness(length)
Parameters:
length (int)
detectTrendEMA(length, threshold)
Parameters:
length (simple int)
threshold (float)
detectTrendSupertrend(atrLength, multiplier)
Parameters:
atrLength (simple int)
multiplier (float)
detectTrendMOST(length, multiplier)
Parameters:
length (simple int)
multiplier (float)
analyzeTrendForTF(tf, config)
Parameters:
tf (string)
config (HTFConfig)
calculateStackConfluence(tfData, config)
Parameters:
tfData (array)
config (HTFConfig)
calculateAutoTuningParams(choppiness, stackStrength, config)
Parameters:
choppiness (float)
stackStrength (float)
config (HTFConfig)
detectStackSignals(state, prevState, config)
Parameters:
state (HTFStackState)
prevState (HTFStackState)
config (HTFConfig)
createStackPanel(state, config)
Parameters:
state (HTFStackState)
config (HTFConfig)
processHTFStack(state, config)
Parameters:
state (HTFStackState)
config (HTFConfig)
processHTFStackSignals(state, prevState, config)
Parameters:
state (HTFStackState)
prevState (HTFStackState)
config (HTFConfig)
newRedefiningTechnicalAnalysisCore(analysisConfig, timeframeConfig, strategy)
Initialize RedefiningTechnicalAnalysis Core Library
Note: This function requires valid config objects to be passed in
The configuration module must be used directly to create default configs
Parameters:
analysisConfig (AnalysisConfig)
timeframeConfig (TimeframeConfig)
strategy (StrategyTemplate)
performAnalysis(core, prices, volumes, timestamps)
Perform complete multi-timeframe analysis
Parameters:
core (RedefiningTechnicalAnalysisCore)
prices (array)
volumes (array)
timestamps (array)
generateSignal(core, analysisResult)
Generate trading signal from analysis results
Parameters:
core (RedefiningTechnicalAnalysisCore)
analysisResult (MultiTimeframeResult)
assessRisk(core, signal)
Assess risk for trading decision
Parameters:
core (RedefiningTechnicalAnalysisCore)
signal (SignalResult)
executeFullWorkflow(core)
Execute complete analysis workflow
Parameters:
core (RedefiningTechnicalAnalysisCore)
updateAnalysisConfig(core, newConfig)
Update analysis configuration
Parameters:
core (RedefiningTechnicalAnalysisCore)
newConfig (AnalysisConfig)
updateStrategy(core, newStrategy)
Update strategy template
Parameters:
core (RedefiningTechnicalAnalysisCore)
newStrategy (StrategyTemplate)
checkSystemHealth(core)
Perform system health check
Parameters:
core (RedefiningTechnicalAnalysisCore)
generateStatusReport(core)
Generate comprehensive status report
Parameters:
core (RedefiningTechnicalAnalysisCore)
enableDebugMode(core, enabled)
Enable debug mode
Parameters:
core (RedefiningTechnicalAnalysisCore)
enabled (bool)
setFeatureFlag(core, flag, enabled)
Set feature flag
Parameters:
core (RedefiningTechnicalAnalysisCore)
flag (string)
enabled (bool)
getFeatureFlag(core, flag, defaultValue)
Get feature flag
Parameters:
core (RedefiningTechnicalAnalysisCore)
flag (string)
defaultValue (bool)
resetLibraryState(core)
Reset library state
Parameters:
core (RedefiningTechnicalAnalysisCore)
getLibraryInfo()
Get library version information
quickAnalysis(config, tfConfig, strategy)
Quick analysis - simplified entry point
Parameters:
config (AnalysisConfig)
tfConfig (TimeframeConfig)
strategy (StrategyTemplate)
getQuickStatus(core)
Get quick status string
Parameters:
core (RedefiningTechnicalAnalysisCore)
Result
Generic Result type for safe operations with error handling and fallbacks
Fields:
floatValue (series float)
stringValue (series string)
boolValue (series bool)
intValue (series int)
isSuccess (series bool)
errorCode (series string)
errorMessage (series string)
floatFallback (series float)
stringFallback (series string)
boolFallback (series bool)
intFallback (series int)
operationContext (series string)
timestamp (series int)
tags (array)
ValidationResult
Comprehensive validation result with errors, warnings, and corrections
Fields:
isValid (series bool)
errors (array)
warnings (array)
corrections (array)
suggestions (array)
validationScore (series float)
validationMode (series string)
validatedFields (series int)
totalFields (series int)
validationContext (series string)
validationTime (series int)
PerformanceProfile
Simplified performance profiling for Pine Script limitations
Fields:
executionTimeMs (series float)
averageExecutionMs (series float)
executionCount (series int)
errorCount (series int)
cacheHits (series int)
cacheMisses (series int)
cacheHitRatio (series float)
estimatedArrayElements (series int)
hasHeavyCalculation (series bool)
lastOptimizationHint (series string)
performanceGrade (series string)
performanceScore (series float)
functionName (series string)
profileStartTime (series int)
HealthStatus
Simplified health status for Pine Script limitations
Fields:
isHealthy (series bool)
healthScore (series float)
healthGrade (series string)
issues (array)
warnings (array)
recommendations (array)
dataValidationOK (series bool)
calculationsOK (series bool)
memoryUsageOK (series bool)
errorCountSession (series int)
warningCountSession (series int)
lastHealthCheck (series int)
healthCheckVersion (series string)
AnalysisConfig
Comprehensive analysis configuration with factor weights, thresholds, and extensible options
Fields:
activeFactors (array)
factorWeights (map)
thresholds (map)
features (map)
tradingMode (series string)
consensusMode (series string)
riskProfile (series string)
minConfidence (series float)
signalStrength (series float)
requireConsensus (series bool)
minConsensusCount (series int)
parameters (map)
options (map)
flags (map)
configName (series string)
version (series string)
description (series string)
createdTime (series int)
lastModified (series int)
validation (ValidationResult)
TimeframeConfig
Multi-timeframe configuration with weights and adjustments
Fields:
timeframes (array)
weights (array)
autoDetectChartTF (series bool)
includeHigherTFs (series bool)
tfAdjustments (map)
tfSensitivity (map)
tfFeatures (map)
minTimeframes (series int)
consensusThreshold (series float)
consensusMethod (series string)
normalizeWeights (series bool)
adaptiveBias (series bool)
higherTFBias (series float)
tfConfigName (series string)
configTimestamp (series int)
validation (ValidationResult)
GenericAnalysis
Generic analysis result that all specific analysis types extend
Fields:
totalScore (series float)
confidence (series float)
action (series string)
strength (series string)
riskLevel (series string)
factorScores (map)
factorWeights (map)
factorSignals (map)
factorReasons (map)
analysisType (series string)
timeframeAnalyzed (series string)
analysisTimestamp (series int)
marketCondition (series string)
dataQuality (series float)
performance (PerformanceProfile)
validation (ValidationResult)
numericData (map)
textData (map)
flags (map)
ConsensusData
Multi-timeframe consensus analysis data
Fields:
agreementCount (series int)
totalTimeframes (series int)
agreementPercentage (series float)
hasStrongConsensus (series bool)
hasMajorityConsensus (series bool)
agreeingTimeframes (array)
disagreeingTimeframes (array)
tfScores (map)
tfActions (map)
consensusMode (series string)
consensusScore (series float)
consensusAction (series string)
consensusStrength (series string)
tfWeights (map)
weightedConsensus (series bool)
weightedScore (series float)
consensusQuality (series float)
consensusReliability (series string)
consensusWarnings (array)
SignalResult
Comprehensive trading signal result
Fields:
strongBuy (series bool)
buy (series bool)
neutral (series bool)
sell (series bool)
strongSell (series bool)
overallScore (series float)
confidence (series float)
primaryAction (series string)
signalStrength (series string)
signalReason (series string)
contributingFactors (array)
factorContributions (map)
triggerCondition (series string)
consensus (ConsensusData)
consensusLevel (series string)
hasConsensus (series bool)
riskLevel (series string)
riskRewardRatio (series float)
successProbability (series float)
signalTimestamp (series int)
urgency (series string)
validityPeriod (series int)
marketPhase (series string)
warningFlags (array)
metadata (map)
MultiTimeframeResult
Multi-timeframe analysis result container
Fields:
primaryAnalysis (GenericAnalysis)
tfResults (map)
consensus (ConsensusData)
aggregatedScore (series float)
confidenceScore (series float)
dominantAction (series string)
consensusStrength (series string)
analyzedTimeframes (array)
failedTimeframes (array)
failureReasons (map)
performance (PerformanceProfile)
validation (ValidationResult)
dataQualityScore (series float)
config (AnalysisConfig)
tfConfig (TimeframeConfig)
analysisTimestamp (series int)
DebugLogEntry
Debug log entry
Fields:
timestamp (series int)
level (series string)
module (series string)
function (series string)
message (series string)
context (series string)
data (map)
barIndex (series int)
timeframe (series string)
DebugLogger
Debug logger with configurable levels
Fields:
entries (array)
maxEntries (series int)
currentLevel (series string)
enabled (series bool)
enabledModules (array)
showTimestamp (series bool)
showBarIndex (series bool)
outputFormat (series string)
PerformanceMeasurement
Performance measurement
Fields:
name (series string)
startTime (series int)
endTime (series int)
duration (series float)
iterations (series int)
avgDuration (series float)
status (series string)
context (series string)
TraceEntry
Execution trace entry
Fields:
function (series string)
module (series string)
entryTime (series int)
exitTime (series int)
isEntry (series bool)
parameters (series string)
returnValue (series string)
depth (series int)
ExecutionTracer
Execution tracer
Fields:
traces (array)
currentDepth (series int)
maxDepth (series int)
enabled (series bool)
maxTraces (series int)
CacheEntry
Cache entry
Fields:
key (series string)
data (series string)
timestamp (series int)
ttl (series int)
accessCount (series int)
lastAccess (series int)
CacheManager
Cache manager
Fields:
name (series string)
entries (map)
maxEntries (series int)
defaultTTL (series int)
enabled (series bool)
hits (series int)
misses (series int)
evictions (series int)
RiskAssessment
Core risk assessment result
Fields:
riskLevel (series string)
riskScore (series float)
riskRewardRatio (series float)
successProbability (series float)
maxDrawdownExpected (series float)
positionRisk (series float)
portfolioExposure (series float)
correlationRisk (series float)
concentrationRisk (series float)
volatilityRisk (series float)
liquidityRisk (series float)
timeframeRisk (series float)
newsEventRisk (series float)
supportResistanceRisk (series float)
trendRisk (series float)
momentumRisk (series float)
volumeRisk (series float)
hasHighRisk (series bool)
hasExtremeRisk (series bool)
riskWarnings (array)
riskFactors (array)
recommendedPositionSize (series float)
stopLossDistance (series float)
takeProfitDistance (series float)
shouldAvoidTrade (series bool)
riskMitigationStrategy (series string)
assessmentTimestamp (series int)
assessmentMethod (series string)
performance (PerformanceProfile)
PositionData
Comprehensive position data
Fields:
hasPosition (series bool)
positionSide (series string)
positionSize (series float)
entryPrice (series float)
entryTimestamp (series int)
entryReason (series string)
unrealizedPnL (series float)
realizedPnL (series float)
maxUnrealizedGain (series float)
maxUnrealizedLoss (series float)
totalReturn (series float)
stopLossPrice (series float)
takeProfitPrice (series float)
riskAmount (series float)
riskRewardRatio (series float)
currentRisk (RiskAssessment)
barsInPosition (series int)
maxBarsAllowed (series int)
isTimedOut (series bool)
timeframe (series string)
hasExitSignal (series bool)
exitReason (series string)
exitScore (series float)
shouldExit (series bool)
exitUrgency (series string)
actionHistory (array)
timestampHistory (array)
reasonHistory (array)
sharpeRatio (series float)
maxDrawdown (series float)
winRate (series float)
avgHoldTime (series float)
StrategyTemplate
Base strategy template
Fields:
name (series string)
description (series string)
category (series string)
timeframes (array)
entryThreshold (series float)
entryConfidenceMin (series float)
requiredSignals (array)
excludeConditions (array)
exitThreshold (series float)
stopLossPercent (series float)
takeProfitPercent (series float)
maxBarsInTrade (series int)
maxPositionSize (series float)
basePositionSize (series float)
useVolatilityAdjustment (series bool)
useConfidenceAdjustment (series bool)
maxRiskPerTrade (series float)
maxDailyRisk (series float)
maxDrawdownLimit (series float)
useAdaptiveRisk (series bool)
requireConsensus (series bool)
minConsensusPercent (series float)
avoidNewsEvents (series bool)
requireVolume (series bool)
targetSharpeRatio (series float)
targetWinRate (series float)
targetRiskReward (series float)
parameters (map)
flags (map)
settings (map)
MetricDataPoint
Performance metric data point
Fields:
timestamp (series int)
value (series float)
name (series string)
unit (series string)
labels (map)
source (series string)
MetricStats
Metric statistics
Fields:
min (series float)
max (series float)
avg (series float)
sum (series float)
count (series int)
p50 (series float)
p95 (series float)
p99 (series float)
stdDev (series float)
firstTimestamp (series int)
lastTimestamp (series int)
MetricDataPointArray
Wrapper for array of metric data points (to avoid nested collections)
Fields:
dataPoints (array)
MetricsCollector
Metrics collector
Fields:
metrics (map)
stats (map)
maxDataPoints (series int)
retentionPeriod (series int)
autoCleanup (series bool)
enabled (series bool)
enabledMetrics (array)
lastCleanupTime (series int)
ComponentHealth
Component health status
Fields:
name (series string)
status (series string)
healthScore (series float)
lastCheckTime (series int)
warnings (array)
errors (array)
metrics (map)
lastError (series string)
errorCount (series int)
warningCount (series int)
isOperational (series bool)
SystemHealth
System health overview
Fields:
overallStatus (series string)
overallScore (series float)
healthyComponents (series int)
degradedComponents (series int)
unhealthyComponents (series int)
components (array)
systemWarnings (array)
systemErrors (array)
lastFullCheckTime (series int)
autoHealing (series bool)
healingAttempts (series int)
HealthAlert
Health alert
Fields:
level (series string)
component (series string)
message (series string)
timestamp (series int)
acknowledged (series bool)
category (series string)
ZoneDetection
Advanced zone data structure
Fields:
upper (series float)
lower (series float)
mid (series float)
height (series float)
score (series float)
quality (series string)
touchCount (series int)
lastTouchBar (series int)
creationBar (series int)
role (series int)
zoneType (series string)
isActive (series bool)
isBroken (series bool)
flipBar (series int)
flipRetestCount (series int)
flipBestQuality (series float)
flipScore (series float)
hasFlipped (series bool)
htfOverlap (series bool)
htfTimeframe (series string)
htfConfidence (series float)
retestQuality (series float)
volumeProfile (series float)
volatilityProfile (series float)
freshnessScore (series float)
successfulBounces (series int)
failedBreakouts (series int)
successRate (series float)
avgHoldTime (series float)
zoneBox (series box)
midLine (series line)
zoneLabel (series label)
flipLabel (series label)
ZoneDetectionConfig
Zone analysis configuration
Fields:
pivotPeriod (series int)
atrMultiplier (series float)
atrLength (series int)
maxZones (series int)
mergeThreshold (series float)
minTouchesForSignificance (series int)
weightTouches (series float)
weightFreshness (series float)
weightVolume (series float)
weightHTF (series float)
minWickPercent (series float)
maxBodyPercent (series float)
freshnessHalfLife (series int)
useHTFProjection (series bool)
htfTimeframe (series string)
htfPivotCount (series int)
htfProjectionMultiplier (series float)
ChannelConfig
Fields:
kcEmaLength (series int)
kcAtrLength (series int)
kcMultiplier (series float)
dcLength (series int)
bbLength (series int)
bbMultiplier (series float)
pivotLength (series int)
atrThreshold (series float)
minBarsPerLeg (series int)
minTouchCount (series int)
mergeThreshold (series float)
ChannelState
Fields:
kcUpper (series float)
kcLower (series float)
kcBasis (series float)
kcAtr (series float)
dcUpper (series float)
dcLower (series float)
dcMid (series float)
bbUpper (series float)
bbLower (series float)
bbBasis (series float)
bbStdev (series float)
squeezeRatio (series float)
isSqueezeActive (series bool)
isExpanding (series bool)
touchKcUpper (series bool)
touchKcLower (series bool)
touchDcUpper (series bool)
touchDcLower (series bool)
kcBreakoutUp (series bool)
kcBreakoutDown (series bool)
dcReentryUp (series bool)
dcReentryDown (series bool)
squeezeBreakUp (series bool)
squeezeBreakDown (series bool)
kcDepth (series float)
dcWidth (series float)
squeezeIntensity (series float)
ChannelSignal
Fields:
signalType (series string)
direction (series int)
strength (series float)
description (series string)
isQualitySignal (series bool)
VwapConfig
Fields:
pivotLeftBars (series int)
pivotRightBars (series int)
clusterTolerancePercent (series float)
minBarsBetweenSignals (series int)
crossThreshold (series float)
enableThrottling (series bool)
detectClusters (series bool)
VwapState
Fields:
sessionVwap (series float)
sessionVwapPrev (series float)
anchoredVwapHigh (series float)
anchoredVwapLow (series float)
hasAnchoredHigh (series bool)
hasAnchoredLow (series bool)
priceCrossUp (series bool)
priceCrossDown (series bool)
canShowPriceCross (series bool)
structureCrossUp (series bool)
structureCrossDown (series bool)
canShowStructureCross (series bool)
isClusterActive (series bool)
canShowCluster (series bool)
clusterTolerance (series float)
vwapsInCluster (series bool)
priceInCluster (series bool)
priceVwapPosition (series int)
priceVwapDistance (series float)
priceVwapDistancePercent (series float)
crossStrength (series float)
clusterStrength (series float)
structureStrength (series float)
VwapSignal
Fields:
signalType (series string)
direction (series int)
strength (series float)
description (series string)
isHighConfidence (series bool)
barIndex (series int)
VwapAnchors
Fields:
cumulativePV (series float)
cumulativeV (series float)
anchorPV_High (series float)
anchorV_High (series float)
hasHighAnchor (series bool)
anchorPV_Low (series float)
anchorV_Low (series float)
hasLowAnchor (series bool)
lastPriceCrossBar (series int)
lastStructureCrossBar (series int)
lastClusterBar (series int)
ZoneConfig
Fields:
htfTimeframe (series string)
useHTF (series bool)
maxZonesPerSide (series int)
rankFavorHTF (series bool)
rankFavorFVG (series bool)
rankFavorFresh (series bool)
showOnlyTopRank (series bool)
alphaTop (series int)
alphaRest (series int)
biasLength (series int)
biasBandMultiplier (series float)
targetMode (series string)
atrLength (series int)
atrSteps (series string)
sigmaLength (series int)
sigmaSteps (series string)
useSSL (series bool)
useFVGFills (series bool)
confirmMidline (series bool)
confirmBreak (series bool)
requireBias (series bool)
lazyTargets (series bool)
nearPercent (series float)
Zone
Fields:
top (series float)
bottom (series float)
mid (series float)
bornTime (series int)
isBull (series bool)
isHTF (series bool)
touched (series bool)
violated (series bool)
hasFVG (series bool)
score (series float)
rank (series int)
zoneBox (series box)
midLine (series line)
isActive (series bool)
ZoneState
Fields:
zonesTF (array)
zonesHTF (array)
bias (series int)
biasScore (series float)
biasRegime (series string)
vwapLevel (series float)
bandUpper (series float)
bandLower (series float)
targetLevels (array)
targetLines (array)
activeBullZones (series int)
activeBearZones (series int)
totalZones (series int)
avgZoneScore (series float)
longSignal (series bool)
shortSignal (series bool)
nearestBullZone (Zone)
nearestBearZone (Zone)
ZoneSignal
Fields:
signalType (series string)
sourceZone (Zone)
strength (series float)
description (series string)
confirmed (series bool)
barIndex (series int)
VolumeConfig
Fields:
profileMode (series string)
fixedLength (series int)
rollingLength (series int)
sessionString (series string)
binCount (series int)
valueAreaPercent (series float)
useHLC3 (series bool)
useHTF1 (series bool)
htfTimeframe1 (series string)
useHTF2 (series bool)
htfTimeframe2 (series string)
pivotLookback (series int)
pivotToleranceATR (series float)
enableAutoTuning (series bool)
vaPct_eff (series float)
epsATR_eff (series float)
adaptiveAlpha (series float)
choppinessLength (series int)
choppyThreshold (series float)
trendingThreshold (series float)
useMarketRegime (series bool)
enableLVNSignals (series bool)
enableVASignals (series bool)
maxRetestDistanceATR (series float)
useEMAFilter (series bool)
useSupertrendFilter (series bool)
useMOSTFilter (series bool)
showPOC (series bool)
showValueArea (series bool)
showNodes (series bool)
showSilhouette (series bool)
silhouetteOffset (series int)
silhouetteWidth (series int)
zoneOpacity (series int)
enableSessionSplits (series bool)
maxSessionCount (series int)
VolumeNode
Fields:
price (series float)
volume (series float)
nodeType (series string)
prominence (series float)
isSignificant (series bool)
VolumeProfile
Fields:
pocPrice (series float)
pocVolume (series float)
valueAreaHigh (series float)
valueAreaLow (series float)
totalVolume (series float)
windowStart (series int)
windowLength (series int)
windowHigh (series float)
windowLow (series float)
binVolumes (array)
binPrices (array)
hvnNodes (array)
lvnNodes (array)
nearestLVN (series float)
nearestHVN (series float)
htfConfluence (series bool)
pocLine (series line)
valueAreaBox (series box)
nodeBoxes (array)
silhouette (series polyline)
VolumeState
Fields:
currentProfile (VolumeProfile)
sessionProfiles (array)
trendBullish (series bool)
emaConfluence (series float)
supertrendBull (series bool)
mostBull (series bool)
choppiness (series float)
isChoppy (series bool)
isTrending (series bool)
marketRegime (series string)
vaPct_current (series float)
epsATR_current (series float)
smoothingFactor (series float)
longLVNSignal (series bool)
shortLVNSignal (series bool)
longVASignal (series bool)
shortVASignal (series bool)
volumeScore (series float)
passFilter (series bool)
inValueArea (series bool)
abovePOC (series bool)
pocRising (series bool)
nearLVN (series bool)
VolumeSignal
Fields:
signalType (series string)
direction (series int)
strength (series float)
description (series string)
triggerPrice (series float)
hasConfluence (series bool)
barIndex (series int)
HTFConfig
Fields:
timeframes (array)
tfWeights (array)
autoSelectTFs (series bool)
maxTimeframes (series int)
trendLength (series int)
trendThreshold (series float)
trendMethod (series string)
stackThreshold (series float)
requireAllTFs (series bool)
confluenceBonus (series float)
enableAutoTuning (series bool)
choppinessLength (series int)
choppyThreshold (series float)
trendingThreshold (series float)
showStackPanel (series bool)
panelPosition (series string)
panelRows (series int)
panelCols (series int)
showTooltips (series bool)
HTFTrendData
Fields:
timeframe (series string)
trendStrength (series float)
trendDirection (series string)
confidence (series float)
isValid (series bool)
weight (series float)
trendColor (series color)
HTFStackState
Fields:
tfData (array)
bullConfluence (series float)
bearConfluence (series float)
stackStrength (series float)
stackBias (series string)
choppiness (series float)
isChoppy (series bool)
isTrending (series bool)
marketRegime (series string)
vaPct_eff (series float)
epsATR_eff (series float)
adaptiveAlpha (series float)
bullStackSignal (series bool)
bearStackSignal (series bool)
stackBreakSignal (series bool)
stackTable (series table)
tfLabels (array)
strengthBars (array)
RedefiningTechnicalAnalysisCore
Main library state container
Fields:
analysisConfig (AnalysisConfig)
timeframeConfig (TimeframeConfig)
activeStrategy (StrategyTemplate)
lastAnalysis (MultiTimeframeResult)
lastSignal (SignalResult)
lastRisk (RiskAssessment)
currentPosition (PositionData)
isInitialized (series bool)
lastUpdateTime (series int)
currentTimeframe (series string)
globalPerformance (PerformanceProfile)
systemHealth (SystemHealth)
metricsCollector (MetricsCollector)
analysisCache (CacheManager)
calculationCache (CacheManager)
recentErrors (array)
recentWarnings (array)
errorCount (series int)
warningCount (series int)
debugLogger (DebugLogger)
debugMode (series bool)
extensionData (map)
featureFlags (map)
Volume Profile Two-Tone - Hit Counter - Meter V1 Volume Profile Two-Tone - Hit Counter - Meter V1
Overview
The Volume Profile Two-Tone - Hit Counter - Meter V1 is a Pine Script v6 indicator for TradingView, designed to visualize buy and sell activity distribution across price levels within a user-defined window or intraday session. It plots a dual-color horizontal histogram showing buying (green) and selling (red) volume intensity, along with optional hit-count numbers and meter overlays. The profile dynamically updates as new bars form, providing an intuitive picture of where market participants are most active.
The enhanced V1 edition introduces persistent hit counts, real-time adaptive row rebuilding, and improved memory management for smoother performance in both rolling-window and session modes.
How It Works
The indicator divides the selected range into rows (price bins) and aggregates trade volume (or tick volume) per bar.
Each bin separately sums up bullish and bearish contributions based on candle direction and delta logic, then draws side-by-side histogram bars:
• Buy Volume (green): Total volume from bullish bars within the bin.
• Sell Volume (red): Total volume from bearish bars within the bin.
A rolling or session-based window determines how many recent bars are analyzed. Value Area (VA), Point of Control (POC), and total hits per bin are computed continuously. The display auto-adjusts as price moves, keeping the profile anchored to the latest visible bars.
Behind the scenes, optimized arrays manage active boxes, lines, and labels for each bin. Functions like ensure_rows() rebuild buffers only when necessary, guaranteeing efficiency without repainting past data. Persistent hit-tracking ensures each price level maintains its count even when temporarily hidden.
Key Features
• Dual-Tone Volume Histogram: Buy/sell split with distinct colors for immediate visual contrast.
• Rolling or Session Profiles: Choose between continuous rolling windows or intraday session resets.
• Persistent Hit Counts: Displays total touches per bin, remaining stored even when bins refresh.
• Adaptive Row Management: Automatic rebuilding when zooming, scrolling, or changing resolution.
• Value Area + POC Detection: Highlights the most active price levels and volume concentration zones.
• Meter Overlay Option: Adds gradient bars or directional meters for quick trend context.
• Performance Optimized: Uses lightweight arrays and cached line handles for minimal CPU load.
• Custom Color Control: Editable buy/sell colors, opacity, row count, and profile width.
• Full Persistence Mode: Profiles remain visually consistent across bar updates without redraw gaps.
What It Displays
The Volume Profile Two-Tone - Hit Counter - Meter V1 presents an adaptive horizontal histogram beside the chart’s candles, revealing how volume is distributed across price.
• Green segments show dominant buying interest; red segments reveal selling pressure.
• POC line identifies the highest-volume price.
• Hit-count numbers quantify how often price traded at each level.
• Optional meters display relative directional strength within the same range.
This visual layering helps traders quickly identify supply/demand zones, balance areas, and developing auction profiles across intraday or multi-session contexts.
Originality
The Pine Script v6 indicator uses efficient array management (array.new_*, array.set, array.get) and native math operations for rendering.
It avoids external dependencies, relying only on built-in TradingView functions like request.security, box.new, line.new, and label.new for dynamic plotting.
Common Ways People Use It
• Scalpers: Study short-term imbalances or high-activity levels to time entries/exits.
• Day Traders: Track evolving session volume and POC migration.
• Swing Analysts: Compare rolling distributions to identify value shifts over multiple days.
• Volume Profilers: Combine with VWAP or order-flow tools for deeper context.
Configuration Notes
Profile Mode: Select Rolling Window (bars) or Session (intraday).
Rows and Width: Default = 72 rows, 44 bars width.
Colors and Opacity: Adjust to match chart theme.
Performance Mode: Choose Accurate or Fast (approximate) for speed control.
Show Hits / Meter: Enable hit-count numbers and gradient meters for added context.
Legal Disclaimer
For informational and educational purposes only—not investment, financial, or trading advice. Past performance does not guarantee future results; trading involves significant risk. Provided “as is,” without warranties. Consult a qualified professional before making decisions. By using, you accept all risks and agree to this disclaimer.
Position Size Calculator + ADR % CheckCalculates position size to buy based on account size and current price/LOD