Kalman Hull Bands For Loop | RakoQuant Kalman Hull Bands For Loop | RakoQuant
RakoQuant | Kalman Hull Bands For Loop is a trend-following breakout + regime tool built to keep you on the right side of the market with clean structure and minimal noise. It combines a Kalman Filter (noise reduction), a Hull Moving Average baseline (responsive trend anchor), and a standard deviation envelope computed via a for-loop (robust rail bands) to define actionable bullish and bearish regimes.
What it does
This indicator builds a dynamic “rail system” around price:
Kalman Filtered Source → reduces measurement noise in the input series.
Hull Baseline (HMA) → fast trend baseline built on the Kalman-filtered source.
Deviation Bands (“Rails”) → upper/lower rails based on a loop-calculated standard deviation.
Regime Breakout Logic → trend regime flips only when price breaks out beyond the rails:
Bullish regime when close crosses above the upper rail
Bearish regime when close crosses below the lower rail
Once a regime is established, the tool highlights the active rail in bright neon and fades the inactive rail (optional), giving you a clear “trend corridor” and a strong visual state.
Key Features
1) Kalman Noise Filtering (R & Q)
The Kalman filter smooths the selected source using:
R (Measurement Noise) – how noisy you assume the observations are
Q (Process Noise) – how quickly the model is allowed to adapt
This helps reduce chop without turning the indicator into a laggy moving average.
2) Hull Baseline (fast + smooth)
The baseline is a Hull Moving Average applied to the Kalman-filtered source:
responsive in trend,
cleaner during transitions,
ideal for breakout regime detection.
3) Deviation Envelope with Two Modes
Deviation rails are calculated using a for-loop standard deviation (population stdev), with two choices:
Residual vs Baseline (default): deviation of (src - baseline)
→ focuses on “distance from fair value” instead of raw price volatility
Raw Source: deviation of the source itself
→ classic volatility envelope behavior
Then bands are formed by:
upper = baseline + mult * sd
lower = baseline - mult * sd
4) Regime Rails + Candle Painting (RakoQuant Neon)
Bull regime: active lower rail plotted in Neon Aqua
Bear regime: active upper rail plotted in Neon Magenta
Candles are painted to match the current state (optional)
Inactive rails can be shown faintly for context.
5) Alerts for Breakouts
Built-in alerts trigger exactly on regime flips:
Bull Breakout (close crosses above upper rail)
Bear Breakout (close crosses below lower rail)
How to Use It
Trend-following approach
Stay with the active regime until a breakout flip occurs.
In bull regime, the lower rail behaves like an adaptive trend support guide.
In bear regime, the upper rail behaves like an adaptive trend resistance guide.
Breakout confirmation
Use the breakout as a confirmation layer with your other confluences:
take longs only after a bull breakout,
take shorts only after a bear breakout,
filter mean-reversion trades by the regime state.
Inputs Summary
Source: select what the model tracks (default: high)
Kalman: R / Q controls smoothing vs responsiveness
Baseline: Hull length
Deviation: loop length, mode (Residual vs Baseline / Raw Source), multiplier
Visuals: candle painting, baseline visibility, inactive rails
Disclaimer
Backtests are based on historical data and are not indicative of future performance.
:
Educational
10 Youtube Opening Range Strategies + Backtest 1. Quick Flip Scalper
A strategy centered on fading or following the initial move relative to the Opening Range (OR).
LONG Rules:
Reversal Mode: If the Opening Range is Bearish (Red), enter Long when price drops below the Opening Range Low (ORL).
Continuity Mode: If the Opening Range is Bullish (Green), enter Long when price drops below the Opening Range Low (ORL) (Buying the deep pullback/trap).
SHORT Rules:
Reversal Mode: If the Opening Range is Bullish (Green), enter Short when price breaks above the Opening Range High (ORH).
Continuity Mode: If the Opening Range is Bearish (Red), enter Short when price breaks above the Opening Range High (ORH) (Selling the deep pullback/trap).
2. First Candle Scalper
Identical to the Quick Flip Scalper but restricts entries to the very first retest only.
LONG Rules:
Same as Quick Flip Long, but only triggers once per session.
SHORT Rules:
Same as Quick Flip Short, but only triggers once per session.
3. Smart Money Trap (SMT)
Identifies a "fakeout" breakout followed immediately by a reversal candlestick pattern.
LONG Rules:
Condition: The previous candle low was below the ORL, but the candle closed back inside (above ORL).
Trigger: Must have a Bullish Engulfing or Bullish Rejection pattern closing above the ORL.
SHORT Rules:
Condition: The previous candle high was above the ORH, but the candle closed back inside (below ORH).
Trigger: Must have a Bearish Engulfing or Bearish Rejection pattern closing below the ORH.
4. Trident Pattern (TG Capital)
A London-session exclusive strategy requiring a Fair Value Gap (FVG) and a Doji confirmation.
LONG Rules:
Filter: Price is Above the 200 EMA (if enabled).
Setup: A Bullish FVG forms.
Confirmation: A Doji candle wicks down into the 50% level of the FVG.
Trigger: Enter on the next candle close.
SHORT Rules:
Filter: Price is Below the 200 EMA (if enabled).
Setup: A Bearish FVG forms.
Confirmation: A Doji candle wicks up into the 50% level of the FVG.
Trigger: Enter on the next candle close.
5. OTE Framework (MBB Trader)
Simulates an Optimal Trade Entry by combining a Liquidity Sweep with a Market Structure Shift (SMR).
LONG Rules:
Sweep: Price drops below the lowest low of the last 20 candles.
Structure: A Bullish SMR forms (Low → High → Lower Low → Higher High).
SHORT Rules:
Sweep: Price breaks above the highest high of the last 20 candles.
Structure: A Bearish SMR forms (High → Low → Higher High → Lower Low).
6. Liquidity Trap (Marco Trades)
A contrarian strategy that buys/sells purely on sweeps of major structural levels.
LONG Rules:
Trigger: Price sweeps (drops below) the lowest low of the last 50 candles.
SHORT Rules:
Trigger: Price sweeps (breaks above) the highest high of the last 50 candles.
7. Trojan Horse (Trader Mayne)
Uses Trend EMAs (50 & 200) to identify direction, then enters on a Lower Timeframe Breaker.
LONG Rules:
Trend: 50 EMA > 200 EMA (Uptrend).
Trigger: Price sweeps a recent 10-candle low, then immediately breaks a recent 5-candle high.
SHORT Rules:
Trend: 50 EMA < 200 EMA (Downtrend).
Trigger: Price sweeps a recent 10-candle high, then immediately breaks a recent 5-candle low.
8. Simplified SMT (9:30 Range)
Focuses on the 9:30 AM range. Waits for a breakout and a confirmed failure to sustain it.
LONG Rules:
Context: Price previously broke above the ORH.
Trigger: Price returns to the ORH (Retest) with a Bullish Engulfing/Rejection pattern.
SHORT Rules:
Context: Price previously broke below the ORL.
Trigger: Price returns to the ORL (Retest) with a Bearish Engulfing/Rejection pattern.
9. 9:30 One-Candle (Scarface)
Uses the high/low of the single 9:30 candle as the range.
LONG Rules:
Setup: Price closes above the 9:30 High.
Trigger: Price pulls back and touches/dips into the 9:30 High (Retest).
SHORT Rules:
Setup: Price closes below the 9:30 Low.
Trigger: Price pulls back and touches/wicks into the 9:30 Low (Retest).
10. London Breakout (Joovier)
Based on the 3 AM - 9 AM EST box.
LONG Rules:
Trigger: A candle's Body (Open and Close) forms completely above the Box High after the session opens.
SHORT Rules:
Trigger: A candle's Body (Open and Close) forms completely below the Box Low after the session opens.
⚠️ DISCLAIMER & LIMITATION OF LIABILITY
1. NO AFFILIATION / INDEPENDENT PROJECT This script is an independent coding project created solely for testing, research, and entertainment purposes. The creator of this indicator is not associated, affiliated, endorsed by, or in any way connected to the strategy authors or influencers mentioned within the tool (including but not limited to TG Capital, MBB Trader, Marco Trades, Trader Mayne, Scarface, or Joovier).
The strategy names are used strictly for identification purposes to credit the original concept creators.
This code represents an independent interpretation of public trading concepts. It may not reflect the exact, proprietary, or private methods taught by these individuals.
This is not an official product from any of the aforementioned parties.
2. FOR EDUCATIONAL PURPOSES ONLY This indicator is strictly for educational and informational purposes. It is not a signal service and does not constitute investment, financial, or trading advice. The buy/sell labels generated by this script are merely visual representations of specific code logic and should not be interpreted as instructions to execute trades.
3. EXCLUSION OF LIABILITY By using this script, you explicitly agree that:
The creator assumes no responsibility or liability for any direct, indirect, consequential, or incidental losses or damages resulting from the use of this tool.
You engage in trading entirely at your own risk.
You release the creator from any legal responsibility regarding your trading activities or financial results.
4. HYPOTHETICAL PERFORMANCE The statistics displayed on the "Dashboard" (Win Rate, P&L, etc.) are hypothetical and based on historical backtesting data.
Past performance is not indicative of future results.
These results do not account for slippage, spreads, commission fees, or real-time liquidity issues.
Strategies that performed well in the past may fail in current or future market conditions.
5. HIGH-RISK WARNING Trading in financial markets (Stocks, Forex, Crypto, Futures) involves a high degree of risk and is not suitable for all investors. You could lose some or all of your initial investment. You should not trade with money that you cannot afford to lose.
IF YOU DO NOT AGREE WITH THESE TERMS, DO NOT USE THIS SCRIPT.
MVRV Ratio Indicator [captainua]MVRV Ratio Indicator - Market Value to Realized Value Ratio
Overview
This professional indicator calculates and visualizes the MVRV (Market Value to Realized Value) ratio (raw, non-Z-score) with optional MVRV-Z overlay, comparing current market capitalization to realized capitalization to help identify potential market tops and bottoms for cryptocurrency markets.
Unlike MVRV-Z which normalizes the ratio using standard deviation (creating a Z-score), the raw MVRV ratio provides direct comparison between market cap and realized cap. This indicator enhances the raw ratio with historical percentile bands, percentile rank calculation, divergence detection, historical event logging, dynamic color gradients, enhanced visualization options, optional MVRV-Z comparison, and NEW advanced metrics including Risk Score, MVRV Momentum, Time in Zone tracking, and Price Target calculations.
NEW Features in This Version:
• Risk Score (0-100): Composite indicator based on MVRV level and percentile rank for instant risk assessment
• MVRV Momentum: Rate of change indicator showing trend direction (↑ Increasing, ↓ Decreasing, → Flat)
• Time in Zone: Tracks how long MVRV has been in the current zone (top/bottom/neutral) in bars
• Price Targets: Calculates price levels at key MVRV thresholds (fair value, top, bottom)
• Input Validation: Warns about invalid parameter combinations (e.g., extreme thresholds out of order)
• Multiple Smoothing Options: SMA, EMA, WMA, RMA for noise reduction
• Performance Optimized: Cached request.security() calls, ta.percentrank() for efficiency
• Human-Readable Timestamps: Event log now shows dates (YYYY-MM-DD) instead of bar indices
Core Calculations
MVRV Ratio Calculation:
The script calculates MVRV ratio using the standard formula: MVRV Ratio = Market Cap / Realized Cap. This formula provides a direct ratio without normalization, showing how many times the current market cap exceeds (or falls below) the realized cap.
Market Capitalization (Market Cap): The total market value of all coins in circulation, calculated as current price × circulating supply. This represents the market's current valuation of the asset.
Realized Capitalization (Realized Cap): The sum of the value of each coin when it last moved on-chain, representing the average cost basis of all coins.
Raw Ratio Interpretation:
- Ratio > 3.5: Extreme overvaluation (market cap significantly above realized cap)
- Ratio 2.5-3.5: Moderate overvaluation
- Ratio 1.0-2.5: Fair value to moderate overvaluation
- Ratio 0.8-1.0: Fair value to moderate undervaluation
- Ratio < 0.8: Undervaluation (market cap close to or below realized cap)
Risk Score (NEW):
Composite risk indicator ranging from 0-100:
- 80-100: Very High Risk (extreme overvaluation)
- 60-80: High Risk (overvaluation)
- 40-60: Moderate Risk (fair value range)
- 20-40: Low Risk (undervaluation)
- 0-20: Very Low Risk (extreme undervaluation)
The risk score uses percentile rank when available, or normalizes MVRV ratio to the 0-100 scale based on configured thresholds.
MVRV Momentum (NEW):
Rate of change indicator showing trend direction:
- ↑ Increasing: MVRV ratio rising (momentum > 0.01)
- ↓ Decreasing: MVRV ratio falling (momentum < -0.01)
- → Flat: MVRV ratio stable
- Displays percentage change over configurable period (default: 14 bars)
Time in Zone (NEW):
Tracks duration in current zone:
- Top Zone: Bars spent above top threshold (3.5)
- Bottom Zone: Bars spent below bottom threshold (0.8)
- Neutral Zone: Bars spent between thresholds
- Resets when zone changes
- Helps identify prolonged extreme conditions
Price Targets (NEW):
Calculates price levels at key MVRV thresholds:
- Price @ Fair Value: Price when MVRV = 1.0
- Price @ Top Threshold: Price when MVRV = 3.5
- Price @ Bottom Threshold: Price when MVRV = 0.8
- Based on estimated realized price (current price / MVRV ratio)
Data Source Selection:
The indicator supports multiple data source options for maximum flexibility:
Glassnode (Recommended):
- Uses Glassnode Market Cap data
- Calculates MVRV from Market Cap / Realized Cap
- Symbol format: GLASSNODE:{TOKEN}_MARKETCAP
- Requires Glassnode data subscription
- Also requires CoinMetrics for Realized Cap
- Best for comprehensive analysis with MVRV-Z comparison
IntoTheBlock:
- Direct MVRV ratio data from IntoTheBlock
- Simplest option - no calculations required
- Works for BTC and other supported tokens
- Symbol format: INTOTHEBLOCK:{TOKEN}_MVRV
- Requires IntoTheBlock data subscription on TradingView
Historical Percentile Bands:
The indicator calculates rolling percentile bands over a configurable period (default: 500 bars):
- 5th Percentile: Very low historical values (extreme undervaluation range)
- 25th Percentile: Lower quartile (undervaluation range)
- 50th Percentile: Median (fair value center)
- 75th Percentile: Upper quartile (overvaluation range)
- 95th Percentile: Very high historical values (extreme overvaluation range)
Percentile bands use ta.percentile_nearest_rank() for efficient calculation.
Percentile Rank:
Percentile rank shows where the current MVRV ratio sits in the historical distribution (0-100%):
- 0-25%: Bottom quartile (undervaluation)
- 25-50%: Lower half (moderate undervaluation to fair value)
- 50-75%: Upper half (fair value to moderate overvaluation)
- 75-100%: Top quartile (overvaluation)
Now uses efficient ta.percentrank() instead of array-based calculation.
Input Validation (NEW):
The indicator validates input parameters and displays warnings for:
- Extreme High Threshold should be > Top Threshold
- Extreme Low Threshold should be < Bottom Threshold
- Min Lookback Range must be < Max Lookback Range
- Top Threshold should be > Moderate Overvalued
- Moderate Overvalued should be > Fair Value
- Fair Value should be > Bottom Threshold
- Rapid Increase Threshold should be > 0
- Rapid Decrease Threshold should be < 0
Smoothing Options (Enhanced):
Multiple smoothing types available:
- SMA: Simple Moving Average (equal weight)
- EMA: Exponential Moving Average (more weight to recent)
- WMA: Weighted Moving Average (linear weight)
- RMA: Running Moving Average (Wilder's smoothing)
Reference Levels
Overvalued (Potential Top) - 3.5:
The 3.5 level indicates potentially extreme overvaluation. When MVRV ratio exceeds this threshold:
- Market cap is significantly above realized cap
- Potential selling opportunities for profit-taking
- Risk of market corrections or reversals
- Risk Score typically >80 (Very High Risk)
Moderately Overvalued - 2.5:
The 2.5 level indicates moderate overvaluation:
- Market cap is above realized cap but not extreme
- Caution warranted but not necessarily sell signal
- Risk Score typically 60-80 (High Risk)
Fair Value - 1.0:
The 1.0 level indicates fair valuation:
- Market cap equals realized cap
- Balanced market conditions
- Risk Score typically 40-60 (Moderate Risk)
Undervalued (Potential Bottom) - 0.8:
The 0.8 level indicates potentially undervalued conditions:
- Market cap is close to or below realized cap
- Potential buying opportunities for accumulation
- Risk Score typically <40 (Low Risk)
Visual Features
MVRV Ratio Line:
The main indicator line displays the calculated MVRV ratio with dynamic color gradient:
- Bright Red: Extreme overvaluation (ratio ≥ top threshold + 0.5)
- Orange: High overvaluation (ratio ≥ top threshold)
- Cornflower Blue: Neutral/Fair value (around fair value level)
- Deep Sky Blue: Low/Undervaluation (ratio ≤ bottom threshold)
- Bright Green: Extreme undervaluation (ratio ≤ bottom threshold - 0.1)
Can also be displayed as histogram/bar chart.
Historical Percentile Bands:
Five percentile bands with optional fills:
- 5th Percentile (Blue): Very low historical range
- 25th Percentile (Blue): Lower quartile
- 50th Percentile (Gray): Historical median
- 75th Percentile (Orange): Upper quartile
- 95th Percentile (Red): Very high historical range
Reference Lines:
Horizontal reference lines at key levels (all customizable):
- Top Threshold (default 3.5): Purple/violet
- Moderate Overvalued (default 2.5): Orange
- Fair Value (1.0): Gray
- Bottom Threshold (default 0.8): Blue
Background Highlights:
Optional background color highlights:
- High Zone (Maroon/Red): MVRV ratio ≥ top threshold
- Low Zone (Green): MVRV ratio ≤ bottom threshold
Divergence Detection:
Advanced divergence detection between price and MVRV ratio:
- Regular Bullish Divergence: Price lower low + MVRV higher low
- Regular Bearish Divergence: Price higher high + MVRV lower high
- Hidden Bullish Divergence: Price higher low + MVRV lower low
- Hidden Bearish Divergence: Price lower high + MVRV higher high
- Visual markers with icons (🐂/🐻) and connecting lines
Historical Event Log (Enhanced):
Comprehensive event tracking:
- Tracks zone entries/exits, extreme values, cross events
- Now displays human-readable dates (YYYY-MM-DD) instead of bar indices
- Color-coded events (red for top/high, green for bottom/low)
- Configurable log size (5-50 events)
Information Table (Enhanced):
Comprehensive on-chart table with NEW metrics:
Current Values:
- MVRV Ratio: Current ratio value
- Percentile Rank: Position in historical distribution (0-100%)
- Risk Score (NEW): Composite risk indicator (0-100) with risk level
- Market Status: Current market condition
- Signal: Trading signal (Strong Buy/Buy/Hold/Sell/Strong Sell)
- MVRV Momentum (NEW): Trend direction with percentage change
- Time in Zone (NEW): Current zone and duration in bars
Price Information (Enhanced):
- Current Price: Current market price
- Est. Realized Price: Estimated realized price
- Price @ Fair Value (NEW): Price when MVRV = 1.0
- Price @ Top Threshold (NEW): Price when MVRV = 3.5
- Price @ Bottom Threshold (NEW): Price when MVRV = 0.8
Other Metrics:
- Percentile Bands: Range from 5th to 95th percentile
- MVRV-Z Score: Z-score value (when comparison enabled)
- Change (1D/1W/1M): Ratio change over timeframes
- To Top/Bottom: Percentage distance to key levels
- Historical Range: Percentage below ATH / above ATL
- 30D Volatility: Standard deviation
Historical Event Log:
- Recent events with dates and values
- Color-coded for quick identification
Alert System
Comprehensive alerting capabilities:
Zone Alerts:
- Top Zone Entry/Exit
- Bottom Zone Entry/Exit
Cross Alerts:
- Cross Above/Below Top Threshold
- Cross Above/Below Fair Value (1.0)
Extreme Value Alerts:
- Extreme High (configurable, default: 4.5)
- Extreme Low (configurable, default: 0.7)
Rate of Change Alerts:
- Rapid Increase/Decrease
Divergence Alerts:
- Bullish/Bearish Divergence
- Hidden Bullish/Bearish Divergence
All alerts support cooldown to prevent spam.
Usage Instructions
Getting Started:
1. Select data source (Glassnode recommended)
2. Enable Risk Score for composite risk assessment (0-100)
3. Enable MVRV Momentum to track trend direction
4. Enable Time in Zone to see zone duration
5. Enable Price Targets to see price levels at key thresholds
6. Use weekly timeframe for cleaner signals
Risk-Based Position Sizing:
Use Risk Score to guide position sizing:
- Risk Score >80 (Very High Risk): Reduce/exit positions
- Risk Score 60-80 (High Risk): Smaller positions, caution
- Risk Score 40-60 (Moderate Risk): Normal positions
- Risk Score 20-40 (Low Risk): Larger positions opportunity
- Risk Score <20 (Very Low Risk): Strong accumulation zone
Momentum-Based Analysis:
Use MVRV Momentum for trend confirmation:
- ↑ Increasing + High MVRV: Late bull market, caution
- ↑ Increasing + Low MVRV: Recovery phase, bullish
- ↓ Decreasing + High MVRV: Distribution, potential top
- ↓ Decreasing + Low MVRV: Capitulation, accumulation opportunity
Zone Duration Analysis:
Use Time in Zone for context:
- Extended time in Top Zone: Late cycle, increased reversal risk
- Extended time in Bottom Zone: Accumulation opportunity
- Quick zone transitions: Higher volatility regime
Price Target Usage:
Use Price Targets for planning:
- Price @ Fair Value: Natural equilibrium level
- Price @ Top Threshold: Potential distribution target
- Price @ Bottom Threshold: Potential accumulation target
Technical Specifications
- Pine Script Version: v6
- Indicator Type: Non-overlay (displays in separate panel)
- Repainting Behavior: Minimal - calculations based on confirmed bar data
- Performance: Optimized with cached request.security() calls and ta.percentrank()
- Input Validation: Validates parameter combinations with warnings
- Compatibility: Works on all timeframes (data sources provide daily resolution)
- Edge Case Handling: Zero-division protection, NA value handling, boundary checks
Performance Optimizations:
- Cached request.security() calls for Market Cap, Realized Cap, and IntoTheBlock data
- Efficient ta.percentrank() replaces array-based percentile calculation
- Consolidated duplicate code (color functions, state tracking)
- Single-line ternary expressions for Pine Script compatibility
Constants:
- MAX_HISTORY_BARS = 5000 (TradingView's limit)
- PERCENTILE_EXTREME_HIGH = 90.0
- PERCENTILE_HIGH = 75.0
- PERCENTILE_MID = 50.0
- PERCENTILE_LOW = 25.0
- MIN_PERCENTILE_SAMPLES = 10
- DEFAULT_VOLATILITY_HIGH = 0.1
Known Limitations
- Data availability: Requires valid data subscription (IntoTheBlock, Glassnode, or CoinMetrics)
- Token support: Works with tokens supported by the selected data source
- Historical data: Percentile calculations require sufficient history (200+ bars recommended)
- Timeframe: Always uses daily resolution data from providers; works on all chart timeframes
- History limit: All lookback periods capped at 5000 bars
Changelog
Latest Version:
- Added Risk Score (0-100) composite indicator
- Added MVRV Momentum with trend direction
- Added Time in Zone tracking
- Added Price Target calculations
- Added Input Validation with warnings
- Added multiple smoothing options (SMA, EMA, WMA, RMA)
- Improved performance with cached security calls
- Replaced array-based percentile with ta.percentrank()
- Human-readable timestamps in event log (YYYY-MM-DD)
- Fixed hline() conditional value bug
- Consolidated duplicate code
- Updated indicator name for clarity
For detailed usage instructions, see the script comments.
Short Option Intrinsic + Option Price + Time ValueThis code print out and plot the intrinsic values, time values and the option price on the screen. This tells your how likely a short option will be exercised. User needs to select the option type (call, or put). Then input strike price and the current option price.
Super Crooks - Breakers█ OVERVIEW
This indicator plots bullish and bearish breaker formations. When price is moving quickly, it can be difficult to mark out breaker formations across multiple timeframes. This indicator simplifies that process by marking these out automatically -- ultimately making the formations easily visible.
█ CONCEPTS
Adds L, H, LL, HH swing point labels to show bullish breaker formations
Adds H, L, HH, LL swing point labels to show bearish breaker formations
█ HOW TO USE
Add the Super Crooks Breakers indicator to your TradingView charts
Open the indicator's settings and select your preferred configurations
Watch your charts to see the indicator plot breaker formations
█ FEATURES
Visuals are drawn in real time (after candle closure) on your selected timeframe
Breaker formations can be configured to be plotted based on candle wick (high/low) price or candle close price
Configuration options (swing lengths, show/hide setups)
Risk & Lot Calculator PanelFXMANS Risk & Lot Panel
Smart Risk Management Tool for TradingView
- Overview
FXMANS Risk & Lot Panel is a lightweight and professional risk management tool designed to help traders calculate position size (lot) and take-profit levels directly on the chart, without cluttering the screen.
The panel is displayed as a minimal table in the top-right corner of the chart and automatically adapts to the currently opened symbol.
This tool focuses on clarity, precision, and usability, making it suitable for scalpers, day traders, and swing traders.
- Key Features
Automatic Direction Detection
The script can automatically determine BUY or SELL direction based on:
Entry Price
Stop Loss Price
Logic:
Stop Loss below Entry → BUY
Stop Loss above Entry → SELL
Manual override is available if auto direction is disabled.
Risk-Based Lot Size Calculation
Calculates position size based on:
User-defined risk amount in USD
Distance between Entry and Stop Loss
Symbol-specific tick size and point value
Ensures consistent risk management across all markets.
Automatic Take Profit (RR Based)
Take Profit is calculated automatically using a predefined Risk / Reward (RR) ratio.
Supports both BUY and SELL scenarios.
- Symbol-Aware Calculation
Uses TradingView’s built-in symbol properties:
syminfo.mintick
syminfo.pointvalue
Works correctly on:
Forex
Indices
Metals
Crypto
- Minimal & Non-Intrusive UI
Small, fixed panel located at the top-right corner
Designed to avoid covering price action
Clean FXMANS-style color palette
- Safe Panel Size Control
Panel size can be adjusted from settings:
Small
Medium
Large
Size changes are handled without modifying layout geometry, preventing UI bugs.
- How It Works
Enter your Entry Price and Stop Loss Price
Define your Risk Amount ($)
Set your desired Risk / Reward ratio
The script automatically calculates:
Trade Direction (BUY / SELL)
Lot Size
Take Profit Level
All results are displayed instantly in the panel
- Example Use Case
Risk: $100
Entry: 1.0850
Stop Loss: 1.0800
RR: 2.0
- The panel will automatically display:
Direction: BUY
Lot Size adjusted to risk exactly $100
Take Profit at 2R
- Important Notes
Entry and Stop Loss prices must be valid (greater than zero).
The tool does not place trades automatically.
Calculations are for position sizing only and may vary slightly depending on broker specifications.
- Disclaimer
This script is intended for educational and analytical purposes only.
Trading involves risk, and users are responsible for their own trading decisions.
- Ideal For
Traders who follow strict risk management rules
Forex, crypto, and index traders
Scalpers and intraday traders
Anyone who wants clean and fast position sizing on TradingView
Pivot Scannerpivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alertspivot scanner based on pivots ema and ai alerts
Pro HTF Last-Closed Levels (D / 4H / 1H) This is OHLC lines per one and 4 hour to track levels. simple and easy
Adaptive Trend Flow (ATF)Adaptive Trend Flow (ATF) is a custom trend-following indicator designed to work reliably across all markets and all timeframes.
It uses an adaptive moving average that automatically adjusts to market conditions, combined with trend slope analysis and a volatility filter to reduce noise during ranging periods.
Unlike traditional fixed moving averages, ATF reacts faster during strong trends and slows down during consolidation, helping traders stay aligned with meaningful price movements.
🔍 How It Works
Uses an adaptive smoothing algorithm to track price efficiently
Confirms trend direction using trend slope
Filters out low-volatility and choppy conditions using ATR-based logic
Does not repaint — signals are based only on confirmed data
📊 Visual Interpretation
🟢 Green line / background → Bullish trend
🔴 Red line / background → Bearish trend
⚪ Gray → No clear trend (range / low volatility)
⚙️ Features
Works on Crypto, Forex, Stocks, Futures
Compatible with all timeframes
Optional trend-change signals
Optional background highlighting
Fully customizable inputs
Alert-ready
🎯 Best Use Cases
Trend filter for entries and exits
Directional bias for scalping, day trading, or swing trading
Strategy backbone when combined with price action or momentum tools
⚠️ Disclaimer
This indicator is for educational and analytical purposes only and does not constitute financial advice. Always manage risk appropriately.
KCP TEMA 50 & VWAP Trend [Dr.K.C.Prakash]This indicator displays TEMA 50 High and Low lines to capture fast-reacting dynamic support and resistance, along with VWAP as an intraday reference. It helps identify short-term trend direction and price positioning relative to volume-weighted market value.
Universe_PRMP (Universe_Professional Risk Management Panel)Description
Universe_PRMP (Universe_Professional Risk Management Panel)
This comprehensive tool is designed to bring institutional-grade risk discipline to retail traders. Managing risk is the most critical part of trading, especially in high-leverage environments. This script automates the complex calculations of position sizing and profit/loss projection.
How to Use:
Initial Setup: When you add the script to your chart, it will prompt you to select two price levels. The first click sets your Stop Loss (SL) and the second sets your Take Profit (TP).
Account Configuration: Open the script settings (the gear icon) to input your Account Balance and the Percentage of Risk you are willing to take per trade (standard is 1% or 2%).
Market Conditions: Enter your broker's current Spread in pips to ensure the lot size calculation accounts for the cost of entry.
Active Monitoring:
Suggested Lot: The dashboard will immediately show the exact lot size you should enter in your trading platform.
Real-Time Projection: As price moves, the dashboard tracks whether your trade is active, hit the target, or stopped out.
Visual Labels: Red (SL) and Green (TP) labels on the chart provide clear visual cues for your exit points.
Key Features:
Dynamic Position Sizing: Automatically adjusts lot size based on the distance between entry and SL.
Spread Integration: Protects your capital by including transaction costs in the risk calculation.
Ticker Sensitivity: The panel recognizes symbol changes to prevent calculation errors across different pairs.
Visual Status Indicators: Color-coded status alerts to keep you emotionally detached and strategically focused.
DISCLAIMER:
This script is an educational and utility tool designed for risk calculation purposes only. It does not provide trading signals or investment advice. Past performance is not indicative of future results. Use this tool at your own risk.
IU Time SessionsDISCRIPTION
IU Time Sessions is a multi–market session indicator designed to visually highlight major global trading sessions directly on your chart.
It helps traders easily identify when Tokyo, London, New York, and Sydney sessions are active based on their selected time zone.
The indicator automatically adjusts session timings according to the chosen time zone, making it extremely useful for traders across different countries.
Each session is displayed with a customizable background color, allowing you to instantly recognize market behavior, volatility changes, and session overlaps.
In addition, session start alerts can be enabled so traders never miss the opening of important market hours.
USER INPUTS :
• Select Your Time Zone
Allows users to choose their local or preferred market time zone for accurate session calculation.
• Background Color Transparency
Adjust the transparency level of session background colors for better chart visibility.
• Enable / Disable Individual Sessions
Users can turn ON or OFF:
* Tokyo Session
* London Session
* New York Session
* Sydney Session
• Session Time Settings
Each session has customizable start and end times.
• Session Colors
Each trading session has its own selectable background color.
• Session Alerts
Optional alerts for:
* Tokyo session start
* London session start
* New York session start
* Sydney session start
WHY IT IS UNIQUE:
• Fully time-zone adaptive (works globally)
• Supports all major forex and crypto trading sessions
• Clean background visualization without clutter
• Custom session timing flexibility
• Individual session enable/disable control
• Session start alerts without repainting
• Works on all timeframes
• Lightweight and optimized Pine Script v6 code
Unlike basic session indicators, this tool focuses on clarity, flexibility, and accurate time-zone conversion — making it suitable for both beginners and professional traders.
HOW USER CAN BENIFIT FROM IT :
• Easily identify high-liquidity market hours
• Understand session-based price behavior
• Spot session overlaps for increased volatility
• Improve timing for entries and exits
• Avoid low-volume trading periods
• Use alerts to stay disciplined and prepared
• Suitable for forex, crypto, indices, and commodities
This indicator helps traders align their strategies with institutional trading hours and make better-timed trading decisions.
Lanovyx# Lanovyx — Setup Window Confluence System
## The Problem This Solves
Traditional confluence indicators require all conditions to align on the exact same bar: stochastic must be oversold AND price must touch support AND divergence must form — all simultaneously. In real markets, this rarely happens. Price touches VWAP -2σ, but stochastic doesn't reach oversold until 3 bars later. The opportunity is missed.
**Lanovyx solves this with the Setup Window methodology.**
---
## Core Innovation: Setup Windows
Instead of requiring simultaneous conditions, Lanovyx separates trading signals into two phases:
**Phase 1 — Context Event (Setup Activation)**
When a meaningful event occurs, it "opens a window" that stays active for a configurable number of bars:
- Price touches VWAP ±2σ or ±3σ band → window opens
- Price tests Previous Day High/Low → window opens
- Stochastic divergence forms → window opens
- Opening Range breakout occurs → window opens
- Price reaches Support/Resistance level → window opens
Each event adds to a cumulative "setup score" (capped at 8). Higher scores indicate stronger context.
**Phase 2 — Trigger (Signal Generation)**
Within the active window, when stochastic conditions confirm, a signal fires. The trigger doesn't need to occur on the same bar as the context — it just needs to occur while the window is open.
This two-phase approach captures setups that traditional indicators miss entirely.
---
## Why Stochastic + VWAP Confluence Works
**VWAP (Volume-Weighted Average Price)** tells us where institutional money has transacted. The standard deviation bands identify statistical extremes:
- Price at VWAP -2σ is extended to the downside (potential mean reversion long)
- Price at VWAP +2σ is extended to the upside (potential mean reversion short)
**Stochastic Oscillator** measures momentum exhaustion. When price reaches a VWAP extreme AND stochastic shows momentum reversing, we have confluence of:
1. Price extension (VWAP bands)
2. Momentum exhaustion (Stochastic)
3. Context validation (Setup Window score)
The multi-lane stochastic (14/21/55 periods) adds timeframe confluence — when fast, medium, and slow stochastics align, the signal is stronger.
---
## Five Signal Families
Each family targets a specific market condition:
### 1. Trend Entry (T) — Blue Labels
**When:** Stochastic pulls back to 25-55 zone (longs) or 45-75 zone (shorts) during established trend
**Logic:** In trending markets, pullbacks to the "value zone" offer low-risk entries with trend
**Best for:** Trending days with clear directional bias
### 2. Mean Reversion (R) — Green/Red Labels
**When:** Stochastic exits oversold (<20) or overbought (>80) with active setup window
**Logic:** At VWAP extremes with momentum exhaustion, price tends to revert to mean
**Best for:** Range-bound, choppy markets
**Requires:** Active setup window (context event must have occurred)
### 3. Breakout (B) — Orange Labels
**When:** Stochastic lanes compress ("coil") then expand, crossing the 50 midline
**Logic:** Compression precedes expansion; breakout from tight range signals new trend
**Best for:** Transition days, post-squeeze moves
### 4. Momentum (M) — Green/Red Labels
**When:** Stochastic crosses 50 from extreme zone (<25 or >75) within lookback period
**Logic:** Catches V-shaped reversals where regime detection lags the move
**Best for:** Fast reversals, news-driven moves
### 5. Counter-Signal / FADE (C) — Purple Labels
**When:** A signal fires and immediately fails (stochastic reverses sharply against it)
**Logic:** Failed signals often lead to strong moves in the opposite direction (trapped traders)
**Confidence gating:** High-confidence fades generate signals; low-confidence show warnings only
---
## Institutional Key Levels
Lanovyx incorporates levels that institutional traders use:
- **PDH/PDL** (Previous Day High/Low) — Major support/resistance where stops cluster
- **PDC** (Previous Day Close) — Settlement price, gap reference
- **ORB** (Opening Range) — First 15 minutes high/low, breakout trigger
- **IB** (Initial Balance) — First 60 minutes range, institutional benchmark
These levels automatically activate setup windows when price interacts with them, adding to the setup score.
---
## Filtering System
**ADX Filter:** In strong trends (ADX > 25), blocks counter-trend mean reversion signals to avoid fighting momentum.
**HTF Bias Filter:** Optional alignment with higher timeframe (e.g., 1-hour) EMAs. Can block or demote signals that oppose the larger trend.
**Regime Detection:** Classifies market as Uptrend, Downtrend, Sideways, or Squeeze using EMA alignment and market structure (HH/HL/LH/LL patterns).
---
## How to Use
1. **Wait for Setup** — Watch for context events (VWAP band touch, key level test, divergence)
2. **Check the Score** — Higher setup scores indicate stronger context (visible in debug mode)
3. **Wait for Trigger** — Let stochastic confirm within the window
4. **Confirm Regime** — Ensure signal type matches market condition
5. **Manage Risk** — Use the ATR-based stop/target levels shown after signals
**Strong signals (★)** appear when multiple confluence factors align — these are highest probability setups.
---
## Settings Overview
| Setting | Default | Purpose |
|---------|---------|---------|
| Setup Window | 10 bars | How long context events stay active |
| Entry Zone | 25-55 | Stochastic zone for trend pullback entries |
| OS/OB Levels | 20/80 | Stochastic extremes for mean reversion |
| Stop Loss | 1.5 ATR | Risk management distance |
| Target 1 | 2.0 ATR | First profit target (1.33:1 R:R) |
Recommended timeframes: 5-minute and 15-minute charts.
---
## Disclaimer
This indicator is for educational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose. No indicator can predict the future — use this as one input in your trading decision process, not as a standalone system.
SGX/GIFT Nifty Non-Indian Hours BoxThis scripts draws a box around the high and low of both the PRE-MARKET and POST-MARKET hours of SGX Nifty.
devendra Verma 3 SMA3 SMA RSI based can work to know the volatility and movement in the trend
can try to see the crosses of each other to generate buy and sell signals
5% D/ID or 15%W DropCan be used to trigger alerts for 5% daily drops or intra-day drops or 15% drops during the past 5 days. Useful for selling puts.
IPC Strategy........ Ignition Pullback ContinuationIPC Strategy — Ignition Pullback Continuation
The IPC (Ignition Pullback Continuation) Strategy is an intraday trend-continuation framework designed to capture institutional momentum after a true market “ignition” move.
The script identifies when price establishes a strong directional trend using EMA structure, VWAP positioning, volume confirmation, and chop filtering. Once a valid trend is confirmed, the indicator does not signal late entries. Instead, it waits for the first controlled pullback or EMA reclaim rejection, then marks the precise continuation candle where probability favors trend resumption.
This creates a two-step process:
Detect institutional trend ignition
Execute on the first high-quality pullback continuation
Key features:
Non-repainting buy/sell arrows on confirmed trend shifts
Precise pullback and rejection entry dots for execution
Chop filter to avoid low-probability market conditions
VWAP and volume confirmation for institutional context
Background and trend labeling for visual clarity
Alerts aligned with confirmed signals
The IPC Strategy is built for traders who want to avoid chasing moves and instead participate where institutions typically re-enter the market: the first pullback after momentum ignition.
Ideal for intraday trading on equities, ETFs, and liquid tickers across all timeframes.
SMMA Multi-Timeframe-11, 21Is Script ki Khoobiyan:
Custom Inputs: Aap indicator ki settings mein jaakar 11 aur 21 ki jagah koi bhi number daal sakte hain bina code chhede.
Visual Crossover: Jab 11-period SMMA (Blue) 21-period SMMA (Red) ko upar ki taraf cross karega, to chart par ek Green Triangle dikhega.
Smoothing: SMMA normal Moving Average se zyada "smooth" hota hai, isliye ye noise ko kam karta hai.
Fixed Timeframe SMMA: Isme Orange rang ki ek moti line (linewidth 3) dikhegi. Ye hamesha 15 minute ka SMMA 21 calculate karegi.
Visual Clarity: * Blue: SMMA 11 (Aapke current chart ka)
Red: SMMA 21 (Aapke current chart ka)
Orange (Moti Line): SMMA 21 (Sirf 15-Minute chart ka)
Ek Zaruri Baat:
Jab aap 15-minute se bade timeframe par honge (jaise 1-hour ya Daily), toh 15-min ki line thodi "zigzag" ya seedhi dikh sakti hai kyunki bade timeframe ke ek candle mein 15-min ki kai candles hoti hain. Ye bilkul normal hai.
Kya aap isme koi specific Buy/Sell Signal set karna chahte hain jo tabhi trigger ho jab price is 15-min wali line ke upar ho?
[ahDirtCuhzzz] 15m NY ORBI made my version of Orb. If you use it, you need to make sure it captures the range: 930-946, otherwise there'll be inconsistencies and it'll plot the 9:40a candle from time to time. Enjoy
[ahDirtCuhzzz] 15m NY ORB + Mid + LabelsI created my own version of 15m ORB. I like that I can edit the colors of the line and change the labels as well.
[ahDirtCuhzzz]ICT Sessions_One Setup for Life Added midnight and 830 open labels. It's similar to MK's version, but I wanted labels so I made it my own, updated version
Superbank Grid The Superbank Grid automatically plots institutional-grade price zones across Forex, Indices, and Crypto, giving traders a consistent framework for identifying major liquidity areas, psychological levels, and high-probability reaction zones — on any timeframe.
This indicator is designed to eliminate guesswork by anchoring price to repeatable, whole-number structures used by professional traders.
What It Draws
Forex (All FX Pairs)
Major Zones: Every 1,000 pips
Median Levels: 500 pips
Quarter Levels: 250 & 750 pips
Minor Grid: 100-pip intervals
Examples:
EURUSD:
Major → 0.7000 · 0.8000 · 0.9000 · 1.0000 · 1.1000
Quarters → 0.7250 · 0.7500 · 0.7750
USDJPY:
Major → 60 · 70 · 80 · 90 · 100 · 110
Quarters → 62.5 · 65.0 · 67.5 · 122.5 · 125.0 · 127.5
Indices & Crypto
Major “Superbank” Zones: $10,000
Median Levels: $5,000
Minor Grid: $1,000
Ideal for:
NAS100
US30
SPX
BTC
ETH
Key Features
Works on all timeframes
Auto-adapts to Forex, JPY pairs, Indices, and Crypto
Prevents chart auto-scale distortion (“screen squish”)
Displays only relevant zones near current price
Adjustable colors, line weights, and label sizes
Optional visibility toggles for Major, Median, Quarter, and Minor levels
Best Use Cases
Identifying institutional liquidity pools
Marking reaction zones and decision points
Structuring entries, targets, and stop placement
Aligning price action with Big Money levels
Swing trading, position trading, and intraday execution
Important Notes
This indicator is a context and structure tool, not a signal generator.
Best used in combination with market structure, order flow, and risk management.
Designed to reflect how professional traders segment price, not retail indicators.
Who This Is For
Traders who think in zones, liquidity, and scale — not random indicators.
If you trade:
Forex
Indices
Crypto
and want a repeatable framework for understanding where price matters…
This tool belongs on your chart.






















