IB range + Breakout fibsThe IB High / Low + Auto-Fib indicator automatically plots the Initial Balance range and a Fibonacci projection for each trading day.
Define your IB start and end times (e.g., 09:30–10:30).
The indicator marks the IB High and IB Low from that session and extends them to the session close.
It keeps the last N days visible for context.
When price breaks outside the IB range, it automatically plots a Fibonacci retracement/extension from the opposite IB side to the breakout, using levels 0, 0.236, 0.382, 0.5, 0.618, 0.88, 1.
The Fib updates dynamically as the breakout extends, and labels are neatly aligned on the right side of the chart for clarity.
Ideal for traders who monitor Initial Balance breaks, range expansions, and Fibonacci reaction levels throughout the trading session.
Statistics
Z-Score Momentum | MisinkoMasterThe Z-Score Momentum is a new trend analysis indicator designed to catch reversals, and shifts in trends by comparing the "positive" and "negative" momentum by using the Z-Score.
This approach helps traders and investors get unique insight into the market of not just Crypto, but any market.
A deeper dive into the indicator
First, I want to cover the "Why?", as I believe it will ease of the part of the calculation to make it easier to understand, as by then you will understand how it fits the puzzle.
I had an attempt to create a momentum oscillator that would catch reversals and provide high tier accuracy while maintaining the main part => the speed.
I thought back to many concepts, divergences between averages?
- Did not work
Maybe a MACD rework?
- Did not work with what I tried :(
So I thought about statistics, Standard Deviation, Z-Score, Sharpe/Sortino/Omega ratio...
Wait, was that the Z-Score? I only tried the For Loop version of it :O
So on my way back from school I formulated a concept (originaly not like this but to that later) that would attempt to use the Z-Score as an accurate momentum oscillator.
Many ideas were falling out of the blue, but not many worked.
After almost giving up on this, and going to go back to developing my strategies, I tried one last thing:
What if we use divergences in the average, formulated like a Z-score?
Surprise-surprise, it worked!
Now to explain what I have been so passionately yapping about, and to connect the pieces of the puzzle once and for all:
The indicator compares the "strength" of the bullish/bearish factors (could be said differently, but this is my "speach bubble", and I think this describes it the best)
What could we use for the "bullish/bearish" factors?
How about high & low?
I mean, these are by definitions the highest and lowest points in price, which I decided to interpret as: The highest the bull & bear "factors" achieved that bar.
The problem here is comparison, I mean high will ALWAYS > low, unless the asset decided to unplug itself and stop moving, but otherwise that would be unfair.
Now if I use my Z-score, it will get higher while low is going up, which is the opposite of what I want, the bearish "factor" is weaker while we go up!
So I sat on my ret*rded a*s for 25 minutes, completly ignoring the fact the number "-1" exists.
Surprise surprise, multiplying the Z-Score of the low by -1 did what I wanted!
Now it reversed itself (magically). Now while the low keeps going down, the bear factor increases, and while it goes up the bear factor lowers.
This was btw still too noisy, so instead of the classic formula:
a = current value
b = average value
c = standard deviation of a
Z = (a-b)/c
I used:
a = average value over n/2 period
b = average value over n period
c = standard deviation of a
Z = (a-b)/c
And then compared the Z-Score of High to the Z-Score of Low by basic subtraction, which gives us final result and shows us the strength of trend, the direction of the trend, and possibly more, which I may have not found.
As always, this script is open source, so make sure to play around with it, you may uncover the treasure that I did not :)
Enjoy Gs!
Yuki Leverage RR Calculator**YUKI LEVERAGE RR CALCULATOR**
A professional-grade risk/reward calculator for leveraged crypto or forex trades.
Instantly visualizes entry, stop loss, targets, leverage, and risk-to-reward ratios — helping you plan precise positions with confidence.
──────────────────────────────
**WHAT IT DOES**
Calculates position value, quantity, stop-loss price, liquidation estimate, and per-target profit.
Displays everything in an on-chart table with optional price tags and alerts.
──────────────────────────────
**KEY FEATURES**
• Long / Short toggle (only one active at a time)
• Leverage-aware position sizing based on Position Cost ($) and Leverage
• Dynamic Stop Loss: input % → auto price + $ risk
• Up to 3 Take-Profit Targets with scaling logic
• Instant R:R ratios per target
• Liquidation estimate (approximation only)
• ENTRY / SL / T1 / T2 / T3 / LIQ visual tags
• Dark/Light mode, adjustable table and tag size
• Built-in alerts for Targets and Stop Loss
──────────────────────────────
**INPUTS**
• Long or Short selection
• Entry Price, Stop Loss %
• Target 1 / Target 2 / Target 3 + Take Profit %
• Position Cost ($), Leverage
• Visual preferences: show/hide table, table corner, font size, tag offset, text size
──────────────────────────────
**TABLE OUTPUTS**
Position Info: Type, Entry, Position Cost, Leverage, Value
Risk Section: Stop Loss %, Stop Loss Price, Total Risk ($), Liquidation % & Price
Targets 1–3: Profit ($), R:R, Take Profit ($), Runner % or PnL
──────────────────────────────
**ALERTS**
• Target 1 Hit – when price crosses T1
• Target 2 Hit – when price crosses T2
• Target 3 Hit – when price crosses T3
• Stop Loss Hit – triggers based on direction
(Use TradingView Alerts → Condition → Indicator → select desired alert)
──────────────────────────────
**HOW TO USE**
1. Choose Long or Short
2. Enter Entry Price, Stop Loss %, Position Cost, and Leverage
3. Add Targets 1–3 with optional Take Profit %
4. Adjust visuals as desired
5. Monitor table + alerts for live trade planning
──────────────────────────────
**NOTES**
• Liquidation values are estimates only
• Fees, slippage, and funding not included
• Designed for educational and planning purposes
──────────────────────────────
⚠️ **DISCLAIMER**
For educational use only — not financial advice.
Trading leveraged products involves high risk of loss.
Always confirm calculations with your exchange and trade responsibly.
Volume v4 (Dollar Value) by Koenigsegg📊 Volume v3 (Dollar Value) by Koenigsegg
🎯 Purpose:
Volume v3 (Dollar Value) by Koenigsegg transforms traditional raw-unit volume into dollar-denominated volume, revealing how much money actually flows through each candle.
Instead of measuring how many coins or contracts were traded, this version calculates the total traded value = volume × average price (hlc3), allowing traders to visually assess capital intensity and market participation within each move.
⚙️ Core Features
- Converts raw volume into USD-based traded value for each candle.
- Color-coded bars show bullish (green/teal) vs. bearish (red) activity.
- Built-in SMA and SMMA overlays highlight sustained shifts in value flow.
- Designed for visual clarity to support momentum, exhaustion, and divergence studies.
📖 How to Read It
Rising Dollar Volume — indicates growing market participation and strong capital flow, often aligning with impulsive waves in trend direction.
Falling Dollar Volume — signals waning interest or reduced participation, potentially hinting at correction or exhaustion phases.
Comparing Legs — when price makes new highs/lows but dollar volume weakens, it can reveal divergences between price movement and actual capital commitment.
SMA / SMMA Lines — use them to identify longer-term accumulation or depletion of market activity, separating short bursts from sustained inflows or outflows.
The goal is to visualize the strength of market moves in terms of capital energy, not just tick activity. This distinction helps traders interpret whether a trend is being driven by genuine money flow or low-liquidity drift.
⚠️ Disclaimer
This script is provided for research and educational purposes only.
It does not constitute financial advice, investment recommendations, or trading signals.
Always conduct your own analysis and manage your own risk when trading live markets.
The author accepts no liability for financial losses incurred from use of this tool.
🧠 Credits
Developed and published by Koenigsegg.
Written in Pine Script® v6, fully compliant with TradingView’s House Rules for Pine Scripts.
Licensed under the Mozilla Public License 2.0.
Risk sizing toolHelps you manage risk per trade accurately.
Automatically adjusts position size if the stop-loss or account constraints are exceeded.
Gives a clear visual summary directly on your stock chart.
Prevents taking trades that are too large relative to your account.
RPT Position Sizer🎯 Purpose
This indicator is a position sizing and stop-loss calculator designed to help traders instantly determine:
How many shares/contracts to buy,
How much risk (₹) they are taking per trade,
How much capital will be deployed, and
The precise stop-loss price level based on user-defined parameters.
It displays all key values in a compact on-chart table (bottom-left corner) for quick trade planning.
💡 Use Case
Perfect for discretionary swing traders, systematic position traders, and risk managers who want instant visual feedback of trade sizing metrics directly on the chart — eliminating manual calculations and improving discipline.
⚙️ Key Features
Dynamic Inputs
Trading Capital (₹) — total available capital for trading.
RPT % — risk-per-trade as a percentage of total capital.
SL % — stop-loss distance in percent below CMP (Current Market Price).
CMP Source — can be linked to close, hl2, etc.
Rounding Style — round position size to Nearest, Floor, or Ceil.
Decimals Show — control number formatting precision in the table.
Core Calculations
SL Points: CMP × SL%
SL Price: CMP − SL Points
Risk Amount (₹): Capital × RPT%
Position Size: Risk ÷ SL Points
Capital Used: Position Size × CMP
Clean On-Chart Table Display
Displays:
Trading Capital
RPT %
Risk Amount (₹)
Position Size (shares/contracts)
Capital Required (₹)
Stop-Loss % & SL Price
The table uses a minimalistic white-on-black design with clear labeling and rupee formatting for quick reference.
Data Window Integration
Plots hidden values (Position Size, Risk Amount, SL Points, Capital Used) for use in TradingView’s Data Window—ideal for strategy testing and exporting values.
Uni Combined Oscillator (LOG + SQRT + STD) -> PROFABIGHI_CAPITAL🌟 Overview
The Universal Combined Oscillator → PROFABIGHI_CAPITAL blends three advanced transformation methods—logarithmic for percentage-based momentum, square root for volatility-tempered signals, and standard deviation for statistical deviation scoring—to deliver a unified view of market momentum, extremes, and regime shifts. Traders can toggle individual oscillators or rely on the averaged signal for spotting overbought/oversold conditions, divergences, and trend biases with customizable normalization and smoothing.
⚙️ General Settings
– Lookback Length : Adjustable period for momentum calculations and normalization across all oscillators.
– Smoothing Length : Period to apply averaging for reducing signal noise.
– Smoothing Type : Selection of moving average styles like simple, exponential, weighted, or running for signal refinement.
– Z-Score Length : Period for computing statistical deviations to flag extremes.
– Show Z-Score : Toggle to overlay Z-score lines for overbought/oversold statistical insights.
– Normalization : Choice of scaling methods like range-based, deviation-based, or ranking for consistent comparisons.
– Source : Data input, such as closing prices, for all oscillator computations.
📐 SQRT Oscillator Settings
– SQRT Method : Transformation style for price shifts, volatility measures, range data, or blended components.
– Outlier Threshold : Level to detect and cap extreme values in square root signals for stability.
📊 STD Oscillator Settings
– Standard Score Length : Period for deviation-based scoring in the standard oscillator.
– Standard Score Method : Base input like prices, returns, volume, ranges, or a mix for scoring.
– Window Type : Calculation window as fixed rolling or growing expanding for context.
– Regime Threshold : Level to categorize market states as bullish, bearish, or neutral.
👁️ Display Options
– Show Average Oscillator : Enable the blended average line for overall signal clarity.
– Show LOG Oscillator : Activate logarithmic view for momentum on percentage scales.
– Show SQRT Oscillator : Turn on square root view for smoothed volatility insights.
– Show STD Oscillator : Enable deviation scoring for statistical market reads.
– Show Components : Reveal sub-plots within oscillators for deeper breakdown.
– Only Z-Score Mode : Restrict view to Z-score overlays for focused statistical analysis.
📊 Oscillator Components & Methods
The indicator processes signals through layered transformations:
LOG Oscillator : Applies logs to price changes, rate of change, and velocity for capturing proportional momentum.
SQRT Oscillator : Uses square roots on shifts, deviations, and ranges to dampen non-linear effects.
STD Oscillator : Scores deviations from means using price or volume metrics for outlier detection.
Normalization Techniques : Scales outputs to uniform ranges via min-max, standard deviations, or percentiles.
Volatility Adjustment : Incorporates average true range to adapt signals to market swings.
Z-Score Integration : Measures extremes statistically across all views for deviation alerts.
📈 Advanced Analysis Features
LOG Momentum System:
Change & Rate Detection : Tracks logarithmic accelerations in price action.
Velocity Blending : Averages momentum elements for smoother impulse reads.
Volatility Correction : Divides by range measures to balance in choppy conditions.
SQRT Transformation System:
Safe Root Handling : Manages negative inputs for reliable non-linear scaling.
Range & Deviation Metrics : Roots highs/lows and spreads for tempered volatility.
Outlier Safeguards : Caps extremes to avoid signal distortion.
Trend Bias Layer : Adjusts for directional lean using simple averages.
STD Scoring System:
Window Flexibility : Rolls or expands deviations for tailored historical views.
Fast/Slow Blends : Weights short and long scores for adaptive smoothing.
Regime Labeling : Classifies states by threshold crosses for bias confirmation.
Divergence Scanning : Compares price and score trends for reversal hints.
📏 Signal & Normalization Control
– Smoothing Application : Layers averages to filter noise across components.
– Scaling Choices : Aligns oscillators for seamless blending and Z-score use.
– Volatility Normalization : Scales by range for condition-aware strength.
– Average Blending : Equals parts from all for consensus signal.
– Ranking Position : Places current value in historical context for relativity.
📋 Analysis Framework
Signal Generation:
Overbought Cues : Lines crossing upper bounds or positive Z-scores for sell pressure.
Oversold Cues : Dips below lower bounds or negative Z-scores for buy opportunities.
Regime Changes : Shifts in scoring to flag bullish or bearish dominance.
Divergence Flags : Mismatches between price and oscillator for potential turns.
Z-Score Management:
Extreme Bounds : Positive or negative deviations for high-conviction extremes.
Capping Mechanisms : Limits outliers in root views for steady readings.
Meta Deviations : Layered scores for broader normalized insights.
Rank Validation : Historical placement to gauge signal potency.
Risk & Filter Integration:
Range Filters : Adjusts sensitivity to swings for balanced alerts.
Equal Weighting : Consensus from components for reliable averages.
Contextual Scaling : Ties to lookback for market-relative views.
Threshold Guards : Caps for uniform analysis without spikes.
🎨 Visual Features
– Oscillator Lines : Thick blues for mains, thins for subs and Z-overlays in varied hues.
– Z-Score Traces : Fine lines tracking deviations on selected plots.
– Background Shades : Faint reds for overbought, greens for oversold, blues/grays for regimes.
– Reference Levels : Dashed zero and dotted deviation lines, plus sigma bounds.
– Info Table : Top-right panel with live values, statuses, regimes, and params in color-coded rows.
– Component Traces : Optional thins revealing inner metrics on active oscillators.
🔍 Advanced Features
– Multi-Transformation Mix : Fuses log, root, and deviation for layered perspectives.
– Scaling Variety : From range to rank for custom oscillator harmony.
– State & Mismatch Logic : Boolean tags for regimes and turn signals.
– Live Recalcs : Bar-by-bar updates for Z and outlier checks.
– Array Storage : Holds history for ranks and growing windows.
– Range Adaptation : True range tweaks for varying conditions.
– Average Styles : Diverse smoothers for tuned signal flow.
🔔 Signal Alerts & Monitoring
– Upper Cross Alerts : Triggers on breaches of overbought or positive Z-levels.
– Lower Cross Alerts : Fires on drops below oversold or negative Z-levels.
– State Shifts : Notices entry into bullish, bearish, or neutral phases.
– Mismatch Warnings : Flags price-score drifts for reversal scans.
– Extreme Events : Special notices for root outliers.
By merging logarithmic, square root, and deviation methods with statistical overlays, the Universal Combined Oscillator → PROFABIGHI_CAPITAL equips traders with a versatile momentum dashboard, blending signals for precise extremes, regimes, and divergences in TradingView.
✅ Key Takeaways
– Fuses three oscillators for holistic momentum and volatility reads.
– Z-scores and regimes cut noise with stats-driven filters.
– Table and hues streamline live oversight.
– Toggles and scalers fit any trading approach.
NQ Manipulation/Distribution Projections + Average RangeThis is not your typical OHLC indicator :)
Overview:
The Manipulation/Distribution Projections (OHLC Stats) indicator is a powerful tool designed to forecast potential price levels for various timeframes. It operates on a simple yet profound principle: price action within a single candle can be broken down into "manipulation" and "distribution" phases. By analyzing over 17 years of historical data for major assets in Python, this script calculates the average (mean) and typical (median) extent of these movements.
These statistical insights are then used to project key levels on your chart based on the current period's opening price, providing a statistically-grounded framework for potential support, resistance, and price targets.
Key Concepts Explained
The indicator's logic is based on how price wicks and bodies form relative to the opening price.
• Manipulation: This refers to the initial move that goes against the candle's eventual direction. For a bullish candle, it's the lower wick (the move from the open down to the low before reversing higher). For a bearish candle, it's the upper wick (the move from the open up to the high before selling off). It represents a "fake out" or a stop hunt.
• Distribution: This is the primary, directional move of the candle from the opening price. For a bullish candle, it's the distance from the open to the high. For a bearish candle, it's the distance from the open to the low. It represents the "real" intended direction of price for that period.
How It Works
This indicator does not calculate these ratios in real-time. Instead, it leverages a comprehensive statistical analysis performed externally in Python on over 17 years of OHLC data. This analysis determined the mean and median ratios for both Manipulation and Distribution movements across different timeframes and, for intraday periods, different times of day.
These pre-computed, static ratios are embedded directly into the script. When a new period begins (e.g., a new day on the Daily timeframe), the indicator:
1. Takes the opening price for that period.
2. Retrieves the corresponding pre-calculated Manipulation and Distribution ratios.
3. Applies these ratios to the opening price to project eight potential price levels:
o + / - Mean Distribution
o + / - Median Distribution
o + / - Mean Manipulation
o + / - Median Manipulation
This approach provides a stable, forward-looking set of levels for the entire duration of the trading period.
________________________________________
Features
• Statistically-Derived Projections: Plots eight key price levels based on historical tendencies, providing clear potential zones for entries, exits, and stop placement.
• Selectable Timeframe: Choose to view projections for the 1H, 4H, 1D, or 1W periods directly from the settings.
• Dynamic Stats Table: A powerful, on-chart dashboard that provides real-time context. For all four timeframes (1H, 4H, 1D, 1W), it shows:
o Position: Where the current price is relative to the projected zones (e.g., "In +Manip Zone," "Below -Dist").
o Range Completed: The percentage of the historical average range that the current period has already covered.
o Current & Average Range: The current high-to-low range in points vs. the historical average.
• Historical Context: You can display levels for previous periods to see how price has interacted with them in the past.
• Full Customization: Control the color, style, and visibility of every line, label, and fill to match your chart's theme.
________________________________________
How to Use
This indicator is versatile and can be integrated into various trading strategies.
• Identifying Targets & Reversal Zones: The Distribution levels (especially the zone between the median and mean) can serve as logical take-profit targets, as they represent a historical point of extension. Conversely, Manipulation levels can indicate areas where price might form a wick and reverse.
• Gauging Volatility: Use the Stats Table's "Range Completed" column to assess market conditions. If the 1D range is only 30% complete by mid-day, there may be room for significant expansion. If it's already at 150%, the market might be overextended and due for consolidation.
• Multi-Timeframe Confluence: Use the Stats Table to quickly check if the price on a lower timeframe (e.g., 1H) is approaching a significant level on a higher timeframe (e.g., 1D), adding more weight to that level.
• Defining Bias: If the price opens and holds above the Manipulation zones, it can signal a strong directional bias for the rest of the period.
________________________________________
Settings
• Projection Timeframe: The primary timeframe for which to calculate and display the levels.
• Historical Periods to Show: Set to 1 for only the current period, or increase to see how levels from past periods held up.
• Timezone: Set the timezone for accurate hourly calculations (defaults to America/New_York).
• Visuals: Customize the appearance of the projection lines, labels, and the shaded zones between mean and median levels.
• Stats Table: Enable/disable the table and configure its position, size, and colors.
________________________________________
Disclaimer: This indicator is for informational and educational purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset. All trading involves risk, and past performance is not indicative of future results. Please do your own research and risk management.
Enjoy!
MORE - MTF Open Retest Extensions [Pro]Overview
MORE- MTF Open Retest Extensions highlights what price typically does after a higher-timeframe structure break (taking out the previous candle’s high or low) and before a potential retest of the current open.
It plots percentile extension levels (above/below the broken side) that quantify how far price has historically moved prior to an open retest if a retest occurs, giving traders objective context for stretch vs. common movement around structural breaks.
Key features
• Break-aware logic: MORE activates only after the current timeframe has broken the prior candle’s high/low. No break → no extensions.
• Open-retest probabilities: Displays the empirical likelihood of retesting the current open following a break, with sensitivity to when in the interval the break occurred (early/late breaks can behave differently).
• Pre-retest extension percentiles: Five percentile bands (e.g., 25/50/75/85/95) show how far price typically extends before any open retest on the broken side.
• Multi-timeframe dashboard: Monitor multiple reference timeframes (e.g., 1h → 12h) while viewing any chart timeframe. See which breaks are active and the highest percentile reached this interval.
• Filtering & display controls: Toggle historical zones, choose zones vs. lines (or both).
• Filtering with a threshold: User can enter a threshold for the historical probability so that the open, zones, levels and dashboard only show for timeframes above this user defined input. e.g. input of 70%, zone and levels will only be drawn when the historical data was greater than or equal to this level.
• Show selected timeframe or all untested opens the dashboard is showing as "Active"
• 2 Alert types: Set for a specific timeframe to alert an activate open for retest or set a percentile level to be crossed and alert on cross.
No signals, just context: MORE is a descriptive tool for structure and stretch—use it alongside your own strategy and risk framework.
Methodology (transparency)
• MORE uses embedded statistical datasets constructed from extensive historical price behavior across multiple timeframes.
• Each dataset represents conditional empirical outcomes —specifically, how far price extended beyond a prior candle’s high/low before retesting its open on the same timeframe.
• Percentiles and probabilities are calculated from these internal data arrays, ensuring the indicator runs deterministically on TradingView with no external data connections .
• The proprietary component lies in:
The way volatility and structure are normalized across timeframes;
How conditional breaks and open-retest windows are segmented; and
How percentile extension zones are blended into continuous statistical envelopes.
• These methods and datasets are unique to LevelLogic Indicators and are not replicated from any public or open-source scripts.
• Outputs summarize historical tendencies for educational context only — they are not predictive signals .
How to use
• Pick the reference timeframe (e.g., 1H, 2H, 4H, … 12H).
• Wait for a break of the prior candle’s high/low on that timeframe—MORE then plots the pre-retest extension percentiles on the broken side.
• Use the open-retest probability as context only; combine with your own entry/management rules.
• Optionally toggle historical view to study prior intervals and how far price usually stretched before any open retest.
• Consider alerts on percentile crosses if you want notifications when price enters statistically stretched areas.
Notes
Educational/analytical tool — no signals, no performance or outcome promises.
Historical tendencies change with regime; treat outputs as context, not advice.
Non-standard bars (e.g., Heikin Ashi/Renko) are for display only.
Credits
Developed by LevelLogic Indicators to provide clear, empirical context around breaks and open-retest behavior across multiple timeframes.
Invite-only script
Only users approved by the author can access this script. Request permission per the author’s instructions.
Advanced Memecoin Tracker -> PROFABIGHI_CAPITAL (Backtest)🌟 Overview
The Advanced Memecoin Tracker → PROFABIGHI_CAPITAL (Backtest) indicator screens a diverse portfolio of memecoins across major blockchains, scoring them based on momentum, volatility-adjusted performance, and relative strength to chain basecoins for dynamic eligibility ranking. It simulates rotational long-only exposure to top performers while comparing against equal-weight holds and benchmarks, delivering tables for conditions, rankings, and metrics to identify high-potential memecoin rotations.
⚙️ Backtest Configuration
- Leverage Multiplier : Adjustable amplification for simulated position returns to model leveraged trading scenarios
- Start Date Selection : Defines the beginning of the backtest period for all equity and hold calculations
- Slippage Percentage : Deducts execution costs from trades to reflect real-market friction
- Commission Percentage : Applies brokerage fees on position changes for net performance accuracy
- Metrics Tables Toggle : Enables or disables detailed performance summaries for chart focus
- Basecoin Symbols : Configurable references (ETH, SOL, SUI, VIRTUAL) for relative strength comparisons
📅 Date Range Settings
- Backtest Inception Point : Restricts simulations to bars after the selected timestamp for targeted analysis
- Equity Initialization : Sets starting value to unity on the inception date
- Historical Gating : Ignores pre-start data to focus on defined performance windows
- Forward Cost Application : Applies slippage and commissions only within the active period
📊 PROFABIGHI_CAPITAL Metrics Display
Equity Curve Options:
- Dynamic Portfolio Path : Traces cumulative returns from rotational allocations
- Benchmark Overlay : Compares against hold strategies for relative outperformance
- Inception Reference : Marks the start with a vertical line and label
- Return Percentage Label : Shows total gain/loss dynamically
- Shaded Growth Area : Fills under the curve for visual volume emphasis
- Suppression Choice : Hides the curve to prioritize table views
Metrics Table Setup:
- Split-Panel Distribution : Organizes asset stats across bottom-center and bottom-right
- Essential Metrics Suite : Covers drawdown, Sharpe, Sortino, Omega, and returns per asset
- Portfolio Summary : Highlights aggregated system performance
- Benchmark Hold View : Dedicated panel for passive index metrics with thresholds
- Toggle-Based Rendering : Switches to compact summary when full tables off
- Dark Theme Consistency : Black backgrounds with white text for readability
⚙️ Evaluation and Portfolio Settings
- Signal Mode Selection : Aggressive for threshold-based averaging or conservative for unanimous passes
- Asset Evaluation Count : Limits the total memecoins analyzed for efficiency
- Top Ranking Limit : Restricts the display table to elite performers
- Eligibility Threshold : Minimum score cutoff for aggressive mode inclusion
- Indicator Activation Toggles : Enables RSI variants, ROC scales, Sharpe, momentum, delta, and relative strength
- Chain Grouping Bonus : Awards extra points to memecoins outperforming their basecoin
📊 Indicator Selection
Oscillator Suite:
- Short RSI Toggle : Activates quick momentum readings for early signals
- Long RSI Toggle : Includes trend-aligned overbought/oversold checks
- ROC Multi-Scale Toggles : Engages short, medium, long change rates for layered acceleration
Efficiency and Strength Measures:
- Sharpe Ratio Toggle : Factors in risk-adjusted returns for quality filtering
- Momentum RSI Toggle : Applies bounded oscillator to velocity for persistence
- Price Delta Toggle : Evaluates directional changes or smoothed variants
- Relative Strength Toggle : Compares to basecoins for chain-specific outperformance
📊 RSI Configuration
Input and Period Controls:
- RSI Price Source : Chooses the data feed for oscillator computation
- Short Period Adjustment : Tunes responsiveness for fast memecoin swings
- Long Period Adjustment : Sets broader horizon for sustained momentum
Noise Reduction Layers:
- Primary Average Type and Span : Selects and sizes first smoothing for clarity
- Secondary Layer Toggle : Adds comparator average for crossover refinement
- Secondary Average Type and Span : Customizes the backup smoother
- Adaptive Volatility Window : VIDYA lookback for dynamic response
Signal Generation Rules:
- Mid-Range Favoring : Credits building strength without extremes
- Crossover Preference : Rewards favorable MA alignments in dual setups
- Mode-Adaptive Scoring : Partial in aggressive, strict in conservative
📊 ROC Configuration
Change Rate Horizons:
- Short-Term Period : Captures immediate price velocity bursts
- Medium-Term Period : Balances recent acceleration trends
- Long-Term Period : Smooths over extended momentum phases
Directional Bias Logic:
- Positive Thresholding : Full credit for upward changes across scales
- Unified Multi-Period View : Aggregates for comprehensive rate alignment
- Binary Momentum Check : Pass/fail on positivity for simplicity
📊 Sharpe Ratio Configuration
Efficiency Windowing:
- Return/Volatility Lookback : Defines historical scope for ratio base
- Value Smoothing Span : Applies EMA to steady raw computations
- Buy Signal Bound : Upper threshold for positive efficiency
- Sell Signal Bound : Lower cutoff for underperformance flags
Scaling and Normalization:
- Annual Factor Application : Converts daily to yearly for standardization
- Zero-Division Guard : Defaults to neutral on flat volatility
- Threshold-Based Credit : Full pass above buy, penalties below sell in aggressive mode
📊 Momentum RSI Configuration
Velocity Oscillation Setup:
- Momentum Horizon : Sets change detection period for input to RSI
- Bounded Strength Period : RSI length on momentum for normalized power
- First Smoothing Choice and Size : Average type and length for initial filter
- Second Layer Activation : Optional dual for advanced crossover
Dynamic Adaptation:
- Volatility Response Window : VIDYA period for market-sensitive smoothing
- Midline Dominance Reward : Credits above-center persistence
- Alignment Scoring : Full in conservative, flexible in aggressive
📊 Price Delta RSI Configuration
Change Assessment Mode:
- Raw vs. Smoothed Delta : Direct differences or RSI-applied for refinement
- Delta Computation Span : Lookback for price shift evaluation
- Oscillation on Delta : RSI period when using bounded variant
Filter Enhancements:
- Initial Average Type and Span : Smoother for delta signal clarity
- Comparator Layer Toggle : Dual-MA for directional confirmation
- Adaptive Volatility Span : VIDYA window for responsive adjustment
Bias Determination:
- Upward Shift Credit : Full for positive raw deltas
- Center or Cross Favor : Above 50 or aligned MA for smoothed
- Integrated Versatility : Supports both basic and layered delta views
📊 Relative Strength Configuration
Chain Comparison Framework:
- RSI Ratio Period : Oscillator length on asset-to-basecoin ratio
- Smoothing Average Type and Span : Filter for RS signal stability
- Dual Layer Toggle : Second average for crossover enhancement
- Volatility-Adjusted Window : VIDYA lookback for dynamic RS smoothing
Outperformance Logic:
- Midline Superiority : Credits RS above 50 for basecoin dominance
- Crossover Alignment : Rewards favorable dual-MA setups
- Group Bonus Integration : Extra points for top chain performers
📊 Beta Assessment
Market Sensitivity Measure:
- Benchmark Reference : Index symbol for relative volatility baseline
- Covariance Horizon : Period for return pairing and normalization
Correlation Derivation:
- Daily Shift Alignment : Matches asset and benchmark changes
- Variance Safeguard : Handles edge cases in division
- Contextual Layer : Adds relative risk without direct score impact
🪙 Memecoin Portfolio Setup
Chain-Segmented Inputs:
- Ethereum Group : Up to 9 symbols for ETH-based memecoins
- Solana Group : Up to 9 symbols for SOL-based memecoins
- SUI Group : Up to 9 symbols for SUI-based memecoins
- BASE/VIRTUAL Group : Up to 9 symbols for alternative chain memecoins
Basecoin References:
- ETH, SOL, SUI, VIRTUAL Symbols : Configurable anchors for RS calculations
- Security Price Fetching : Pulls closes for all enabled memecoins
- Group-Aware Arrays : Stores names, metrics, and conditions by index
📊 Scoring and Rotation Engine
Chain Strength Ranking:
- Basecoin RSI Computation : Applies oscillator to each reference
- Top Chain Identification : Selects strongest base for bonus allocation
- Group Bonus Assignment : Boosts scores for memecoins on leading chains
Per-Asset Evaluation:
- Enabled Indicator Tally : Counts active metrics for normalized averaging
- Binary Alignment Check : 1 for bullish conditions, 0 otherwise
- RS Multi-Chain Max : Takes highest relative strength across bases
Final Eligibility Rules:
- Aggressive Averaging : Full score if normalized meets threshold
- Conservative Consensus : Requires all toggled indicators to pass
- Bonus-Enhanced RS : Adds chain leadership points for competitive edge
🏆 Ranking and Allocation
Score-Based Sorting:
- Descending Order : Ranks assets by final eligibility rating
- Threshold Pruning : Filters to qualifying entries up to limit
- Eligible Pool Formation : Builds set for dynamic position weighting
Long Signal Generation:
- Top-Asset Activation : Flags longs for ranked memecoins
- Array Mapping : Assigns booleans to each instrument index
- Real-Time Rebalance : Updates on bar close for responsive rotation
📋 Tables and Visuals
Ranking Display Panel:
- Bottom-Left Compact Grid : Lists top assets with rank, name, and score
- Clean Name Stripping : Removes exchange prefixes for brevity
- Last-Bar Refresh [/b>: Updates only on final bar for efficiency
Basiscoin Strength Table:
- Top-Left Summary : Ranks basecoins by RSI for chain context
- Numerical Ordering : 1-4 positions with symbol labels
- Performance Insight : Highlights leading ecosystem for bonus awareness
📈 Backtest Simulation
State Tracking Arrays:
- Current/Prior Long Flags : Monitors position changes per asset
- Weight Persistence : Stores previous allocations for cost calc
- Transition Detection : Identifies flips to apply fees
Equity Path Building:
- Weighted Daily Shifts : Sums changes by lagged allocations
- Cost Subtraction : Deducts slippage/commissions on transitions
- Compounded Growth : Chains net returns from unity start
- Hold Baseline : Equal-weight across all for passive comparison
📊 Metrics Derivation
Risk-Return Analytics:
- Maximum Drawdown : Peak-to-trough drops for each path
- Sharpe Efficiency : Annualized return per volatility unit
- Sortino Downside Focus : Penalizes only negative deviations
- Omega Probability Weight : Gains vs. losses beyond threshold
Comprehensive Breakdown:
- Per-Asset Isolation : Individual stats for memecoin performance
- System Composite : Aggregated from rotational equity
- Benchmark Parallels : Hold metrics for validation
- Formatted Presentation [/b>: Percentages and rounded values in tables
🔔 Alert Integration
- Eligible Asset List : Comma-separated top-ranked memecoins on close
- No-Qualify Notice : Alerts when criteria unmet
- Bar-Close Dispatch [/b>: Single trigger per confirmed bar
- Name Simplification [/b>: Clean symbols without prefixes
✅ Key Takeaways
- Chain-Focused Screening : Scores memecoins with relative strength to basecoins for ecosystem edge
- Rotational Exposure : Dynamically weights top eligible for momentum capture
- Realistic Simulation : Factors leverage, costs, and holds for practical insights
- Visual Prioritization : Tables spotlight rankings, conditions, and basecoin leaders
- Flexible Calibration : Toggles and modes tune sensitivity to volatility
- Bonus-Driven Groups : Rewards outperformance within leading chains
- Alert Efficiency : Delivers actionable picks without overload
- Scalable Multi-Asset : Handles dozens of memecoins with array optimization
M Carlo Pro -> PROFABIGHI_CAPITAL🌟 Overview
The M Carlo Pro is a sophisticated Monte Carlo simulation engine that generates probabilistic price projections and scenario analysis frameworks . It offers dual-mode operation combining forward-looking price path modeling with return-based scenario testing , featuring confidence interval calculations , histogram distribution analysis , and customizable random sampling from historical data or user-defined return distributions.
⚙️ Main Mode Selector
- Analysis Mode Choice : Select between Scenario Analysis or Price Projection
- Scenario Analysis : Return-based simulations displayed in separate indicator pane with distribution analysis
- Price Projection : Forward price paths rendered directly on main price chart
- Mode-Specific Visualization : Each mode optimizes display for its analytical purpose
📊 Common Simulation Settings
- Random Seed : Fixed seed value for reproducible simulation results across multiple runs
- Distribution Type Selection : Choose between Normal (Gaussian) distribution or Bootstrap resampling
- Number of Paths : Total simulation iterations to generate for statistical validity
- Projection Length : Forward-looking bars or steps for each simulation path
- Boundaries Only Toggle : Display only confidence bounds instead of full path ensemble
- Historical Lookback : Number of past bars to collect for return distribution calculation
- Path Style Selector : Visual line style (solid, dotted, or dashed) for rendered paths
📈 Scenario Analysis Settings
Simulation Source Options:
- Price Mode : Calculates returns from historical price data automatically
- Custom Returns Mode : Uses user-defined return values for scenario testing
Return Input Framework:
- Primary Returns : Main scenario return values entered as text (one per line)
- Secondary Returns : Additional scenario layer for multi-dimensional analysis
- Tertiary Returns : Third scenario dimension for complex modeling
- Quaternary Returns : Fourth scenario layer for maximum flexibility
- Multi-Layer Support : Combine multiple return sets for comprehensive scenario coverage
Confidence and Display:
- Confidence Level Percentage : Statistical confidence interval for boundary calculations
- Path Lines Only : Show simulation paths without additional visual elements
- Scatter Plot Mode : Render final outcomes as scatter points instead of connected paths
- Distribution View Only : Display exclusively the histogram distribution without paths
Histogram Configuration:
- Binning Method Selection : Choose between Sturges, Rice, Square Root, or custom bin calculation
- Automatic Bin Sizing : Statistical formulas determine optimal histogram granularity
- Custom Bin Option : Manual specification of histogram bar count when custom method selected
📈 Price Projection Settings
- Display Scale Toggle : Show or hide price axis and scale labels on projection chart
- Force Render Option : Override path limit for full rendering (may truncate long projections)
- Show Mean Path : Display the average projection path across all simulations for central tendency visualization
- Performance Table : Summary statistics showing number of paths generated and projection length
🔧 Distribution Methods
Normal Distribution (Gaussian):
- Calculates mean and standard deviation from historical returns
- Generates random values using Box-Muller transform
- Produces symmetric probability distribution around mean
- Two independent uniform random numbers transformed into normally distributed values
Bootstrap Resampling:
- Randomly samples from actual historical return observations
- Preserves empirical distribution characteristics without parametric assumptions
- Each simulation step selects one historical return with replacement
- Captures real market behavior including fat tails and skewness
Return Calculation Logic:
- Price Mode : Logarithmic returns calculated from consecutive price ratios
- Custom Mode : User-provided returns applied directly to simulation
- Exponential Application : Price mode uses exponential of return for price updates
- Additive Application : Custom return mode adds returns directly
📊 Scenario Analysis Execution
Simulation Loop Process:
- Initialize starting value (price or sum of returns)
- Generate random return using selected distribution method
- Apply return to current value using appropriate calculation method
- Store intermediate results in matrix structure
- Track final outcomes in endpoint array
- Repeat for specified number of paths
Confidence Interval Calculation:
- Bins final outcomes into histogram with chosen binning method
- Identifies bin with maximum frequency (mode)
- Expands range symmetrically around mode
- Calculates cumulative probability of range
- Highlights bins within specified confidence level
- Displays confidence percentage and visual fill
Visualization Components:
- Path Rendering : Colored lines showing individual simulation trajectories
- Scatter Plot Option : Final outcomes plotted as individual points with labels or boxes
- Boundary Lines : Orange and teal lines marking confidence envelope when boundaries-only enabled
- Current Sum Line : Yellow reference line showing starting return sum in custom mode
- Step Labels : Bar numbers or step counts along horizontal axis
- Scale Axes : Vertical scale with value labels and horizontal baseline
📈 Price Projection Execution
Path Generation Framework:
- Divides total paths into twenty batches for performance optimization
- Each batch processes assigned number of simulations
- Generates forward price points using distribution sampling
- Accumulates sum of all prices at each projection step for average calculation
- Stores endpoints for statistical analysis
- Renders paths as polylines with random color assignment
Mean Path Calculation:
- Sums all simulated prices at each forward bar
- Divides by total number of simulations for average
- Plots thicker aqua-colored line representing expected value path
- Provides central tendency reference across all scenarios
Performance Optimization:
- Batch Processing : Splits simulations into manageable chunks
- Point Aggregation : Collects points before polyline rendering
- Conditional Rendering : Force option overrides automatic path limits
- Dynamic Coloring : Random RGB generation for path differentiation
Scale and Annotation:
- Vertical Scale : Price axis with evenly spaced labels showing projection range
- Horizontal Scale : Bar count labels showing forward projection timeline
- Grid Lines : Teal-colored axes forming scale framework
- Performance Table : Bottom-right display of simulation parameters
🎨 Visualization Features
Scenario Analysis Display (Separate Pane):
- Simulation Paths : Multi-colored trajectories from starting point to projection horizon
- Baseline Plot : Aqua line showing starting value (price or return sum)
- Confidence Boundaries : Orange (lower) and teal (upper) envelope lines
- Histogram Distribution : Orange bars showing frequency of final outcomes
- Bin Labels : Outcome values and frequencies displayed on each histogram bar
- Confidence Highlight : Darker orange shading on bins within confidence interval
- Confidence Label : Percentage display showing statistical coverage
- Axis Scaling : Adaptive vertical scale based on outcome range
Price Projection Display (Main Chart):
- Price Candles : Teal (bullish) or orange (bearish) candles on underlying price chart
- Projection Paths : Rainbow-colored polylines extending forward from current bar
- Mean Path Line : Thick aqua line showing average projection across all simulations
- Scale Display : Optional price axis and bar count labels
- Performance Table : Summary box showing simulation statistics
Common Visual Elements:
- Random Coloring : Each path assigned unique RGB values for differentiation
- Line Style Options : Solid, dotted, or dashed rendering for all paths
- Transparent Colors : Semi-transparent fills and lines prevent visual clutter
- Dynamic Scaling : Automatic axis adjustment based on outcome distribution
🔍 Advanced Features
Matrix Data Management:
- Row-Column Structure : Simulation results stored in two-dimensional matrix
- Color Matrix : Parallel matrix storing path colors for rendering
- Min-Max Tracking : Boundary matrix records extremes at each projection step
- Endpoint Array : Final outcome values collected for histogram analysis
Histogram Construction:
- Automatic Binning : Statistical formulas calculate optimal bin count based on sample size
- Sturges Formula : Logarithmic approach for bin determination
- Rice Rule : Cube-root-based calculation for granularity
- Square Root Method : Simple square root of sample size
- Frequency Counting : Each outcome assigned to appropriate bin
- Value Tracking : Minimum value in each bin recorded for labeling
Scatter Plot Implementation:
- Label Creation : First 500 outcomes rendered as styled labels with circular markers
- Box Fallback : Additional outcomes beyond label limit rendered as boxes
- Random Positioning : X-coordinate randomization prevents perfect vertical alignment
- Color Preservation : Each point retains its assigned simulation color
Adaptive Visualization:
- Mode Detection : Different rendering logic for price versus return simulations
- Toggle Interactions : Boundary-only and histogram-only modes override default displays
- Dynamic Limits : Path rendering adjusts based on performance constraints
- Conditional Elements : Scale, mean, and table displays controlled by user toggles
🎯 Use Cases and Applications
Risk Assessment:
- Generate probability distribution of future outcomes
- Identify worst-case and best-case scenarios with confidence intervals
- Quantify likelihood of specific price targets
- Visualize range of plausible futures based on historical volatility
Scenario Planning:
- Test specific return sequences using custom input mode
- Model multiple market environments with layered return sets
- Compare outcomes across different volatility assumptions
- Evaluate strategy performance under various conditions
Portfolio Projections:
- Forecast future portfolio values with probabilistic bounds
- Estimate expected returns across multiple timeframes
- Assess probability of reaching financial goals
- Understand distribution of potential outcomes
Education and Research:
- Demonstrate Monte Carlo methodology visually
- Explore effects of different distribution assumptions
- Compare normal versus empirical (bootstrap) distributions
- Illustrate concepts of confidence intervals and central limit theorem
✅ Key Takeaways
- Dual-Mode Flexibility : Scenario Analysis for distribution study or Price Projection for forward visualization
- Statistical Rigor : Confidence interval calculation with automatic histogram binning methods
- Distribution Choices : Normal (Gaussian) assumption or Bootstrap for empirical distribution preservation
- Custom Scenario Testing : Four-layer return input system for complex multi-dimensional analysis
- Reproducible Results : Fixed random seed ensures consistent output across multiple runs
- Batch Processing Optimization : Twenty-batch execution for handling large simulation counts
- Visual Clarity : Separate pane for scenario analysis, main chart overlay for price projections
- Mean Path Reference : Average trajectory across all simulations provides expected value guidance
- Adaptive Scaling : Automatic axis adjustment and range detection for optimal display
- Performance Management : Conditional rendering limits and force options balance detail with execution speed
- Histogram Intelligence : Multiple binning algorithms with confidence highlighting for outcome distribution
- Comprehensive Visualization : Paths, boundaries, scatter plots, histograms, scales, and tables for complete analytical picture
🚀🚀 PROFABIGHI_CAPITAL Correlation Heatmap System 🚀🚀🌟 Overview
The PROFABIGHI_CAPITAL Correlation Heatmap System is an institutional-grade multi-asset correlation visualization tool engineered for cryptocurrency traders seeking to dissect inter-asset dependencies and portfolio risk clustering through dynamic, rolling correlation matrices or benchmark-focused comparisons. By computing Pearson correlation coefficients over adjustable lookback periods across up to 20 symbols, it generates color-coded heatmaps highlighting positive (green) or negative (red) relationships, while the single-asset mode benchmarks against a primary symbol (e.g., BTC) to reveal relative strength hierarchies [/b>, top/bottom extremes, and diversification insights—empowering users to optimize allocations, detect co-movement risks , or uncover decoupling opportunities in volatile markets with real-time table updates and symmetric visualizations.
This sophisticated system transcends basic scatter plots by offering dual-mode flexibility —comprehensive pairwise matrices for broad ecosystem scanning or targeted single-asset scans for focused relative analysis—complete with invalid symbol tolerance [/b>, dynamic table sizing [/b>, and performance-optimized fetching [/b>, ensuring seamless scalability from watchlists of 5 assets to full 20-symbol universes while maintaining computational efficiency and visual clarity for professional-grade decision-making.
🚀 Main Settings
- Display Mode : Core selector between 'X -> Y Matrix' for exhaustive pairwise correlation grids that reveal the full network of asset interdependencies, ideal for identifying clusters of high-beta alts or low-correlation hedges, and 'Single Asset R Comparison' for streamlined benchmarking against a chosen primary symbol, perfect for evaluating how individual tokens align or diverge from market leaders like BTC during regime shifts
- Correlation Length : Adjustable rolling window (default 30 bars) that defines the historical scope for coefficient calculations, where shorter periods emphasize recent volatility correlations for tactical adjustments and longer horizons capture structural relationships for strategic portfolio construction, balancing noise reduction with regime sensitivity
- Number of Assets in Matrix : Scalable limit (up to 20) controlling the heatmap dimensions, enabling focused 5x5 grids for core holdings or expansive 20x20 matrices for ecosystem-wide scanning, with automatic diagonal suppression (em-dashes) to avoid self-correlation artifacts and optimize visual density
📊 Single Asset R Comparison Settings
- The PROFABIGHI_CAPITAL Asset : Primary symbol designation (default BTCUSD) serving as the correlation anchor, allowing traders to assess how alts co-move with this reference during pumps, dumps, or sideways action, facilitating relative strength rankings and beta-like exposure profiling without full regressions
- Number of Assets in Main Table : Configurable count (up to 20) for the unsorted correlation list, providing a comprehensive yet manageable view of dependencies in original input order, useful for sequential portfolio reviews or quick scans of predefined watchlists
- Number of Top/Bottom Assets : Highlight limit (default 5) for dedicated tables showcasing strongest positive (top) and weakest/negative (bottom) correlations, spotlighting diversification candidates (low R) or momentum followers (high R) to guide rebalancing decisions amid market rotations
📈 Assets List (20x)
- Asset 1 through Asset 20 : Sequential symbol inputs for building the correlation universe, starting with majors like BTC, ETH, SOL for baseline stability and extending to alts like XRP, ADA for diversification insights, with tooltip guidance for format (e.g., CRYPTO:BTCUSD) and flexibility for custom tokens across exchanges
- Grouped Configuration : Organized list for streamlined portfolio assembly, allowing quick swaps of underperformers or additions of emerging narratives, ensuring the heatmap reflects current market themes from blue-chips to speculative plays
- Exchange Prefix Support : Native handling of prefixed symbols (e.g., CRYPTO:, BINANCE:), enabling cross-platform comparisons without manual adjustments, while the short name extractor cleans displays for readability in dense tables
📡 Data Fetching (20x)
- Parallel Security Requests : Simultaneous close price pulls for all 20 assets using timeframe-aligned fetches, ensuring synchronized data across symbols to maintain correlation accuracy even in asynchronous market hours
- System Asset Isolation : Dedicated retrieval for the primary benchmark symbol, preventing contamination in single-mode comparisons and allowing independent updates without affecting matrix computations
- Invalid Symbol Resilience : Built-in ignore_invalid_symbol parameter with na defaults, gracefully handling malformed inputs or delisted tokens to avoid script crashes and enable partial universe analysis
- Chart Timeframe Alignment : Automatic adaptation to the active chart resolution, supporting from 1-minute intraday correlations for scalping to daily for swing trading, with consistent bar indexing for reliable rolling windows
🔧 Helper Functions
- Short Name Extractor : Utility to strip exchange prefixes and suffixes (e.g., CRYPTO:BTCUSD → BTC), generating compact labels for table headers and cells, enhancing scannability in large matrices without losing symbol identity
- Correlation Column Generator : Core function computing Pearson coefficients between two series over the specified length, returning both the value and a binary color (green for positive >0, red for negative) to streamline heatmap cell population with visual intuition
- Cell Filler Routine : Standardized table.cell wrapper applying consistent black-transparent backgrounds, small text sizing, and dynamic text colors, ensuring uniform aesthetics across all visualization modes while supporting conditional formatting for emphasis
📊 Correlation Calculations
- Pairwise Rolling Coefficients : Exhaustive computation of ta.correlation for every unique asset pair (up to 190 in 20x20 mode), generating symmetric matrices that illuminate co-movement patterns, from tight BTC-ETH linkages to decoupled niche alts, with na-safe handling for data gaps
- Single-Asset Benchmark Series : Dedicated correlations against the primary symbol for all others, producing a vector of R values that quantify relative dependencies, enabling quick identification of 'BTC clones' (high positive) or inverse hedges (negative)
- Length-Parameterized Rolling : Each coefficient uses the user-defined lookback to filter transient noise, where 20-bar windows highlight short-term spillovers and 100-bar captures enduring regime correlations for long-term allocation
- Color Mapping Logic : Binary green/red assignment based on sign (positive/negative), providing immediate visual cues for diversification (seek reds) or momentum trading (cluster greens), with potential for gradient extensions in future iterations
- Diagonal Suppression : Automatic em-dash placement on self-correlations (always 1.0), avoiding redundant cells and centering focus on inter-asset insights in the heatmap grid
🎨 Visualization Logic
- Last-Bar Dynamic Refresh : Table recreation on barstate.islast with prior deletions to prevent accumulation, ensuring crisp updates without historical artifacts or memory bloat in extended sessions
- Branding Banner Table : Bottom-center single-cell overlay with bold, yellow-texted indicator title on black background, serving as persistent identifier and visual anchor amid multi-table layouts
- Matrix Heatmap Construction : Centered (num_assets+1)x(num_assets+1) table with gray borders, populating headers vertically/horizontally with short names, filling off-diagonals with formatted R values and sign-based colors for symmetric, at-a-glance dependency mapping
- Single-Mode Multi-Table Suite : Top-center primary asset highlight (yellow-bordered), middle-center unsorted main list for sequential review, left/right top/bottom sorted subsets for extreme correlation spotlights, all with gray headers and color-coded R cells
- Progressive Cell Population : Nested conditionals scaling fills to active asset count, ensuring partial matrices render cleanly while full 20x20 grids showcase exhaustive pairwise analysis without overflow
- Error Handling Label : Fallback red downward label when no valid correlations available, prompting data checks and preventing blank displays in edge cases like all-invalid symbols
✅ Key Takeaways
- Dual-Mode Versatility : Seamlessly toggles between exhaustive pairwise heatmaps for ecosystem mapping and single-asset benchmarks for relative strength profiling, adapting to tactical or strategic analysis needs
- Rolling Correlation Insights : Adjustable windows reveal dynamic dependencies, crucial for spotting co-crash risks (high positive R) or counter-trend hedges (negative R) in crypto's correlated environments
- Visual Heatmap Efficiency : Color gradients and symmetric layouts enable instant pattern recognition, from BTC-beta clusters to low-R diversification gems, accelerating portfolio optimization
- Scalable Asset Handling : Up to 20 symbols with invalid tolerance and dynamic sizing, supporting watchlist scans without performance hits or manual exclusions
- Top/Bottom Extremes : Dedicated tables flag strongest/weakest links, guiding quick rebalances toward uncorrelated assets for reduced drawdowns or amplified momentum plays
- Benchmark-Centric Flexibility : Custom primary symbol centers analysis on user priorities like ETH for DeFi focus, transforming raw R values into actionable relative performance hierarchies
TRADE ORBIT :Support & Resistance Level🧩 Features
✅ Automatically updates at the start of each new trading day
✅ Draws horizontal pivot lines that extend across the current day
✅ Red lines = Resistance levels
✅ Green lines = Support levels
✅ Labels (R1–R5, S1–S5) displayed at the right edge for clarity
✅ Lightweight and compatible with all timeframes
💡 How to Use
These levels can act as potential intraday or swing reversal zones.
Watch for price rejections or breakouts near these calculated pivots.
Combine with other tools such as RSI, volume, or moving averages for confirmation.
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.
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)
HPAS – Historical Price Action StatisticsHPAS – Historical Price Action Statistics (v7)
A data-driven overview of weekday behavior: price, volatility, and volume.
1) OVERVIEW
HPAS analyzes how each weekday behaves across your selected history. It aggregates daily returns, intraday ranges, and volumes into a compact heatmap table and optionally plots daily range bands (historical & today) on the chart.
Note: All weekday statistics are calculated using UTC-based daily candles for consistent results across markets (especially 24/7 assets like crypto).
The goal is context and probabilities — not signals.
2) HOW IT WORKS
Collects daily bar stats: % gain/loss (close vs open), intraday range ((High−Low) ÷ Open × 100), and contracts (volume).
Groups data by weekday (Sun–Sat) and computes: win/loss frequencies, average and max moves, average intraday ranges, and average volume.
Note: “Weekday” refers to the calendar day in UTC time . This ensures consistency across all assets and exchanges, particularly for 24/7 markets like crypto.
Compares average weekday volume to the current 20-day average (% of 20D).
Displays results in a color-shaded table; optionally draws historical daily range bands plus today’s projection with optional smoothing.
3) INCLUDED FEATURES
Core metrics
Total → Gain / Loss (% of Days): How often the day closes above/below open.
Closing → Avg / Max: Average and largest daily % moves up/down.
Intrabar (optional) → Avg / Max: Typical and extreme intraday % ranges.
Contracts → Avg (K): Average daily volume (shown in thousands).
Contracts → %20D: Weekday’s average volume as % of the current 20-day average.
Visualization & UX
Heatmap coloring: lower values appear darker; higher values lighter.
Current weekday highlight with a left-side triangle.
Tooltips on headers explain what/why/how.
Dark/Light theme support; Colorblind-safe palette toggle (Okabe–Ito).
Projection Bands
Plots historical daily range bands and today’s projected band.
Optional smoothing (SMA) for cleaner band movement.
Band Smoothing Explained: Applies a simple moving average over recent projection values to reduce sudden jumps in the upper/lower bands.
Higher values make the range lines steadier but slower to react; lower values show more real-time variability.
4) USAGE TIPS
Context, not prediction: Use stats to frame expectations, not to force trades.
Cycle awareness: Compare long vs short date windows; behavior can shift across regimes.
Volume tells a story: Elevated %20D can hint at increased participation or attention on certain weekdays.
Targets & risk: Range bands provide realistic context for sizing stops/targets.
Accessibility: Enable Colorblind-safe mode if red/green contrast is hard to read.
5) INTERPRETATION GUIDE
% Gain / % Loss — Frequency of up/down closes. Higher % Gain suggests a bullish weekday bias.
Avg Gain / Avg Loss — Mean daily % move on green/red days. Gauges typical magnitude.
Max Gain / Max Loss — Largest observed daily % change. Sets an upper bound of past extremes.
Hi-Lo Avg / Max — Typical and extreme intraday % ranges. Context for expected volatility.
Contracts Avg (K) — Average daily volume in thousands. Participation proxy.
%20D — Volume vs current 20-day average. 100% = typical, >100% = above-normal, <100% = lighter-than-normal.
6) CREDITS
Inspired by the HPAS concept popularized by Krown Trading and The Caretaker.
Rebuilt and extended for clarity, accessibility, and practical context.
Version: v7 (October 2025)
License: Educational, non-commercial use
Key Inputs (snippet)
// Projection Bands
grpBands = “Projection Bands”
showBands = input.bool(true, “Show daily range bands (historical & today)”, group=grpBands)
smoothLen = input.int(1, “Band smoothing (days)”, minval=1, maxval=20, group=grpBands)
Regular Trading Hours Opening Range Gap (RTH ORG)### Regular Trading Hours (RTH) Gap Indicator with Quartile Levels
**Overview**
Discover overnight gaps in index futures like ES, YM, and NQ, or stocks like SPY, with this enhanced Pine Script v6 indicator. It visualizes the critical gap between the previous RTH close (4:15 PM ET for futures, 4:00 PM for SPY) and the next RTH open (9:30 AM ET), helping traders spot potential price sensitivity formed during after-hours trading.
**Key Features**
- **Standard Gap Boxes**: Semi-transparent boxes highlight the gap range, with optional text labels showing day-of-week and "RTH" identifier.
- **Midpoint Line**: A customizable dashed line at the 50% level, with price labels for quick reference.
- **New: Quartile Lines (25% & 75%)**: Dotted lines (default width 1) mark the quarter and three-quarter points within the gap, ideal for finer intraday analysis. Toggle on/off, adjust style/color/width, and add labels.
- **High-Low Gap Variant**: Optional boxes and midlines for gaps between the prior close's high/low and the open's high/low—perfect for wick-based overlaps on lower timeframes (5-min or below recommended).
- **RTH Close Lines**: Extend previous close levels with dotted lines and price tags.
- **Customization Galore**: Extend elements right, limit historical displays (default: 3 gaps), no-plot sessions (e.g., avoid weekends), and time offsets for non-US indices.
**How to Use**
Apply to 15-min or lower charts for best results. Toggle "extend right" for ongoing levels. SPY auto-adjusts for its 4 PM close.
Tested on major indices—enhance your gap trading strategy today! Questions? Drop a comment.
Thanks to twingall for supplying the original code.
Thanks to The Inner Circle Trader (ICT) for the logical and systematic application.
6 minutes ago
Release Notes
### Regular Trading Hours (RTH) Gap Indicator with Quartile Levels
**Overview**
Discover overnight gaps in index futures like ES, YM, and NQ, or stocks like SPY, with this enhanced Pine Script v6 indicator. It visualizes the critical gap between the previous RTH close (4:15 PM ET for futures, 4:00 PM for SPY) and the next RTH open (9:30 AM ET), helping traders spot potential price sensitivity formed during after-hours trading.
**Key Features**
- **Standard Gap Boxes**: Semi-transparent boxes highlight the gap range, with optional text labels showing day-of-week and "RTH" identifier.
- **Midpoint Line**: A customizable dashed line at the 50% level, with price labels for quick reference.
- **New: Quartile Lines (25% & 75%)**: Dotted lines (default width 1) mark the quarter and three-quarter points within the gap, ideal for finer intraday analysis. Toggle on/off, adjust style/color/width, and add labels.
- **High-Low Gap Variant**: Optional boxes and midlines for gaps between the prior close's high/low and the open's high/low—perfect for wick-based overlaps on lower timeframes (5-min or below recommended).
- **RTH Close Lines**: Extend previous close levels with dotted lines and price tags.
- **Customization Galore**: Extend elements right, limit historical displays (default: 3 gaps), no-plot sessions (e.g., avoid weekends), and time offsets for non-US indices.
**How to Use**
Apply to 15-min or lower charts for best results. Toggle "extend right" for ongoing levels. SPY auto-adjusts for its 4 PM close.
Tested on major indices—enhance your gap trading strategy today! Questions? Drop a comment.
Thanks to twingall for supplying the original code.
Thanks to The Inner Circle Trader (ICT) for the logical and systematic application.
+++ 2025.10.13 added new labels / fixed bugs
Cumulative Volume Delta Z Score [BackQuant]Cumulative Volume Delta Z Score
The Cumulative Volume Delta Z Score indicator is a sophisticated tool that combines the cumulative volume delta (CVD) with Z-Score normalization to provide traders with a clearer view of market dynamics. By analyzing volume imbalances and standardizing them through a Z-Score, this tool helps identify significant price movements and market trends while filtering out noise.
Core Concept of Cumulative Volume Delta (CVD)
Cumulative Volume Delta (CVD) is a popular indicator that tracks the net difference between buying and selling volume over time. CVD helps traders understand whether buying or selling pressure is dominating the market. Positive CVD signals buying pressure, while negative CVD indicates selling pressure.
The addition of Z-Score normalization to CVD makes it easier to evaluate whether current volume imbalances are unusual compared to past behavior. Z-Score helps in detecting extreme conditions by showing how far the current CVD is from its historical mean in terms of standard deviations.
Key Features
Cumulative Volume Delta (CVD): Tracks the net buying vs. selling volume, allowing traders to gauge the overall market sentiment.
Z-Score Normalization: Converts CVD into a standardized value to highlight extreme movements in volume that are statistically significant.
Divergence Detection: The indicator can spot bullish and bearish divergences between price and CVD, which can signal potential trend reversals.
Pivot-Based Divergence: Identifies price and CVD pivots, highlighting divergence patterns that are crucial for predicting price changes.
Trend Analysis: Colors bars according to trend direction, providing a visual indication of bullish or bearish conditions based on Z-Score.
How It Works
Cumulative Volume Delta (CVD): The CVD is calculated by summing the difference between buying and selling volume for each bar. It represents the net buying or selling pressure, giving insights into market sentiment.
Z-Score Normalization: The Z-Score is applied to the CVD to normalize its values, making it easier to compare current conditions with historical averages. A Z-Score greater than 0 indicates a bullish market, while a Z-Score less than 0 signals a bearish market.
Divergence Detection: The indicator detects regular and hidden bullish and bearish divergences between price and CVD. These divergences often precede trend reversals, offering traders a potential entry point.
Pivot-Based Analysis: The indicator uses pivot highs and lows in both price and CVD to identify divergence patterns. A bullish divergence occurs when price makes a lower low, but CVD fails to follow, suggesting weakening selling pressure. Conversely, a bearish divergence happens when price makes a higher high, but CVD doesn't confirm the move, indicating potential selling pressure.
Trend Coloring: The bars are colored based on the trend direction. Green bars indicate an uptrend (CVD is positive), and red bars indicate a downtrend (CVD is negative). This provides an easy-to-read visualization of market conditions.
Standard Deviation Levels: The indicator plots ±1σ, ±2σ, and ±3σ levels to indicate the degree of deviation from the average CVD. These levels act as thresholds for identifying extreme buying or selling pressure.
Customization Options
Anchor Timeframe: The user can define an anchor timeframe to aggregate the CVD, which can be customized based on the trader’s needs (e.g., daily, weekly, custom lower timeframes).
Z-Score Period: The period for calculating the Z-Score can be adjusted, allowing traders to fine-tune the indicator's sensitivity.
Divergence Detection: The tool offers controls to enable or disable divergence detection, with the ability to adjust the lookback periods for pivot detection.
Trend Coloring and Visuals: Traders can choose whether to color bars based on trend direction, display standard deviation levels, or visualize the data as a histogram or line plot.
Display Options: The indicator also allows for various display options, including showing the Z-Score values and divergence signals, with customizable colors and line widths.
Alerts and Signals
The Cumulative Volume Delta Z Score comes with pre-configured alert conditions for:
Z-Score Crossovers: Alerts are triggered when the Z-Score crosses the 0 line, indicating a potential trend reversal.
Shifting Trend: Alerts for when the Z-Score shifts direction, signaling a change in market sentiment.
Divergence Detection: Alerts for both regular and hidden bullish and bearish divergences, offering potential reversal signals.
Extreme Imbalances: Alerts when the Z-Score reaches extreme positive or negative levels, indicating overbought or oversold market conditions.
Applications in Trading
Trend Identification: Use the Z-Score to confirm bullish or bearish trends based on cumulative volume data, filtering out noise and false signals.
Reversal Signals: Divergences between price and CVD can help identify potential trend reversals, making it a powerful tool for swing traders.
Volume-Based Confirmation: The Z-Score allows traders to confirm price movements with volume data, providing more reliable signals compared to price action alone.
Divergence Strategy: Use the divergence signals to identify potential points of entry, particularly when regular or hidden divergences appear.
Volatility and Market Sentiment: The Z-Score provides insights into market volatility by measuring the deviation of CVD from its historical mean, helping to predict price movement strength.
The Cumulative Volume Delta Z Score is a powerful tool that combines volume analysis with statistical normalization. By focusing on volume imbalances and applying Z-Score normalization, this indicator provides clear, reliable signals for trend identification and potential reversals. It is especially useful for filtering out market noise and ensuring that trades are based on significant price movements driven by substantial volume changes.
This indicator is perfect for traders looking to add volume-based analysis to their strategy, offering a more robust and accurate way to gauge market sentiment and trend strength.
SEIZ - Statistical External & Internal Zones [Pro]Overview
SEIZ (Statistical External & Internal Zones) visualizes how far price typically travels beyond a prior candle’s range (external to previous candles high/low) or within it (internal to previous candles high/low).
It displays percentile thresholds that highlight when movement is statistically common vs. stretched relative to recent structure.
Key Features
• External zones: mark areas where price historically tends to extend beyond the previous range.
Example: a 50th external high percentile is a historically common extension above the prior candle range’s high; a 50th external low percentile is a historically common extension below the prior candle range’s low.
• Internal zones: mark areas where price historically tends to retrace while remaining inside the previous range.
Example: a 50th internal high percentile represents a historically common move that remained within the prior candle range on the high side; similarly for internal low.
• Auto-switching: When "enabled" the indicator will automatically switch to the correct internal or external zones. For example if the indicator is on the daily timeframe it will automatically show external high zones and levels if it has gone above the previous days high. It will then hide/filter out the internal high zones because price is no longer within the previous daily range.
• Multi-time-frame table: summarizes the most significant percentile reached on each enabled timeframe (e.g., 15m → 12h, 1D) with an interval-progress readout. For example if indicator is set to "Daily" it will show the highest level reached within the day under the "High" column, and the lowest level reached in the day under the "Low" column. The "Progress" column shows how much of the timeframe of that row has completed its candle/interval.
• Highly customizable settings:
- "Show Historic": When on will show current interval zones and as many previous intervals as possible
- "Show Intervals 2 Only": When on will show only the current and previous interval zones and levels.
- Choose between drawing lines for levels or zones or both. Customize colors and transparency of zones.
Methodology (transparency)
• SEIZ uses pre-computed, timeframe-specific percentile datasets that quantify typical extensions and retracements observed in historical data.
• The datasets are embedded in the script for deterministic plotting across timeframes; no external connections are used.
• Percentile values reflect empirical frequencies (not assumptions of a normal distribution).
• These levels do not have any prediction power over future price. They are a visual to compare historically where highs and lows most commonly formed for a time period with current price.
How to use
Choose the Timeframe to reference for zones.
Leave Auto external/internal zones filtering ON for regime-aware plotting.
Optional: enable percentile lines (25 / 50 / 75 / 85 / 95) and/or filled zones; adjust opacity and labels to taste.
Set alerts on percentile crosses to be notified when price reaches statistically rare areas.
Treat SEIZ as context; it does not generate entries or exits.
Notes
• Descriptive tool — no prediction or performance claims.
• Percentiles summarize historical behavior and can vary with market conditions.
• Source is protected to safeguard the proprietary construction of percentile datasets.
• Non-standard chart types (e.g., Heikin Ashi, Renko) are for display only.
Credits
Developed by LevelLogic Indicators to help interpret market structure through empirical percentile context.
AlphaTrend - Medium Term Trend Probability Indicator on TOTALESWHAT IS ALPHATREND?
AlphaTrend is a consensus-based trend identification system that combines 7 independent trend detection methodologies into a single probability score. Designed for medium-term trading (days to weeks), it aggregates diverse analytical approaches—from volatility-adjusted moving averages to statistical oscillators—to determine directional bias with quantifiable confidence.
Unlike single-indicator systems prone to false signals during consolidation, AlphaTrend requires majority agreement across multiple uncorrelated methods before generating directional signals, significantly reducing whipsaws in choppy markets.
METHODOLOGY - THE 7-INDICATOR VOTING SYSTEM
Each indicator analyzes trend from a mathematically distinct perspective and casts a vote: +1 (bullish), -1 (bearish), or 0 (neutral). The average of all 7 votes creates the final probability score ranging from -1 (strong bearish) to +1 (strong bullish).
1. FLXWRT RMA (VOLATILITY-ADJUSTED BASELINE)
Method: RMA (Running Moving Average) with ATR-based dynamic bands
Calculation:
RMA = Running MA of price over 12 periods
ATR = Average True Range over 20 periods
Long Signal: Price > RMA + ATR
Short Signal: Price < RMA - ATR
Logic: Trend confirmed only when price breaks beyond volatility-adjusted boundaries, not just the moving average itself. This filters noise by requiring momentum sufficient to overcome recent volatility.
Why it works: Standard MA crossovers generate excessive false signals in ranging markets. Adding ATR bands ensures price has genuine directional momentum, not just minor fluctuations.
Settings:
RMA Length (12): Base trend smoothing
ATR Length (20): Volatility measurement period
2. BOOSTED MOVING AVERAGE (MOMENTUM-ENHANCED TREND)
Method: Double EMA with acceleration boost factor
Calculation:
EMA1 = EMA(close, length)
EMA2 = EMA(close, length/2) // Faster EMA
Boosted Value = EMA2 + sensitivity × (EMA2 - EMA1)
Final = EMA smoothing of Boosted Value
Logic: Amplifies the difference between fast and slow EMAs to emphasize trend momentum. The boost factor (1.3) accelerates response to directional moves while subsequent smoothing prevents over-reaction.
Why it works: Traditional MAs lag price action. The boost mechanism projects trend direction forward by amplifying the momentum differential between two EMAs, providing earlier signals without sacrificing reliability.
Settings:
Length (36): Base EMA period
Boost Factor (1.3): Momentum amplification multiplier
Originality: This is a proprietary enhancement to standard double EMA systems. Most indicators simply cross fast/slow EMAs; this one mathematically projects momentum trajectory.
3. HEIKIN ASHI TREND (T3-SMOOTHED CANDLES)
Method: Heikin Ashi candles with T3 exponential smoothing
Calculation:
Heikin Ashi candles = Smoothed OHLC transformation
T3 Smoothing = Triple-exponential smoothing (Tillson T3)
Signal: T3(HA_Open) crosses T3(HA_Close)
Logic: Heikin Ashi candles filter intrabar noise by averaging consecutive bars. T3 smoothing adds additional filtering using Tillson's generalized DEMA algorithm with custom volume factor.
Why it works: Regular candlesticks contain high-frequency noise. Heikin Ashi transformation creates smoother trends, and T3 smoothing eliminates remaining whipsaws while maintaining responsiveness. The T3 algorithm specifically addresses the lag-vs-smoothness tradeoff.
Settings:
T3 Length (13): Smoothing period
T3 Factor (0.3): Volume factor for T3 algorithm
Percent Squeeze (0.2): Sensitivity adjustment
Technical Note: T3 is superior to simple EMA smoothing because it applies the generalized DEMA formula recursively, reducing lag while maintaining smooth output.
4. VIISTOP (ATR-BASED TREND FILTER)
Method: Simple trend detection using price position vs smoothed baseline with ATR confirmation
Calculation:
Baseline = SMA(close, 16)
ATR = ATR(16)
Uptrend: Close > Baseline
Downtrend: Close < Baseline
Logic: The simplest component—pure price position relative to medium-term average. While basic, it provides a "sanity check" against over-optimized indicators.
Why it works: Sometimes the simplest approach is most robust. In strong trends, price consistently stays above/below its moving average. This indicator prevents the system from over-complicating obvious directional moves.
Settings:
Length (16): Baseline period
Multiplier (2.8): ATR scaling (not actively used in vote logic)
Purpose in Ensemble: Provides grounding in basic trend logic. Complex indicators can sometimes generate counterintuitive signals; ViiStop ensures the system stays aligned with fundamental price positioning.
5. NORMALIZED KAMA OSCILLATOR (ADAPTIVE EFFICIENCY-BASED TREND)
Method: Kaufman Adaptive Moving Average normalized to oscillator format
Calculation:
Efficiency Ratio = |Close - Close | / Sum(|Close - Close |, 8)
Smoothing Constant = ER × (Fast SC - Slow SC) + Slow SC
KAMA = Adaptive moving average using dynamic smoothing
Normalized = (KAMA - Lowest) / (Highest - Lowest) - 0.5
Logic: KAMA adjusts its smoothing speed based on market efficiency. In trending markets (high efficiency), it speeds up. In ranging markets (low efficiency), it slows down. Normalization converts absolute values to -0.5/+0.5 oscillator for consistent voting.
Why it works: Fixed-period moving averages perform poorly across varying market conditions. KAMA's adaptive nature makes it effective in both trending and choppy environments by automatically adjusting its responsiveness.
Settings:
Fast Period (9): Maximum responsiveness
Slow Period (21): Minimum responsiveness
ER Period (8): Efficiency calculation window
Normalization Lookback (35): Oscillator scaling period
Mathematical Significance: Kaufman's algorithm is one of the most sophisticated adaptive smoothing methods in technical analysis. The Efficiency Ratio mathematically quantifies trend strength vs noise.
6. LÉVY FLIGHT RSI (HEAVY-TAILED MOMENTUM)
Method: Modified RSI using Lévy distribution weighting for gains/losses
Calculation:
Weighted Gain = (Max(Price Change, 0))^Alpha
Weighted Loss = (-Min(Price Change, 0))^Alpha
RSI = 100 - (100 / (1 + RMA(Gain) / RMA(Loss)))
Centered RSI = RSI - 50
Logic: Standard RSI treats all price changes linearly. Lévy Flight RSI applies power-law weighting (Alpha = 1.5) to emphasize larger moves, modeling heavy-tailed distributions observed in real market data.
Why it works: Market returns exhibit "fat tails"—large moves occur more frequently than normal distribution predicts. Lévy distributions (Alpha between 1-2) better model this behavior. By weighting larger price changes more heavily, this RSI variant becomes more sensitive to genuine momentum shifts while filtering small noise.
Settings:
RSI Length (14): Standard period
Alpha (1.5): Lévy exponent (1=linear, 2=quadratic)
MA Length (12): Final smoothing
Originality: Standard RSI uses unweighted gains/losses. This implementation applies stochastic process theory (Lévy flights) from quantitative finance to create a momentum indicator more aligned with actual market behavior.
Mathematical Background: Lévy flights describe random walks with heavy-tailed step distributions, observed in financial markets, animal foraging patterns, and human mobility. Alpha=1.5 balances between normal distribution (Alpha=2) and Cauchy distribution (Alpha=1).
7. REGULARIZED-MA OSCILLATOR (Z-SCORED TREND DEVIATION)
Method: Moving average converted to z-score oscillator
Calculation:
MA = EMA(close, 19)
Mean = SMA(MA, 30)
Std Dev = Standard Deviation(MA, 30)
Z-Score = (MA - Mean) / Std Dev
Logic: Converts absolute MA values to statistical standard deviations from mean. Positive z-score = MA above its typical range (bullish), negative = below range (bearish).
Why it works: Raw moving averages don't indicate strength—a 50-day MA at $50k vs $60k has no contextual meaning. Z-scoring normalizes this to "how unusual is current MA level?" This makes signals comparable across different price levels and time periods.
Settings:
Length (19): Base MA period
Regularization Length (30): Statistical normalization window
Statistical Significance: Z-scores are standard in quantitative analysis. This indicator asks: "Is the current trend statistically significant or just random noise?"
AGGREGATION METHODOLOGY
Voting System:
Each indicator returns: +1 (bullish), -1 (bearish), or 0 (neutral)
Total Score = Sum of all 7 votes (-7 to +7)
Average Score = Total / 7 (-1.00 to +1.00)
Signal Generation:
Long Signal: Average > 0 (majority bullish)
Short Signal: Average < 0 (majority bearish)
Neutral: Average = 0 (perfect split or all neutral)
Why Equal Weighting:
Each indicator represents a fundamentally different analytical approach:
Volatility-adjusted (RMA, ViiStop)
Momentum-based (Boosted MA, Lévy RSI)
Adaptive smoothing (KAMA)
Statistical (MA Oscillator)
Noise-filtered (Heikin Ashi T3)
Equal weighting ensures no single methodology dominates. This diversification reduces bias and improves robustness across market conditions.
ORIGINALITY - WHY THIS COMBINATION WORKS
Traditional Multi-Indicator Approaches:
Combine similar indicators (multiple MAs, multiple oscillators)
Use arbitrary thresholds for each indicator
Don't normalize signals (hard to compare RSI to MACD)
Often just "if RSI > 70 AND MACD > 0 = buy"
AlphaTrend MTPI Innovations:
Methodological Diversity: Includes volatility-adaptive (RMA), momentum-enhanced (Boosted MA), efficiency-based (KAMA), heavy-tailed statistics (Lévy RSI), and smoothed candles (HA). No redundant indicators.
Binary Voting: Each indicator reduces to simple +1/-1/0 vote, making aggregation transparent and preventing any indicator from overwhelming the consensus.
Medium-Term Optimization: Parameter choices (12-36 period averages) specifically target multi-day to multi-week trends, not scalping or long-term positioning.
Advanced Mathematics: Incorporates Tillson T3, Kaufman Efficiency Ratio, Lévy distributions, and statistical z-scoring—not just basic MAs and RSIs.
No Overfit Risk: With 7 diverse components voting equally, the system can't overfit to any specific market regime. If trending markets favor KAMA, but choppy markets favor Boosted MA, the ensemble stays robust.
Why 7 Indicators, Not 3 or 10:
Fewer than 5: Insufficient diversification, single indicator failures impact results heavily
More than 9: Diminishing returns, redundancy increases, computational load grows
7 provides: Odd number (no ties), sufficient diversity, manageable complexity
VISUAL COMPONENTS
1. Bar Coloring:
Cyan bars: Bullish consensus (average score > 0)
Magenta bars: Bearish consensus (average score < 0)
No color: Neutral (score = 0 or date filter disabled)
2. MTPI Summary Table (Bottom Center):
MTPI Signal: Current directional bias (LONG/SHORT/NEUTRAL)
Average Score: Precise consensus reading (-1.00 to +1.00)
3. Indicator Status Table (Bottom Right):
Shows all 7 individual indicator scores
Score column: +1 (bullish), -1 (bearish), 0 (neutral)
Signal column: Text interpretation of each vote
Color-coded cells: Cyan (long), Magenta (short), Gray (neutral)
HOW TO USE
For Swing Trading (Recommended - Days to Weeks):
Entry Signals:
Strong Long: 5+ indicators bullish (score ≥ 0.71)
Standard Long: 4+ indicators bullish (score ≥ 0.57)
Weak Long: Simple majority (score > 0) — use with caution
Exit Signals:
Hard Stop: Score flips negative (consensus reverses)
Partial Take Profit: Score drops to +0.30 or below (weakening)
Trailing Stop: Use ATR-based stop below entry
Position Sizing:
Strong signals (|score| > 0.7): Full position
Moderate signals (0.4-0.7): 50-75% position
Weak signals (< 0.4): 25-50% or skip
For Trend Confirmation:
Use alongside your primary strategy for confluence
Only take trades when AlphaTrend agrees with your analysis
Avoid counter-trend trades when score is extreme (|score| > 0.7)
Best Timeframes:
4H: Primary timeframe for swing trading
1D: Position trading and major trend identification
1H: Active trading (shorter hold periods)
< 1H: Not recommended (designed for medium-term)
Market Conditions:
Trending markets: System excels (consensus emerges quickly)
Ranging markets: Expect mixed signals (score oscillates near zero)
High volatility: RMA and ViiStop provide stabilization
Low volatility: KAMA and Boosted MA maintain responsiveness
SETTINGS EXPLAINED
General Settings:
Use Date Filter: Enable/disable historical backtesting range
Start Date: When to begin signal generation (default: Jan 1, 2018)
Flxwrt RMA Settings:
RMA Length (12): Base trend smoothing
ATR Length (20): Volatility measurement period
Source: Price input (default: close)
Boosted MA Settings:
Length (36): Base EMA period
Boost Factor (1.3): Momentum amplification
Source: Price input
Heikin Ashi Settings:
Percent Squeeze (0.2): Sensitivity adjustment
T3 Factor (0.3): Tillson volume factor
T3 Length (13): Smoothing period
ViiStop Settings:
Length (16): Baseline period
Multiplier (2.8): ATR scaling
Source: Price input
KAMA Settings:
Fast Period (9): Maximum responsiveness
Slow Period (21): Minimum responsiveness
ER Period (8): Efficiency calculation
Normalization Lookback (35): Oscillator scaling
Levy RSI Settings:
RSI Length (14): Standard period
Alpha (1.5): Lévy exponent (power-law weighting)
MA Length (12): Final smoothing
Source: Price input
MA Oscillator Settings:
Length (19): Base MA period
Regularize Length (30): Z-score normalization window
PERFORMANCE CHARACTERISTICS
Strengths:
✅ Reduced whipsaws vs single indicators
✅ Works across varying market conditions (adaptive components)
✅ Transparent methodology (see every vote)
✅ Customizable to trading style via timeframe selection
✅ No curve-fitting (equal weighting, no optimization)
Limitations:
⚠️ Medium-term focus (not for scalping or very long-term)
⚠️ Lagging by design (consensus requires confirmation)
⚠️ Less effective in violent reversals (momentum carries votes)
⚠️ Requires clean price data (gaps/thin volume can distort)
ALERTS & AUTOMATION
No built-in alerts in current version (visual-only indicator). Users can create custom alerts based on:
Bar color changes (cyan to magenta or vice versa)
Average score crossing above/below thresholds
Specific indicator status changes in the table
BEST PRACTICES
Risk Management:
Never risk more than 1-2% per trade regardless of score
Use stop losses (ATR-based recommended)
Scale positions based on signal strength
Don't average down on losing positions
Combining with Other Analysis:
✅ Support/Resistance levels for entries
✅ Volume confirmation (accumulation/distribution)
✅ Market structure (higher highs/lower lows)
✅ Volatility regimes (adjust position size)
❌ Don't combine with redundant trend indicators (adds no value)
❌ Don't override strong consensus with gut feeling
❌ Don't use on news-driven spikes (wait for stabilization)
Backtesting Notes:
Use "Date Filter" to test specific periods
Forward-test before live deployment
Remember: consensus systems perform best in trending markets, expect reduced edge in ranges
IMPORTANT NOTES
Not a standalone strategy - Use with proper risk management
Requires clean data - Works best on liquid markets with tight spreads
Medium-term by design - Don't expect scalping signals
No magic - No indicator predicts the future; this shows current trend probability
Diversification within - The 7-component ensemble IS the diversification strategy
Not financial advice. This indicator identifies medium-term trend probability based on multi-component consensus. Past performance does not guarantee future results. Always use proper risk management and position sizing.
AlphaBTC - Long Term Trend Probability Indicator on BitcoinWHAT IS ALPHABTC?
AlphaBTC is a consensus-based long-term trend probability indicator designed specifically for Bitcoin and cryptocurrency markets. It combines 9 independent trend detection methodologies into a single probabilistic score ranging from -1 (strong bearish) to +1 (strong bullish). Unlike single-indicator systems that can produce frequent false signals, AlphaBTC requires agreement across multiple analytical frameworks before generating directional signals.
METHODOLOGY - THE 9-INDICATOR CONSENSUS MODEL
Each indicator analyzes trend from a different mathematical perspective, providing a binary vote: +1 (bullish), -1 (bearish), or 0 (neutral). The average of all 9 votes creates the final probability score.
1. AADTREND (Average Absolute Deviation Trend)
Method: Calculates average absolute deviation from a moving average using 7 different MA types (SMA, EMA, HMA, DEMA, TEMA, RMA, FRAMA)
Logic: Price crossovers above/below AAD-adjusted bands signal trend changes
Purpose: Adapts to varying market volatility conditions
2. GAUSSIAN SMOOTH TREND (GST)
Method: Multi-stage smoothing using DEMA → Gaussian Filter → SMMA → Standard Deviation bands
Logic: Long when price > (SMMA + SDmultiplier), Short when price < (SMMA - SDmultiplier)
Purpose: Removes high-frequency noise while preserving trend structure
3. RTI (RELATIVE TREND INDEX)
Method: Percentile-based ranking system comparing current price to historical upper/lower trend boundaries
Logic: Generates 0-100 index score; >80 = bullish, <20 = bearish
Purpose: Identifies price position within statistical distribution
4. HIGHEST-LOWEST DEVIATIONS TREND
Method: Dual moving average system (100/50 periods) with dynamic standard deviation bands
Logic: Compares highest and lowest boundaries from both MAs to determine trend extremes
Purpose: Identifies breakouts from multi-timeframe volatility envelopes
5. 25-75 PERCENTILE SUPERTREND
Method: Modified SuperTrend using 25th and 75th percentile bands instead of simple highs/lows
Logic: ATR-based trailing stop system anchored to percentile boundaries
Purpose: More stable trend following by filtering outlier price spikes
6. TS VOLATILITY-ADJUSTED EWMA
Method: Exponentially Weighted Moving Average with dynamic period adjustment based on ATR
Logic: Speeds up during high volatility, slows during low volatility
Purpose: Adaptive responsiveness to changing market conditions
7. NORMALIZED KAMA OSCILLATOR
Method: Kaufman Adaptive Moving Average normalized to 0-centered oscillator
Logic: Uses Efficiency Ratio to adjust smoothing constant; >0 = bullish, <0 = bearish
Purpose: Adapts to both trending and ranging markets automatically
8. EHLERS MESA ADAPTIVE MOVING AVERAGE (EMAMA)
Method: John Ehlers' MAMA/FAMA system using Hilbert Transform for cycle period detection
Logic: MAMA crossover FAMA = bullish, crossunder = bearish
Purpose: Advanced DSP-based trend detection with phase-based adaptation
9. EMA Z-SCORE
Method: Statistical z-score applied to EMA values over lookback period
Logic: >1.0 standard deviation = bullish, <0.0 = bearish
Purpose: Identifies statistically significant trend deviations
AGGREGATION METHODOLOGY
Scoring System:
Each indicator produces: +1 (bullish), -1 (bearish), or 0 (neutral)
Total score = sum of all 9 indicators (-9 to +9)
Average score = total / 9 (displayed as -1.00 to +1.00)
Signal Interpretation:
+0.50 to +1.00: STRONG BULLISH (majority consensus)
+0.30 to +0.50: MODERATE BULLISH
-0.30 to +0.30: WEAK/NEUTRAL (mixed signals)
-0.50 to -0.30: MODERATE BEARISH
-1.00 to -0.50: STRONG BEARISH (majority consensus)
Bar Coloring:
Cyan bars: Bullish consensus (score > 0)
Magenta bars: Bearish consensus (score < 0)
WHY THIS APPROACH WORKS
Traditional Single-Indicator Problems:
Overfitting to specific market conditions
High false signal rates during consolidation
No mechanism for confidence measurement
AlphaBTC Multi-Consensus Solution:
Diversification: 9 uncorrelated methodologies reduce individual indicator bias
Robustness: Requires majority agreement before signaling (prevents whipsaws)
Adaptability: Mix of momentum, volatility, and statistical indicators captures multiple market regimes
Confidence Measurement: Score magnitude indicates signal strength
Why These 9 Specific Indicators:
AADTrend - Volatility adaptation
GST - Noise filtering
RTI - Statistical positioning
HL Deviations - Multi-timeframe breakouts
Percentile ST - Robust trend following
Volatility EWMA - Dynamic responsiveness
KAMA - Efficiency-based adaptation
EMAMA - Cycle-period awareness
EMA Z-Score - Statistical confirmation
This combination covers:
Trend following (ST, EWMA, KAMA, EMAMA)
Volatility adaptation (AAD, GST, HL Dev, EWMA)
Statistical validation (RTI, Z-Score)
Adaptive smoothing (KAMA, EMAMA, Gaussian)
No single indicator covers all these bases. The ensemble approach creates a more reliable system.
VISUAL COMPONENTS
1. Score Table (Bottom Right):
Shows all 9 individual indicator scores
Color-coded: Green (bullish), Red (bearish), Gray (neutral)
Individual signals visible for transparency
2. Main Score Display (Bottom Center):
LTPI SCORE: The averaged consensus (-1.00 to +1.00)
SIGNAL: Current directional bias (LONG/SHORT)
STRENGTH: Signal confidence (STRONG/MODERATE/WEAK)
3. Bar Coloring:
Visual trend indication directly on price bars
Cyan = bullish consensus
Magenta = bearish consensus
HOW TO USE
For Long-Term Position Trading (Recommended):
Wait for average score to cross above 0 for long entries
Exit when score crosses below 0 or reverses to negative territory
Use STRENGTH indicator - only trade STRONG or MODERATE signals
For Trend Confirmation:
Use AlphaBTC as confluence with your existing strategy
Enter trades only when AlphaBTC agrees with your analysis
Avoid counter-trend trades when consensus is strong (|score| > 0.5)
Risk Management:
STRONG signals (|score| > 0.5): Full position size
MODERATE signals (0.3-0.5): Reduced position size
WEAK signals (< 0.3): Avoid trading or use for exits only
Best Timeframes:
1D chart: Primary trend identification for swing/position trading
4H chart: Intermediate trend for multi-day holds
1H chart: Short-term trend for active trading
Not Recommended:
Scalping (too many indicators create lag)
Timeframes < 1H (designed for longer-term trends)
SETTINGS EXPLAINED
Each of the 9 indicators has customizable parameters in its dedicated settings group:
AadTrend Settings:
Average Length (48): Base period for deviation calculation
AAD Multiplier (1.35): Band width adjustment
Average Type: Choose from 7 different MA types
GST Settings:
DEMA Length (9), Gaussian Length (4), SMMA Length (13)
SD Length (66): Standard deviation lookback
Multipliers for upper/lower bands
RTI Settings:
Trend Length (75): Historical data points for boundary calculation
Sensitivity (88%): Percentile threshold
Long/Short Thresholds (80/20): Entry trigger levels
HL Deviations Settings:
Dual MA system (100/50 periods)
Separate deviation coefficients for upper/lower bands
25-75 Percentile ST Settings:
SuperTrend Length (100)
Multiplier (2.35)
Percentile Length (50)
EWMA Settings:
Length (81), ATR Lookback (14)
Volatility Factor (1.0) for dynamic adjustment
KAMA Settings:
Fast/Slow Periods (50/100)
Efficiency Ratio Period (8)
Normalization Lookback (53)
EMAMA Settings:
Fast/Slow Limits (0.08/0.01) for cycle adaptation
EMA Z-Score Settings:
EMA Length (50)
Lookback Period (25)
Threshold levels for long/short signals
ALERTS
Four alert conditions available:
LTPI Long Signal: When average score crosses above 0
LTPI Short Signal: When average score crosses below 0
LTPI Long: Any bar with bullish consensus
LTPI Short: Any bar with bearish consensus
IMPORTANT NOTES
This is a CONSENSUS indicator - it shows probability, not prediction
Designed for Bitcoin
Best for long-term trend identification (days to weeks, not minutes to hours)
Lagging by design - prioritizes accuracy over speed
Not a standalone strategy - use with proper risk management and position sizing
Requires minimum 100+ bars of historical data for proper indicator calculation
Evergreen Solutions - ONEOverview
ONE is a strategy designed for all markets that captures short-term momentum in high-volatility conditions. It integrates RSI, volume analysis, chop filters, and moving to identify when markets shift from range-based choppiness to high-probability opportunities. The system is structured to be reactive, focusing on trades with strong volatility expansion and statistically favorable win potential.
ONE is a protected script because it’s long and short signals are based off of custom coded confirmations. That is what makes our script unique.
How to Use It
- Equities: A reliable options or swing-trading companion for large-cap tickers.
- Futures: Refined for intraday structure on index products.
- Forex: Designed to reduce false starts on illiquid currency pairs.
- Crypto: Tailored for the volatility of 24/7 markets while maintaining composure in high volatility.
When ONE executes a trade, a SL and TP plot is generated using an ATR range. These plots serve as delineated boundaries for the trade. Simply place your SL and TP, and walk away.
Modes of Operation
ONE Mode – A single-entry, single-exit design for simplicity.
Breakeven Mode – Shifts the stop to entry once a defined profit threshold is met, protecting capital in uncertain markets.
Multi Mode – Scales entries and exits to capture extended runs and adapt to different volatility regimes.
Conceptual Logic
Trend Detection: Uses custom and standard moving averages to define short-term directional bias.
Volatility Filter: Custom chop filters suppress trades during ranging price action.
Momentum Signal: RSI combined with volume analysis highlights moments of rapid volatility expansion and strong price acceleration.
Execution Rule: All trades trigger only on bar open; no repainting or lookahead data is used.
What Makes ONE Different
ONE’s originality lies in it’s trading modes and the integration of multiple filters (RSI + volume + choppiness + adaptive MAs) into a single framework. This reduces conflicting signals, emphasizes risk control, and keeps decision-making transparent for the trader.
- Consistency: ONE adapts seamlessly to all markets. It does not rely on hidden market structure; its design is universal.
- Simplicity: No learning curve. ONE was built so any trader — beginner or advanced — can trade immediately.
- Risk: Every mode respects capital preservation. Decisions are made to avoid catastrophic losses.
- Transparency: New positions enter only on bar open, with no hidden repainting or misleading lookaheads.
- Structure: ONE reflects the discipline of professional trading: structured, rules-based, and repeatable under changing conditions.
Backtest Defaults
Symbol: CME_MINI:NQ1!
Backtest range: Oct 13, 2024 – Oct 13, 2025
Account size: $10,000
Total trades: 469
Win rate: 68%
Total P&L: $97,014
Profit factor: 1.54
Sharpe ratio: 0.68
Sortino ratio: 9.59
Commission:$0.88 / contract
Slippage: 1 tick
Limitations
ONE does not guarantee profits. Effectiveness depends on liquidity, volatility, and market conditions. Past results do not imply future returns.