BTC Dual Cycle: Stats DashboardOverview
"Price takes the elevator down, but takes the stairs up."
This indicator is a macro-analysis tool designed to visualize the true duration of Bitcoin’s market cycles. Unlike standard oscillators that focus on short-term price action, the Macro Cycle Tracker filters out the noise to answer two fundamental questions:
Are we in a phase of Expansion (Price Discovery)?
Are we in a phase of Recovery (Repairing the damage of a crash)?
It visually separates the market into two distinct regimes based on a configurable drawdown threshold (default: -50%) and provides real-time statistics on how long these phases historically last.
How It Works
The script tracks the All-Time High (ATH) and divides market history into two colored zones:
🟢 The Green Zone (Expansion / Price Discovery)
Trigger: Starts immediately when Bitcoin breaks the previous ATH.
Meaning: The market is healthy, profitable, and exploring new valuation levels.
End: The zone ends when price drops by 50% (configurable) from the cycle top.
🔴 The Red Zone (Recovery / Capitulation)
Trigger: Starts when price drops below the 50% threshold from the peak.
Meaning: The asset is "underwater." This zone remains active persistently—even during relief rallies—until the previous ATH is fully reclaimed.
Philosophy: A cycle is not over until the damage is repaired.
Key Features
Cycle Timer: Displays the exact number of days passed for every historical cycle directly on the chart.
Live Counter: Shows the current duration of the active phase (e.g., "ZONE GREEN: 450 Days...").
Statistical Dashboard: A table in the bottom-right corner automatically calculates the Mean and Median duration (in days) for both Green and Red phases. This allows you to compare the current cycle against historical averages.
How to Use
For Investors (HODLers): Use the Red Zone to understand the "Time Cost" of a bear market. It helps visualize that recovery takes patience and that price action below the old ATH is merely accumulation.
For Analysts: Use the Dashboard statistics to project potential cycle turning points based on historical median durations.
Settings
Drop Percent (%): Default is 50%. This defines the "Crash" threshold. You can adjust this to 20% or 30% for more sensitive cycle detection.
Text Size: Adjust the size of the dashboard text to fit your screen resolution.
Disclaimer: This tool is for educational purposes only and does not constitute financial advice. Past performance is not indicative of future results.
Индикаторы и стратегии
Ultimate Std Dev Channel • 4 Zones • 100% WORKINGStandard-deviation channel — fully customizable (band width, line style, colors, opacity, thickness, and labels).
jhehli LiquidityWhat are BSL and SSL?
In the context of Smart Money Concepts, liquidity simply refers to pending orders—specifically Stop Losses and Buy/Sell Stop orders—resting above old highs and below old lows.
BSL (Buy-Side Liquidity): This is found above Swing Highs. Retail traders who are short the market will place their "Buy Stop" protective orders here. Additionally, breakout traders place "Buy Limit" orders here. Smart Money views this area as a pool of willing buyers. To fill large sell orders, institutions must drive price up into this liquidity to pair their massive sell interest with these buy stops.
SSL (Sell-Side Liquidity): This is found below Swing Lows. Retail traders who are long the market place their "Sell Stop" protective orders here. Smart Money targets these levels to accumulate long positions. They need the market to sell off into these levels so they can buy from the willing sellers at a discount.
How this Indicator Works
This tool automates the process of market structure analysis by identifying key Swing Highs and Swing Lows.
Detection: It scans price action to find fractal highs and lows (classic swing points) where price has rejected a level.
Visualization: It projects a line from these points, clearly marking where the "stops" are likely residing.
Liquidity Raids: When price pierces these levels, it is considered a "Liquidity Raid" or "Stop Hunt."
How to Use This in Your Trading
Do not treat these lines simply as Support and Resistance. In the ICT methodology, old highs and lows are targets, not barriers.
For Reversals: Wait for a "Turtle Soup" or "Judas Swing." This occurs when price aggressively expands into a BSL or SSL level to trigger stops, only to quickly reverse back into the trading range. This indicates that Smart Money has finished their accumulation or distribution.
For Bias: If the higher timeframe trend is Bullish, expect SSL to be raided to fuel the move, while BSL becomes the target (Draw on Liquidity).
By using this indicator, you remove the guesswork of manually marking every swing point, allowing you to focus on price action and the reaction at these critical liquidity pools.
Trading Pro with Kama Hariss 369Indicators used in strategy are 20 EMA, KAMA, RSI and DMI/ADX and RVOL.
Buy signal activates when price closes above kama and kama is above 20 ema. RSI greater than 55, D+>D- and ADX>20. Kama is upward slopping.
Sell signal activates when price closes below kama and kama is below 20 ema. RSI <45, D+
Sequential MACD 0.5+ & MA Cloud StrategyThis indicator provides sequential buy and sell signals based on a robust set of trend-following and momentum conditions:
Buy Signal Logic:
Momentum: Both the MACD line and the Signal line are above the 0.5 threshold, indicating strong bullish momentum.
Crossover: A bullish MACD crossover (MACD above Signal line) has occurred near the zero line, suggesting the start of a new, healthy momentum wave.
Trend Filter (4H TF): The current price must be above the 21 and 50 EMAs on the 4-hour timeframe.
Price Action: The current candle must be green (closing higher than open).
Sequential Logic: A buy signal is only generated if a position is not already active.
Sell Signal Logic:
Momentum Reversal: MACD line is below the Signal line (negative histogram).
Price Action: The current candle must be red.
MA Cloud: The price is below the 9 and 21 EMA Cloud.
Sequential Logic: A sell signal is only generated if a buy signal was previously active.
This comprehensive filter system aims to capture strong, confirmed moves while avoiding noisy signals against higher-timeframe trends.
Đại Ka 3 ATR BandsĐại Ka 3 ATR Bands – The ultimate single-slot indicator that replaces three separate ATR plots.
Designed specifically for ICT/SMC traders in 2025:
• Light red band (±0.5 ATR) → fake moves, Judas Swing, Turtle Soup zone
• Gray band (±1.0 ATR) → normal price action
• Light green band (±2.0 ATR) → real displacement zone → Silver Bullet, SFT, high-probability entries
How to use:
– Price stuck inside red band → expect reversal/fakeout
– Price breaks and closes outside green band + volume spike → enter aggressively in that direction (85%+ win-rate inside Killzones)
Default ATR(14), subtle fills for instant visual filtering of real vs fake moves.
Perfect companion for Order Blocks, FVG, Breaker Blocks and NY/London Killzones.
Free forever – coded with love by Đại Ka & Vietnamese ICT crew.
NeuroPolynomial Channel🧠 NeuroPolynomial Channel – AI-Inspired Market Structure Engine
In modern market microstructure analysis, price is no longer treated as a simple line — it is viewed as a continuously evolving signal governed by nonlinear dynamics, volatility deformation, and behavioral state shifts.
The NeuroPolynomial Channel (NPC) is a mathematically structured, AI-inspired indicator designed to approximate this dynamic behavior using a hybrid of:
• Polynomial regression smoothing
• Neural blending functions
• Volatility-adaptive envelopes
• Distribution-based bias levels
While full deep-learning models cannot be directly implemented in Pine Script due to computational and architectural limitations, the NeuroPolynomial Channel brings core AI concepts into TradingView through mathematically constrained approximations, creating an efficient, real-time neural structure model suitable for intraday and swing analysis.
📐 Mathematical Foundation
NPC is not a standard moving average or simple channel system.
It applies a multi-layer non-linear approximation built on four core mathematical components.
1️⃣ NeuroPolynomial Core Line
At the heart of the system lies a recursive polynomial smoothing kernel inspired by neural weighted blending:
K = α · K
+ (1 - α) · P
+ Δx · ( K - K ) / F
Where:
• K = Neuro core estimate
• P = Current price input
• α = Neural morph factor
• F = Flattening constant
• Δx = Position delta (horizontal deformation component)
The recursive references introduce memory similar to RNN-style feedback behavior.
This produces a structurally smooth, non-linear trajectory that adapts to both local and historical price deformation.
.....................................................................................................
2️⃣ Neural Volatility Envelope
Instead of classical standard deviation, NPC uses a cumulative error field:
E = ( Σ | P - K | ) / N
Using this error field, the dynamic envelope bands are constructed as:
Inner Band = K ± E · m1
Mid Band = K ± E · m2
Outer Band = K ± E · m3
Where:
• m1, m2, m3 are probabilistic band multipliers
• E represents actual observed deviation, not synthetic volatility
This creates a probabilistic price container that deforms with real market behavior rather than static statistical assumptions.
The channel automatically adapts its curvature based on current price regime:
trending, compressing, or expanding.
.....................................................................................................
3️⃣ Neural Regression Spine
Alongside the polynomial core, NPC calculates a ridge-regularized regression spine:
y = β · x + α (with L2 regularization)
This acts as a structural bias vector or "neural backbone".
It prevents overfitting and provides directional stabilization during extended trend phases.
......................................................................................................
4️⃣ Neuro Bias Zones (Daily Reset)
NPC also introduces daily volatility-anchored regime thresholds:
Z_levels = Open ± ATR_daily × {0.1, 0.382, 0.618}
These act as:
• Neuro Mid Zones – equilibrium bands
• Neuro Strong Zones – trend activation boundaries
Unlike classical pivot systems, these levels reset daily and expand dynamically based on real volatility.
They approximate probability field boundaries similar to those used in institutional volatility modeling.
.......................................................................................................
🤖 AI Philosophy
While Pine Script cannot host full neural networks, GPU models or multi-layer AI pipelines, NeuroPolynomial Channel introduces AI concepts through mathematical abstraction, including:
• Neural blending mechanics
• Memory-based recursion
• Volatility adaptation
• Bias field modeling
• Structured envelope projection
This creates an AI-style behavior using real-time deterministic mathematics — allowing performance on TradingView while preserving interpretability and stability.
🛠 How To Use
NPC is designed for structure-based interpretation, not random signal chasing.
① Trend Structure
Use the Neural Core Line and channel slope to establish trend direction and regime.
② Compression & Expansion
Observe band width.
Contracting channels signal volatility compression.
Expanding channels signal range expansion.
③ Bias Zones
Neuro Mid and Strong levels act as macro intraday bias framework — especially powerful for session trading and index futures.
⚙️ Settings Overview
• Morph Factor – Controls neural blending strength (higher = smoother, lower = reactive)
• Flatten – Reduces polynomial curvature noise
• Band Multipliers – Adjust envelope thickness
• Neural Bias Levels – ATR-anchored regime zones resetting daily
• Theme & Visual Controls – Dark/Light with pro-grade visibility
........................................................................................................
Companion AI:
I also built a free Trading AI on ChatGPT that reads chart screenshots and enforces a rule-based intraday checklist.
Use with this indicator: chatgpt.com
For educational & decision-support only. Not financial advice.
............................................................................................................
⚠️ Disclaimer
The information contained in my Scripts / Indicators / Ideas / Systems does not constitute financial advice or a solicitation to buy or sell any securities.
All markets carry risk. This tool is for educational and analytical purposes only.
I do not accept liability for any financial loss or damage resulting from direct or indirect use of this script.
Trading decisions must be made independently based on your own risk profile and financial assessment.
Position Sizer (FinPip)The Position Sizer (FinPip) indicator is a crucial, all-in-one risk management tool designed to calculate the precise trade size required to limit your risk to a predetermined percentage of your total account capital.
This indicator helps you consistently execute sound risk management, regardless of the instrument's volatility or the trade's price levels.
Key Features:
Calculates Position Size: Based on your configurable Account Capital, desired Risk Percentage (default 2.5%), and the price distance between your Entry and Stop-Loss levels.
Visual Trade Planning: Plots three clear levels directly on the chart for easy visualization:
Entry Price (Blue)
Stop-Loss Price (SL) (Red)
Profit Target (Lime Green, calculated using the Reward:Risk Ratio).
Custom Risk Management: Easily adjust the Risk Percentage and the Reward:Risk Ratio (default 4.0) in the indicator's settings.
Heads-Up Display (HUD): A clean, fixed table in the bottom-left corner of the chart clearly displays all calculated metrics, including your Required Position Size (in units/shares/contracts), Risk Amount, and Potential Profit.
How to Use:
Enter your Account Capital and desired Risk % in the settings panel.
Set your desired Entry Price and Stop-Loss Price.
The indicator immediately calculates and displays the exact number of units you need to trade to maintain your risk limit.
Universal Scalper Indicator [Crypto/Forex/Gold]Universal Scalper Pro is an all-in-one scalping system designed for the 15-Minute Timeframe. It automates the analysis of trend, volatility, and risk management into a single, high-contrast dashboard.
Unlike standard crossover indicators, this system filters out low-volatility "noise" using a built-in ADX engine and automatically calculates dynamic Stop Loss and Take Profit levels based on market volatility (ATR).
It is engineered to work universally on:
Crypto (BTC, ETH, SOL, Altcoins)
Commodities (Gold, Silver, Oil)
Forex (Major & Minor Pairs)
Stocks (High volume tech stocks like NVDA, TSLA)
📈 How It Works (The Strategy)
1. The Trend Engine (9/21 EMA) The core logic utilizes a Fast (9) and Slow (21) Exponential Moving Average crossover.
Bullish Signal: The 9 EMA crosses above the 21 EMA.
Bearish Signal: The 9 EMA crosses below the 21 EMA. This specific combination is chosen for its responsiveness to 15-minute intraday trends.
2. The Noise Filter (ADX > 15) To prevent "whipsaws" (fake signals during sideways markets), the script includes a Volatility Filter based on the Average Directional Index (ADX).
Signals are rejected if the ADX is below 15.
This ensures you only receive alerts when there is sufficient momentum to sustain a move.
3. Dynamic Risk Management (ATR) The script uses the Average True Range (ATR) to calculate Stop Loss and Take Profit levels that adapt to the specific asset's volatility.
Stop Loss: Placed at 1.5x ATR from the entry. (Tight enough to preserve capital, wide enough to survive standard market noise).
Take Profit: Placed at 2.0x ATR from the entry. (Provides a healthy 1:1.3 Risk/Reward ratio).
🚀 Key Features
Universal Dashboard: A bottom-right panel displays the live Trend Status, Entry Price, Stop Loss, and Take Profit. It automatically formats decimals for any asset (e.g., 2 decimals for Gold, 5 for Forex, 8 for Crypto).
"Sticky" Memory: The dashboard retains the prices of the last valid signal, allowing you to manage your trade even after the signal candle closes.
Trend Cloud: A visual Green/Red zone between the EMAs helps you instantly identify the market bias.
Unified Alerts: A single alert setup ("Any alert() function call") sends the Asset Name, Entry, SL, and TP directly to your phone.
🛠️ How to Use
Timeframe: Set your chart to 15 Minutes (15m).
Wait for the Signal: Look for the "BUY" (Green) or "SELL" (Red) label on the chart.
Check the Dashboard: Ensure the "STATUS" is BULLISH (for buys) or BEARISH (for sells). If the status says "WAIT", do not trade.
Execute: Enter the trade using the exact Stop Loss and Take Profit levels shown on the dashboard.
⚠️ Risk Disclaimer
Trading financial markets involves high risk and may not be suitable for all investors. This indicator is a technical analysis tool and does not constitute financial advice. Past performance is not indicative of future results. Always practice with a demo account before trading real capital.
Paulinho Signals – Cripto 5m/15m com Filtro de LateralidadeThis script is an automated Pine Script v6 strategy designed for short-term cryptocurrency trading, especially on 5-minute and 15-minute timeframes. It combines moving average crossovers, trend strength (ADX), volatility (ATR), and candlestick patterns to generate buy and sell signals with a fixed risk/reward management system.
How to Use:
- Apply to cryptocurrency charts on 5m or 15m timeframes.
- Adjust parameters to fit your preferences (EMA, RSI, ADX, ATR).
- Use for backtesting or as a decision-support tool.
Disclaimer:
This script is for educational purposes only and does not constitute financial advice. Always test on demo accounts before applying to live trading.
Tactical Deviation🎯 TACTICAL DEVIATION - Volume-Backed VWAP Deviation Analysis
What Makes This Different?
Unlike basic VWAP indicators, Tactical Deviation combines:
• Multi-timeframe VWAP deviation bands (Daily/Weekly/Monthly)
• Volume spike intelligence - signals only appear with volume confirmation
• Pivot reversal detection at deviation extremes
• Optional multi-VWAP confluence system
• Smart defaults for quality over quantity
This unique combination filters weak setups and identifies high-probability entries at extreme price deviations from fair value.
📊 DEFAULT SETTINGS (Ready to Use)
✅ Daily VWAP with ±2σ deviation bands
✅ Volume spike detection (1.5x average required)
✅ 2σ minimum deviation for signals
❌ Weekly/Monthly VWAPs (enable for multi-timeframe)
❌ Pivot reversal requirement (enable for stronger signals)
❌ Fill zones (optional visual enhancement)
Why: Daily VWAP is most relevant for intraday trading. 2σ bands catch meaningful moves. Volume spikes ensure conviction. Clean chart focuses on what matters.
🚀 HOW TO USE
BASIC USAGE:
• Green triangles (below bars) = Long signals at oversold deviations
• Red triangles (above bars) = Short signals at overbought deviations
SIGNAL QUALITY:
• Normal size, bright colors = Volume spike (best quality)
• Small size, lighter colors = Volume momentum
• Tiny size = No volume confirmation
DEVIATION ZONES:
• ±2σ = Extreme deviation (signals appear here)
• ±1σ to ±2σ = Extended but not extreme
• Within ±1σ = Normal range
TRADING APPROACHES:
Mean Reversion:
→ Enter when price reaches ±2σ with volume spike
→ Target: Return to VWAP or opposite band
→ Stop: Beyond extreme deviation
Trend Continuation:
→ Use bands to identify pullbacks
→ Enter pullback to VWAP in trending market
→ Volume confirms continuation
Reversal Trading:
→ Enable "Require Pivot Reversal" for stronger signals
→ Signals only when deviation + pivot reversal occur
→ Higher probability, fewer signals
⚙️ EXPLORE SETTINGS FOR FULL USE
VWAP SETTINGS:
• Show Weekly/Monthly VWAP = Multi-timeframe context
• Show ±1σ Bands = Normal deviation range
• Show ±3σ Bands = Extreme extremes (rare but powerful)
SIGNAL SETTINGS:
• Min Deviation: 1σ (more signals) | 2σ (default) | 3σ (fewer, extreme only)
• Require Pivot Reversal: OFF (default) | ON (stronger but fewer)
• Volume Spike Threshold: 1.5x (default) | 2.0x+ (major spikes) | 1.2x (more signals)
CONFLUENCE SETTINGS:
• Require Multi-VWAP Confluence: OFF (default) | ON (2+ VWAPs must agree)
• Min VWAPs: 2 (Daily + Weekly/Monthly) | 3 (all must agree)
VISUAL SETTINGS:
• Show Fill Zones = Shaded areas between bands
• Fill Opacity = Transparency adjustment
• Line Widths = Customize thickness
💡 PRO TIPS
1. Start with defaults, then enable features as you learn
2. Volume spike requirement filters weak moves - keep it enabled
3. Enable Weekly/Monthly VWAPs for higher timeframe context
4. Enable confluence for swing trading setups
5. Pivot reversals: ON for reversals, OFF for continuations
6. Check top-right info table for current deviation levels
🎨 VISUAL GUIDE
• Cyan Line = Daily VWAP (fair value)
• Cyan Bands = Daily deviation zones
• Orange Line = Weekly VWAP (if enabled)
• Purple Line = Monthly VWAP (if enabled)
• Green Triangle = Long signal (oversold)
• Red Triangle = Short signal (overbought)
⚠️ IMPORTANT
Educational purposes only. Always use proper risk management. Signals are based on statistical deviation, not guarantees. Volume confirmation improves quality but doesn't guarantee outcomes. Combine with your own analysis.
The unique combination of VWAP deviation analysis, volume profile confirmation, pivot identification, and multi-timeframe confluence in a single clean interface makes Tactical Deviation different from basic VWAP indicators.
Happy Trading! 📈
deKoder | HTF3 - Multi-Timeframe Candle DisplaydeKoder | HTF3 - Multi-Timeframe Candle Display
Overview
HTF3 is a powerful multi-timeframe analysis tool that displays higher timeframe candles directly on your current lower timeframe chart. When trading lower timeframes it is sometimes easy to lose sight of the higher timeframe context. HTF3 enables better trading decisions by keeping your analysis aligned with the dominant trend.
Key Features
• Multi-Timeframe Support : Display daily, weekly, or any custom higher timeframe candles
• Visual Candle Representation : Clear OHLC candles with customizable colors
• Range Display : Show previous candle ranges with dotted center lines
• Trading Signals : Automatic breakout and rejection signals with arrow markers
• Flexible Positioning : Adjustable horizontal offset for optimal placement
• Real-time Updates : Current higher timeframe candle builds in real-time
Use Cases
• Swing Traders : Maintain daily/weekly context on intraday charts
• Position Traders : Align entries with higher timeframe structure
• Breakout Traders : Identify key levels from previous candle ranges
• Market Analysis : Quickly assess multi-timeframe alignment
Configuration
• Timeframe : Select higher timeframe to display (default: D)
• X-Offset : Adjust horizontal positioning (-4 to 50)
• Show Candles : Toggle candle display
• Show Range : Toggle previous candle high/low ranges
• Signals : Display breakout/rejection signals
• Customize bull/bear colors and text appearance
How to Use
1. Select your desired higher timeframe in the settings
2. Adjust offset for optimal positioning
3. Use the range lines to identify potential liquidity zones
4. Watch for signal arrows indicating breakouts/rejections
5. Combine with your existing strategy for confirmation
Pro Tips
• Use daily candles on 1H/4H charts for swing trading context
• The signals are not intended as standalone buy/sell triggers. They should only be used as confluence for your main trade idea
Price Action Concepts [RUDYINDICATOR]/// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © RUDYBANK INDICATOR - formerly know as RUDY INDICATOR
//@version=5
indicator("Price Action Concepts ", shorttitle = "RUDYINDICATOR-V1
- Price Action RUDYINDICATOR ", overlay = true, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 500, max_polylines_count = 100)
//-----------------------------------------------------------------------------{
//Boolean set
//-----------------------------------------------------------------------------{
s_BOS = 0
s_CHoCH = 1
i_BOS = 2
i_CHoCH = 3
i_pp_CHoCH = 4
green_candle = 5
red_candle = 6
s_CHoCHP = 7
i_CHoCHP = 8
boolean =
array.from(
false
, false
, false
, false
, false
, false
, false
, false
, false
)
//-----------------------------------------------------------------------------{
// User inputs
//-----------------------------------------------------------------------------{
show_swing_ms = input.string ("All" , "Swing        " , inline = "1", group = "MARKET STRUCTURE" , options = )
show_internal_ms = input.string ("All" , "Internal     " , inline = "2", group = "MARKET STRUCTURE" , options = )
internal_r_lookback = input.int (5 , "" , inline = "2", group = "MARKET STRUCTURE" , minval = 2)
swing_r_lookback = input.int (50 , "" , inline = "1", group = "MARKET STRUCTURE" , minval = 2)
ms_mode = input.string ("Manual" , "Market Structure Mode" , inline = "a", group = "MARKET STRUCTURE" , tooltip = " Use selected lenght Use automatic lenght" ,options = )
show_mtf_str = input.bool (true , "MTF Scanner" , inline = "9", group = "MARKET STRUCTURE" , tooltip = "Display Multi-Timeframe Market Structure Trend Directions. Green = Bullish. Red = Bearish")
show_eql = input.bool (false , "Show EQH/EQL" , inline = "6", group = "MARKET STRUCTURE")
plotcandle_bool = input.bool (false , "Plotcandle" , inline = "3", group = "MARKET STRUCTURE" , tooltip = "Displays a cleaner colored candlestick chart in place of the default candles. (requires hiding the current ticker candles)")
barcolor_bool = input.bool (false , "Bar Color" , inline = "4", group = "MARKET STRUCTURE" , tooltip = "Color the candle bodies according to market strucutre trend")
i_ms_up_BOS = input.color (#089981 , "" , inline = "2", group = "MARKET STRUCTURE")
i_ms_dn_BOS = input.color (#f23645 , "" , inline = "2", group = "MARKET STRUCTURE")
s_ms_up_BOS = input.color (#089981 , "" , inline = "1", group = "MARKET STRUCTURE")
s_ms_dn_BOS = input.color (#f23645 , "" , inline = "1", group = "MARKET STRUCTURE")
lvl_daily = input.bool (false , "Day   " , inline = "1", group = "HIGHS & LOWS MTF")
lvl_weekly = input.bool (false , "Week " , inline = "2", group = "HIGHS & LOWS MTF")
lvl_monthly = input.bool (false , "Month" , inline = "3", group = "HIGHS & LOWS MTF")
lvl_yearly = input.bool (false , "Year  " , inline = "4", group = "HIGHS & LOWS MTF")
css_d = input.color (color.blue , "" , inline = "1", group = "HIGHS & LOWS MTF")
css_w = input.color (color.blue , "" , inline = "2", group = "HIGHS & LOWS MTF")
css_m = input.color (color.blue , "" , inline = "3", group = "HIGHS & LOWS MTF")
css_y = input.color (color.blue , "" , inline = "4", group = "HIGHS & LOWS MTF")
s_d = input.string ('⎯⎯⎯' , '' , inline = '1', group = 'HIGHS & LOWS MTF' , options = )
s_w = input.string ('⎯⎯⎯' , '' , inline = '2', group = 'HIGHS & LOWS MTF' , options = )
s_m = input.string ('⎯⎯⎯' , '' , inline = '3', group = 'HIGHS & LOWS MTF' , options = )
s_y = input.string ('⎯⎯⎯' , '' , inline = '4', group = 'HIGHS & LOWS MTF' , options = )
ob_show = input.bool (true , "Show Last    " , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volumetric order blocks on the chart Ammount of volumetric order blocks to show")
ob_num = input.int (5 , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Orderblocks number", minval = 1, maxval = 10)
ob_metrics_show = input.bool (true , "Internal Buy/Sell Activity" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volume metrics that have formed the orderblock")
css_metric_up = input.color (color.new(#089981, 50) , "         " , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
css_metric_dn = input.color (color.new(#f23645 , 50) , "" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
ob_swings = input.bool (false , "Swing Order Blocks" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display swing volumetric order blocks")
css_swing_up = input.color (color.new(color.gray , 90) , "                 " , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
css_swing_dn = input.color (color.new(color.silver, 90) , "" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
ob_filter = input.string ("None" , "Filtering             " , inline = "d", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Filter out volumetric order blocks by BOS/CHoCH/CHoCH+", options = )
ob_mitigation = input.string ("Absolute" , "Mitigation           " , inline = "4", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Trigger to remove volumetric order blocks", options = )
ob_pos = input.string ("Precise" , "Positioning          " , inline = "k", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Position of the Order Block Cover the whole candle Cover half candle Adjust to volatility Same as Accurate but more precise", options = )
use_grayscale = input.bool (false , "Grayscale" , inline = "6", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Use gray as basic order blocks color")
use_show_metric = input.bool (true , "Show Metrics" , inline = "7", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show volume associated with the orderblock and his relevance")
use_middle_line = input.bool (true , "Show Middle-Line" , inline = "8", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show mid-line order blocks")
use_overlap = input.bool (true , "Hide Overlap" , inline = "9", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Hide overlapping order blocks")
use_overlap_method = input.string ("Previous" , "Overlap Method    " , inline = "Z", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = " Preserve the most recent volumetric order blocks Preserve the previous volumetric order blocks", options = )
ob_bull_css = input.color (color.new(#089981 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
ob_bear_css = input.color (color.new(#f23645 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
show_acc_dist_zone = input.bool (false , "" , inline = "1", group = "Accumulation And Distribution")
zone_mode = input.string ("Fast" , "" , inline = "1", group = "Accumulation And Distribution" , tooltip = " Find small zone pattern formation Find bigger zone pattern formation" ,options = )
acc_css = input.color (color.new(#089981 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
dist_css = input.color (color.new(#f23645 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
show_lbl = input.bool (false , "Show swing point" , inline = "1", group = "High and Low" , tooltip = "Display swing point")
show_mtb = input.bool (false , "Show High/Low/Equilibrium" , inline = "2", group = "High and Low" , tooltip = "Display Strong/Weak High And Low and Equilibrium")
toplvl = input.color (color.red , "Premium Zone   " , inline = "3", group = "High and Low")
midlvl = input.color (color.gray , "Equilibrium Zone" , inline = "4", group = "High and Low")
btmlvl = input.color (#089981 , "Discount Zone    " , inline = "5", group = "High and Low")
fvg_enable = input.bool (false , "        " , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap")
what_fvg = input.string ("FVG" , "" , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap", options = )
fvg_num = input.int (5 , "Show Last  " , inline = "1a", group = "FAIR VALUE GAP" , tooltip = "Number of fvg to show")
fvg_upcss = input.color (color.new(#089981, 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_dncss = input.color (color.new(color.red , 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_extend = input.int (10 , "Extend FVG" , inline = "2", group = "FAIR VALUE GAP" , tooltip = "Extend the display of the FVG.")
fvg_src = input.string ("Close" , "Mitigation  " , inline = "3", group = "FAIR VALUE GAP" , tooltip = " Use the close of the body as trigger Use the extreme point of the body as trigger", options = )
fvg_tf = input.timeframe ("" , "Timeframe " , inline = "4", group = "FAIR VALUE GAP" , tooltip = "Timeframe of the fair value gap")
t = color.t (ob_bull_css)
invcol = color.new (color.white , 100)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - UDT }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
type bar
float o = open
float c = close
float h = high
float l = low
float v = volume
int n = bar_index
int t = time
type Zphl
line top
line bottom
label top_label
label bottom_label
bool stopcross
bool sbottomcross
bool itopcross
bool ibottomcross
string txtup
string txtdn
float topy
float bottomy
float topx
float bottomx
float tup
float tdn
int tupx
int tdnx
float itopy
float itopx
float ibottomy
float ibottomx
float uV
float dV
type FVG
box box
line ln
bool bull
float top
float btm
int left
int right
type ms
float p
int n
float l
type msDraw
int n
float p
color css
string txt
bool bull
type obC
float top
float btm
int left
float avg
float dV
float cV
int wM
int blVP
int brVP
int dir
float h
float l
int n
type obD
box ob
box eOB
box blB
box brB
line mL
type zone
chart.point points
float p
int c
int t
type hqlzone
box pbx
box ebx
box lbx
label plb
label elb
label lbl
type ehl
float pt
int t
float pb
int b
type pattern
string found = "None"
bool isfound = false
int period = 0
bool bull = false
type alerts
bool chochswing = false
bool chochplusswing = false
bool swingbos = false
bool chochplus = false
bool choch = false
bool bos = false
bool equal = false
bool ob = false
bool swingob = false
bool zone = false
bool fvg = false
bool obtouch = false
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - General Setup }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
bar b = bar.new()
var pattern p = pattern.new()
alerts blalert = alerts.new()
alerts bralert = alerts.new()
if p.isfound
p.period += 1
if p.period == 50
p.period := 0
p.found := "None"
p.isfound := false
p.bull := na
switch
b.c > b.o => boolean.set(green_candle, true)
b.c < b.o => boolean.set(red_candle , true)
f_zscore(src, lookback) =>
(src - ta.sma(src, lookback)) / ta.stdev(src, lookback)
var int iLen = internal_r_lookback
var int sLen = swing_r_lookback
vv = f_zscore(((close - close ) / close ) * 100,iLen)
if ms_mode == "Dynamic"
switch
vv >= 1.5 or vv <= -1.5 => iLen := 10
vv >= 1.6 or vv <= -1.6 => iLen := 9
vv >= 1.7 or vv <= -1.7 => iLen := 8
vv >= 1.8 or vv <= -1.8 => iLen := 7
vv >= 1.9 or vv <= -1.9 => iLen := 6
vv >= 2.0 or vv <= -2.0 => iLen := 5
=> iLen
var msline = array.new(0)
iH = ta.pivothigh(high, iLen, iLen)
sH = ta.pivothigh(high, sLen, sLen)
iL = ta.pivotlow (low , iLen, iLen)
sL = ta.pivotlow (low , sLen, sLen)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - ARRAYS }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
hl () =>
= request.security(syminfo.tickerid , 'D' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'W' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'M' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , '12M', hl() , lookahead = barmerge.lookahead_on)
lstyle(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
mtfphl(h, l ,tf ,css, pdhl_style) =>
var line hl = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var line ll = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var label lbl = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}L', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
var label hlb = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}H', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
hy = ta.valuewhen(h != h , h , 1)
hx = ta.valuewhen(h == high , time , 1)
ly = ta.valuewhen(l != l , l , 1)
lx = ta.valuewhen(l == low , time , 1)
if barstate.islast
extension = time + (time - time ) * 50
line.set_xy1(hl , hx , hy)
line.set_xy2(hl , extension , hy)
label.set_xy(hlb, extension , hy)
line.set_xy1(ll , lx , ly)
line.set_xy2(ll , extension , ly)
label.set_xy(lbl, extension , ly)
if lvl_daily
mtfphl(pdh , pdl , 'D' , css_d, s_d)
if lvl_weekly
mtfphl(pwh , pwl , 'W' , css_w, s_w)
if lvl_monthly
mtfphl(pmh , pml, 'M' , css_m, s_m)
if lvl_yearly
mtfphl(pyh , pyl , '12M', css_y, s_y)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Market Structure }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method darkcss(color css, float factor, bool bull) =>
blue = color.b(css) * (1 - factor)
red = color.r(css) * (1 - factor)
green = color.g(css) * (1 - factor)
color.rgb(red, green, blue, 0)
method f_line(msDraw d, size, style) =>
var line id = na
var label lbl = na
id := line.new(
d.n
, d.p
, b.n
, d.p
, color = d.css
, width = 1
, style = style
)
if msline.size() >= 250
line.delete(msline.shift())
msline.push(id)
lbl := label.new(
int(math.avg(d.n, b.n))
, d.p
, d.txt
, color = invcol
, textcolor = d.css
, style = d.bull ? label.style_label_down : label.style_label_up
, size = size
, text_font_family = font.family_monospace
)
structure(bool mtf) =>
msDraw drw = na
bool isdrw = false
bool isdrwS = false
var color css = na
var color icss = na
var int itrend = 0
var int trend = 0
bool bull_ob = false
bool bear_ob = false
bool s_bull_ob = false
bool s_bear_ob = false
n = bar_index
var ms up = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms dn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sup = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sdn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
switch show_swing_ms
"All" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, true )
"CHoCH" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, false )
"CHoCH+" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, true )
"BOS" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
"None" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
=> na
switch show_internal_ms
"All" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, true )
"CHoCH" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, false)
"CHoCH+" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, true )
"BOS" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
"None" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
=> na
switch
iH =>
up.p.unshift(b.h )
up.l.unshift(b.h )
up.n.unshift(n )
iL =>
dn.p.unshift(b.l )
dn.l.unshift(b.l )
dn.n.unshift(n )
sL =>
sdn.p.unshift(b.l )
sdn.l.unshift(b.l )
sdn.n.unshift(n )
sH =>
sup.p.unshift(b.h )
sup.l.unshift(b.h )
sup.n.unshift(n )
// INTERNAL BULLISH STRUCTURE
if up.p.size() > 0 and dn.l.size() > 1
if ta.crossover(b.c, up.p.first())
bool CHoCH = na
string txt = na
if itrend < 0
CHoCH := true
switch
not CHoCH =>
txt := "BOS"
css := i_ms_up_BOS
blalert.bos := true
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS
, txt
, true
)
CHoCH =>
dn.l.first() > dn.l.get(1) ? blalert.chochplus : blalert.choch
txt := dn.l.first() > dn.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_up_BOS.darkcss(0.25, true)
if (dn.l.first() > dn.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => bull_ob := true
ob_filter == "BOS" and txt == "BOS" => bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bull_ob := true
itrend := 1
up.n.clear()
up.p.clear()
// INTERNAL BEARISH STRUCTURE
if dn.p.size() > 0 and up.l.size() > 1
if ta.crossunder(b.c, dn.p.first())
bool CHoCH = na
string txt = na
if itrend > 0
CHoCH := true
switch
not CHoCH =>
bralert.bos := true
txt := "BOS"
css := i_ms_dn_BOS
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS
, txt
, false
)
CHoCH =>
if up.l.first() < up.l.get(1)
bralert.chochplus := true
else
bralert.choch := true
txt := up.l.first() < up.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_dn_BOS.darkcss(0.25, false)
if (up.l.first() < up.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => bear_ob := true
ob_filter == "BOS" and txt == "BOS" => bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bear_ob := true
itrend := -1
dn.n.clear()
dn.p.clear()
// SWING BULLISH STRUCTURE
if sup.p.size() > 0 and sdn.l.size() > 1
if ta.crossover(b.c, sup.p.first())
bool CHoCH = na
string txt = na
if trend < 0
CHoCH := true
switch
not CHoCH =>
blalert.swingbos := true
txt := "BOS"
icss := s_ms_up_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS
, txt
, true
)
CHoCH =>
if sdn.l.first() > sdn.l.get(1)
blalert.chochplusswing := true
else
blalert.chochswing := true
txt := sdn.l.first() > sdn.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_up_BOS.darkcss(0.25, true)
if (sdn.l.first() > sdn.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => s_bull_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bull_ob := true
trend := 1
sup.n.clear()
sup.p.clear()
// SWING BEARISH STRUCTURE
if sdn.p.size() > 0 and sup.l.size() > 1
if ta.crossunder(b.c, sdn.p.first())
bool CHoCH = na
string txt = na
if trend > 0
CHoCH := true
switch
not CHoCH =>
bralert.swingbos := true
txt := "BOS"
icss := s_ms_dn_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS
, txt
, false
)
CHoCH =>
if sup.l.first() < sup.l.get(1)
bralert.chochplusswing := true
else
bralert.chochswing := true
txt := sup.l.first() < sup.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_dn_BOS.darkcss(0.25, false)
if (sup.l.first() < sup.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => s_bear_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bear_ob := true
trend := -1
sdn.n.clear()
sdn.p.clear()
= structure(false)
if isdrw
f_line(drw, size.small, line.style_dashed)
if isdrwS
f_line(drw, size.small, line.style_solid)
= request.security("", "15" , structure(true))
= request.security("", "60" , structure(true))
= request.security("", "240" , structure(true))
= request.security("", "1440" , structure(true))
if show_mtf_str
var tab = table.new(position = position.top_right, columns = 10, rows = 10, bgcolor = na, frame_color = color.rgb(54, 58, 69, 0), frame_width = 1, border_color = color.rgb(54, 58, 69, 100), border_width = 1)
table.cell(tab, 0, 1, text = "15" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 2, text = "1H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 3, text = "4H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 4, text = "1D" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 1, 1, text = itrend15 == 1 ? "BULLISH" : itrend15 == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend15 == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend15 == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 2, text = itrend1H == 1 ? "BULLISH" : itrend1H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 3, text = itrend4H == 1 ? "BULLISH" : itrend4H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend4H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend4H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 4, text = itrend1D == 1 ? "BULLISH" : itrend1D == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1D == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1D == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 5, text = "Detected Pattern", text_halign = text.align_center, text_size = size.normal, text_color = color.silver, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 6, text = p.found, text_halign = text.align_center, text_size = size.normal, text_color = na(p.bull) ? color.white : p.bull ? i_ms_up_BOS.darkcss(-0.25, true) : p.bull == false ? i_ms_dn_BOS.darkcss(0.25, false) : na, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.merge_cells(tab, 0, 5, 1, 5)
table.merge_cells(tab, 0, 6, 1, 6)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Strong/Weak High/Low And Equilibrium }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
var phl = Zphl.new(
na
, na
, label.new(na , na , color = invcol , textcolor = i_ms_dn_BOS , style = label.style_label_down , size = size.tiny , text = "")
, label.new(na , na , color = invcol , textcolor = i_ms_up_BOS , style = label.style_label_up , size = size.tiny , text = "")
, true
, true
, true
, true
, ""
, ""
, 0
, 0
, 0
, 0
, high
, low
, 0
, 0
, 0
, 0
, 0
, 0
, na
, na
)
zhl(len)=>
upper = ta.highest(len)
lower = ta.lowest(len)
var float out = 0
out := b.h > upper ? 0 : b.l < lower ? 1 : out
top = out == 0 and out != 0 ? b.h : 0
btm = out == 1 and out != 1 ? b.l : 0
= zhl(sLen)
= zhl(iLen)
upphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
if top
phl.stopcross := true
phl.txtup := top > phl.topy ? "HH" : "HL"
if show_lbl
topl = label.new(
b.n - swing_r_lookback
, top
, phl.txtup
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
line.delete(phl.top )
phl.top := line.new(
b.n - sLen
, top
, b.n
, top
, color = toplvl)
phl.topy := top
phl.topx := b.n - sLen
phl.tup := top
phl.tupx := b.n - sLen
if itop
phl.itopcross := true
phl.itopy := itop
phl.itopx := b.n - iLen
phl.tup := math.max(high, phl.tup)
phl.tupx := phl.tup == high ? b.n : phl.tupx
phl.uV := phl.tup != phl.tup ? b.v : phl.uV
if barstate.islast
line.set_xy1(
phl.top
, phl.tupx
, phl.tup
)
line.set_xy2(
phl.top
, b.n + 50
, phl.tup
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tup
)
dist = math.abs(phl.uV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend < 0
? "Strong High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
dnphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
if btm
phl.sbottomcross := true
phl.txtdn := btm > phl.bottomy ? "LH" : "LL"
if show_lbl
btml = label.new(
b.n - swing_r_lookback
, btm, phl.txtdn
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
line.delete(phl.bottom )
phl.bottom := line.new(
b.n - sLen
, btm
, b.n
, btm
, color = btmlvl
)
phl.bottomy := btm
phl.bottomx := b.n - sLen
phl.tdn := btm
phl.tdnx := b.n - sLen
if ibtm
phl.ibottomcross := true
phl.ibottomy := ibtm
phl.ibottomx := b.n - iLen
phl.tdn := math.min(low, phl.tdn)
phl.tdnx := phl.tdn == low ? b.n : phl.tdnx
phl.dV := phl.tdn != phl.tdn ? b.v : phl.dV
if barstate.islast
line.set_xy1(
phl.bottom
, phl.tdnx
, phl.tdn
)
line.set_xy2(
phl.bottom
, b.n + 50
, phl.tdn
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tdn
)
dist = math.abs(phl.dV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend > 0
? "Strong Low | " + str.tostring(phl.dV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak Low | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
midphl() =>
avg = math.avg(phl.bottom.get_y2(), phl.top.get_y2())
var line l = line.new(
y1 = avg
, y2 = avg
, x1 = b.n - sLen
, x2 = b.n + 50
, color = midlvl
, style = line.style_solid
)
var label lbl = label.new(
x = b.n + 50
, y = avg
, text = "Equilibrium"
, style = label.style_label_left
, color = invcol
, textcolor = midlvl
, size = size.small
)
if barstate.islast
more = (phl.bottom.get_x1() + phl.bottom.get_x2()) > (phl.top.get_x1() + phl.top.get_x2()) ? phl.top.get_x1() : phl.bottom.get_x1()
line.set_xy1(l , more , avg)
line.set_xy2(l , b.n + 50, avg)
label.set_x (lbl , b.n + 50 )
label.set_y (lbl , avg )
dist = math.abs((l.get_y2() - close) / close) * 100
label.set_text (lbl, "Equilibrium (" + str.tostring(math.round(dist,0)) + "%)")
hqlzone() =>
if barstate.islast
var hqlzone dZone = hqlzone.new(
box.new(
na
, na
, na
, na
, bgcolor = color.new(toplvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(midlvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(btmlvl, 70)
, border_color = na
)
, label.new(na, na, text = "Premium" , color = invcol, textcolor = toplvl, style = label.style_label_down, size = size.small)
, label.new(na, na, text = "Equilibrium", color = invcol, textcolor = midlvl, style = label.style_label_left, size = size.small)
, label.new(na, na, text = "Discount" , color = invcol, textcolor = btmlvl, style = label.style_label_up , size = size.small)
)
dZone.pbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)) , phl.tup)
dZone.pbx.set_rightbottom(b.n + 50 , 0.95 * phl.tup + 0.05 * phl.tdn)
dZone.ebx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.525 * phl.tup + 0.475 * phl.tdn)
dZone.ebx.set_rightbottom(b.n + 50 , 0.525 * phl.tdn + 0.475 * phl.tup)
dZone.lbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.95 * phl.tdn + 0.05 * phl.tup)
dZone.lbx.set_rightbottom(b.n + 50 , phl.tdn)
dZone.plb.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tup)
dZone.elb.set_xy( int(b.n + 50) , math.avg(phl.tup, phl.tdn))
dZone.lbl.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tdn)
if show_mtb
upphl (trend)
dnphl (trend)
hqlzone()
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Volumetric Order Block }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method eB(box b, bool ext, color css, bool swing) =>
b.unshift(
box.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, text_font_family = font.family_monospace
, extend = ext ? extend.right : extend.none
, border_color = swing ? color.new(css, 0) : color.new(color.white,100)
, bgcolor = css
, border_width = 1
)
)
method eL(line l, bool ext, bool solid, color css) =>
l.unshift(
line.new(
na
, na
, na
, na
, width = 1
, color = css
, xloc = xloc.bar_time
, extend = ext ? extend.right : extend.none
, style = solid ? line.style_solid : line.style_dashed
)
)
method drawVOB(bool cdn, bool bull, color css, int loc, bool swing) =>
= request.security(
syminfo.tickerid
, ""
,
, lookahead = barmerge.lookahead_off
)
var obC obj = obC.new(
array.new()
, array.new()
, array.new< int >()
, array.new()
, array.new()
, array.new()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new()
, array.new()
, array.new< int >()
)
var obD draw = obD.new(
array.new()
, array.new()
, array.new()
, array.new()
, array.new()
)
if barstate.isfirst
for i = 0 to ob_num - 1
draw.mL .eL(false, false, use_grayscale ? color.new(color.gray, 0) : color.new(css,0))
draw.ob .eB(false, use_grayscale ? color.new(color.gray, 90) : css, swing)
draw.blB.eB(false, css_metric_up , swing)
draw.brB.eB(false, css_metric_dn , swing)
draw.eOB.eB(true , use_grayscale ? color.new(color.gray, 90) : css, swing)
float pos = ob_pos == "Full"
? (bull ? high : low)
: ob_pos == "Middle"
? ohlc4
: ob_pos == "Accurate"
? hl2
: hl2
if cdn
obj.h.clear()
obj.l.clear()
obj.n.clear()
for i = 0 to math.abs((loc - b.n)) - 1
obj.h.push(hH )
obj.l.push(lL )
obj.n.push(b.t )
// obj.h.reverse()
// obj.l.reverse()
int iU = obj.l.indexof(obj.l.min()) + 1
int iD = obj.h.indexof(obj.h.max()) + 1
obj.dir.unshift(
bull
? (b.c > b.o ? 1 : -1)
: (b.c > b.o ? 1 : -1)
)
obj.top.unshift(
bull
? pos
: obj.h.max()
)
obj.btm.unshift(
bull
? obj.l.min()
: pos
)
obj.left.unshift(
bull
? obj.n.get(obj.l.indexof(obj.l.min()))
: obj.n.get(obj.h.indexof(obj.h.max()))
)
obj.avg.unshift(
math.avg(obj.top.first(), obj.btm.first())
)
obj.cV.unshift(
bull
? b.v
: b.v
)
if ob_pos == "Precise"
switch bull
true =>
if obj.avg.get(0) < (b.c < b.o ? b.c : b.o ) and obj.top.get(0) > hlcc4
obj.top.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
false =>
if obj.avg.get(0) > (b.c < b.o ? b.o : b.c ) and obj.btm.get(0) < hlcc4
obj.btm.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
obj.blVP.unshift ( 0 )
obj.brVP.unshift ( 0 )
obj.wM .unshift ( 1 )
if use_overlap
int rmP = use_overlap_method == "Recent" ? 1 : 0
if obj.avg.size() > 1
if bull
? obj.btm.first() < obj.top.get(1)
: obj.top.first() > obj.btm.get(1)
obj.wM .remove(rmP)
obj.cV .remove(rmP)
obj.dir .remove(rmP)
obj.top .remove(rmP)
obj.avg .remove(rmP)
obj.btm .remove(rmP)
obj.left .remove(rmP)
obj.blVP .remove(rmP)
obj.brVP .remove(rmP)
if barstate.isconfirmed
for x = 0 to ob_num - 1
tg = switch ob_mitigation
"Middle" => obj.avg
"Absolute" => bull ? obj.btm : obj.top
for in tg
if (bull ? cC < pt : cC > pt)
obj.wM .remove(idx)
obj.cV .remove(idx)
obj.dir .remove(idx)
obj.top .remove(idx)
obj.avg .remove(idx)
obj.btm .remove(idx)
obj.left .remove(idx)
obj.blVP .remove(idx)
obj.brVP .remove(idx)
if barstate.islast
if obj.avg.size() > 0
// Alert
if bull
? ta.crossunder(low , obj.top.get(0))
: ta.crossover (high, obj.btm.get(0))
switch bull
true => blalert.obtouch := true
false => bralert.obtouch := true
float tV = 0
obj.dV.clear()
seq = math.min(ob_num - 1, obj.avg.size() - 1)
for j = 0 to seq
tV += obj.cV.get(j)
if j == seq
for y = 0 to seq
obj.dV.unshift(
math.floor(
(obj.cV.get(y) / tV) * 100)
)
obj.dV.reverse()
for i = 0 to math.min(ob_num - 1, obj.avg.size() - 1)
dmL = draw.mL .get(i)
dOB = draw.ob .get(i)
dblB = draw.blB.get(i)
dbrB = draw.brB.get(i)
deOB = draw.eOB.get(i)
dOB.set_lefttop (obj.left .get(i) , obj.top.get(i))
deOB.set_lefttop (b.t , obj.top.get(i))
dOB.set_rightbottom (b.t , obj.btm.get(i))
deOB.set_rightbottom(b.t + (b.t - b.t ) * 100 , obj.btm.get(i))
if use_middle_line
dmL.set_xy1(obj.left.get(i), obj.avg.get(i))
dmL.set_xy2(b.t , obj.avg.get(i))
if ob_metrics_show
dblB.set_lefttop (obj.left.get(i), obj.top.get(i))
dbrB.set_lefttop (obj.left.get(i), obj.avg.get(i))
dblB.set_rightbottom(obj.left.get(i), obj.avg.get(i))
dbrB.set_rightbottom(obj.left.get(i), obj.btm.get(i))
rpBL = dblB.get_right()
rpBR = dbrB.get_right()
dbrB.set_right(rpBR + (b.t - b.t ) * obj.brVP.get(i))
dblB.set_right(rpBL + (b.t - b.t ) * obj.blVP.get(i))
if use_show_metric
txt = switch
obj.cV.get(i) >= 1000000000 => str.tostring(math.round(obj.cV.get(i) / 1000000000,3)) + "B"
obj.cV.get(i) >= 1000000 => str.tostring(math.round(obj.cV.get(i) / 1000000,3)) + "M"
obj.cV.get(i) >= 1000 => str.tostring(math.round(obj.cV.get(i) / 1000,3)) + "K"
obj.cV.get(i) < 1000 => str.tostring(math.round(obj.cV.get(i)))
deOB.set_text(
str.tostring(
txt + " (" + str.tostring(obj.dV.get(i)) + "%)")
)
deOB.set_text_size (size.auto)
deOB.set_text_halign(text.align_left)
deOB.set_text_color (use_grayscale ? color.silver : color.new(css, 0))
if ob_metrics_show and barstate.isconfirmed
if obj.wM.size() > 0
for i = 0 to obj.avg.size() - 1
switch obj.dir.get(i)
1 =>
switch obj.wM.get(i)
1 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 1)
-1 =>
switch obj.wM.get(i)
1 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 1)
var hN = array.new(1, b.n)
var lN = array.new(1, b.n)
var hS = array.new(1, b.n)
var lS = array.new(1, b.n)
if iH
hN.pop()
hN.unshift(int(b.n ))
if iL
lN.pop()
lN.unshift(int(b.n ))
if sH
hS.pop()
hS.unshift(int(b.n ))
if sL
lS.pop()
lS.unshift(int(b.n ))
if ob_show
bull_ob.drawVOB(true , ob_bull_css, hN.first(), false)
bear_ob.drawVOB(false, ob_bear_css, lN.first(), false)
if ob_swings
s_bull_ob.drawVOB(true , css_swing_up, hS.first(), true)
s_bear_ob.drawVOB(false, css_swing_dn, lS.first(), true)
if bull_ob
blalert.ob := true
if bear_ob
bralert.ob := true
if s_bull_ob
blalert.swingob := true
if s_bear_ob
blalert.swingob := true
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - FVG | VI | OG }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
ghl() => request.security(syminfo.tickerid, fvg_tf, [high , low , close , open ])
tfG() => request.security(syminfo.tickerid, fvg_tf, )
cG(bool bull) =>
= ghl()
= tfG()
var FVG draw = FVG.new(
array.new()
, array.new()
)
var FVG cords = array.new()
float pup = na
float pdn = na
bool cdn = na
int pos = 2
cc = timeframe.change(fvg_tf)
if barstate.isfirst
for i = 0 to fvg_num - 1
draw.box.unshift(box.new (na, na, na, na, border_color = color.new(color.white, 100), xloc = xloc.bar_time))
draw.ln.unshift (line.new(na, na, na, na, xloc = xloc.bar_time, width = 1, style = line.style_solid))
switch what_fvg
"FVG" =>
pup := bull ? gl : l
pdn := bull ? h : gh
cdn := bull ? gl > h and cc : gh < l and cc
pos := 2
"VI" =>
pup := bull
? (gc > go
? go
: gc)
: (gc > go
? go
: gc )
pdn := bull
? (gc > go
? gc
: go )
: (gc > go
? gc
: go)
cdn := bull
? go > gc and gh >
Filter Cross1. Indicator Name
Filter Cross Indicator
2. One-line Introduction
A multi-filtered crossover strategy that enhances classic moving average signals with trend, volatility, volume, and momentum confirmation.
3. General Overview
The Filter Cross indicator builds upon the traditional golden/dead cross concept by incorporating additional market filters to evaluate the quality of each signal. It uses two key moving averages (50-period and 200-period SMA) to identify crossovers, while adding four advanced metrics:
Linear regression trend ordering,
ATR-based volatility positioning,
Volume pressure,
Price positioning relative to fast MA.
These components are individually scored and averaged to calculate a Confidence %, which is displayed on the chart alongside each crossover signal. Visual cues such as dynamic color changes reflect the current trend direction and strength, making it intuitive for both novice and experienced traders.
The indicator is especially effective in swing trading and trend-following strategies, where false signals can be filtered out through the additional logic.
Security measures are applied to ensure that the core logic remains protected, making it safe for proprietary use.
4. Key Advantages
✅ Multi-factor Signal Validation
Evaluates each signal using four key market filters to improve reliability over classic crossovers.
📉 Confidence Score Display
Each signal is accompanied by a Confidence % label to help traders assess entry/exit quality.
🎨 Dynamic Color Feedback
Automatically adjusts chart color based on trend intensity and direction, aiding visual clarity.
🔍 Linear Regression Trend Logic
Uses pairwise comparison of regression data to quantify trend alignment across lookback periods.
📈 Reduced False Signals
Minimizes noise and weak signals during sideways markets using adaptive thresholds.
📘 Indicator User Guide
📌 Basic Concept
Filter Cross enhances moving average crossover signals using four additional market-based filters.
These include trend alignment, volatility range, volume strength, and price momentum.
Final signals are graded with a Confidence % score, showing how favorable the conditions are for action.
⚙️ Settings Explained
Fast MA Length: Short-term moving average period (default: 50)
Slow MA Length: Long-term moving average period (default: 200)
Linear Regression Length: Period used to assess price trend alignment
Trend Lookback / Threshold: Sensitivity controls for trend scoring
Volume Lookback / ATR Length: Defines volatility and volume filters
Bull/Bear Color: Customize visual colors for bullish and bearish signals
📈 Buy Timing Example
Golden Cross occurs (50 MA crosses above 200 MA)
Confidence % is above 70%
Trend color turns green, volume is rising, price above fast MA → Strong entry signal
📉 Sell Timing Example
Dead Cross occurs (50 MA crosses below 200 MA)
Confidence % above 60% indicates a reliable bearish setup
Regression trend down, color turns red → Valid exit or short opportunity
🧪 Recommended Use Cases
Combine with RSI or MACD for timing confirmation in swing trades
Use Confidence % to filter out weak crossover signals during sideways trends
Effective in medium-to-long term trading with volatile assets
🔒 Precautions
Confidence % reflects current conditions—not future prediction—use with discretion
May produce delayed signals in ranging markets; test before real application
Best results achieved when combined with other indicators or price action context
Always optimize parameters based on the specific market or asset being traded
+++
Z-Score Regime DetectorThe Z-Score Regime Detector is a statistical market regime indicator that helps identify bullish and bearish market conditions based on normalized momentum of three core metrics:
- Price (Close)
- Volume
- Market Capitalization (via CRYPTOCAP:TOTAL)
Each metric is standardized using the Z-score over a user-defined period, allowing comparison of relative extremes across time. This removes raw value biases and reveals underlying momentum structure.
📊 How it Works
- Z-Score: Measures how far a current value deviates from its average in terms of standard deviations.
- A Bullish Regime is identified when both price and market cap Z-scores are above the volume Z-score.
- A Bearish Regime occurs when price and market cap Z-scores fall below volume Z-score.
Bias Signal:
- Bullish Bias = Price Z-score > Market Cap Z-score
- Bearish Bias = Market Cap Z-score > Price Z-score
This provides a statistically consistent framework to assess whether the market is flowing with strength or stress.
✅ Why This Might Be Effective
- Normalizing the data via Z-scores allows comparison of diverse metrics on a common scale.
- Using market cap offers broader insight than price alone, especially for crypto.
- Volume as a reference threshold helps identify accumulation/distribution regimes.
- Simple regime logic makes it suitable for trend confirmation, filtering, or position biasing in systems.
⚠️ Disclaimer
This script is for educational purposes only and should not be considered financial advice. Always perform your own research and risk management. Past performance is not indicative of future results. Use at your own discretion.
MA200 Parallel ChannelDynamic MA100 Parallel Bands – Precision S/R Levels
This indicator builds a clean, parallel channel around the 100-period moving average using a fixed ±4 offset.
Because the offset mirrors the short-term MA1 fluctuations, the channel reveals highly accurate support and resistance zones that react instantly to market micro-structure.
Unlike Bollinger Bands—which expand with volatility—this tool stays perfectly parallel and trend-aligned, making breakouts and pullbacks incredibly easy to spot.
How it works:
Centerline: 100-period moving average (MA100)
Upper Band: MA100 + 4
Lower Band: MA100 – 4
MA1 used as a sensitivity reference for micro-trend behavior
Parallel structure ensures stable, predictable levels
Why it’s powerful:
The ±4 channel creates extremely precise S/R zones
Price respecting the lower band = dynamic support
Price rejecting the upper band = dynamic resistance
A clean break above or below the bands highlights strong momentum shifts
Perfect for intraday traders needing structure without noise
Perfect for:
Identifying high-probability bounce levels
Spotting early trend continuation
Confirming MA100 breakouts
Filtering weak signals and fake volatility spikes
If you want razor-sharp support & resistance levels that stay consistent across all timeframes, these MA100 parallel bands deliver exceptional clarity.
Vital Wave 20-50Simplicity is almost always the most effective approach, and here I’m giving you a trend-following system that exploits the bullish bias of traditional markets and their trending nature, with very basic rules.
Rules (long entries only)
• Market entry: When the EMA 20 crosses above the EMA 50 (from below)
• Main market exit: When the EMA 20 crosses below the EMA 50 (from above)
• Fixed Stop Loss: Placed at the price level of the Lower Bollinger Band at the moment the trade is entered.
In my strategy, the primary exit is when the EMA 20 crosses below the EMA 50. However, this crossover can sometimes take a while to occur, and in the meantime the price may have already dropped significantly. The Stop Loss based on the Lower Bollinger Band is designed to limit losses in case the market moves sharply against the position without giving the bearish crossover signal in time. Having two exit conditions makes the strategy much more robust in terms of risk management.
Risk Management:
• Initial capital: $10,000
• Position size: 10% of available capital per trade
• Commissions: 0.1% on traded volume
• Stop Loss: Based on the Lower Bollinger Band
• Take Profit / Exit: When EMA 20 crosses below EMA 50
Recommended Markets:
XAUUSD (OANDA) (Daily)
Period: January 3, 1833 – November 23, 2025
Total Profit & Loss: +$6,030.62 USD (+57.57%)
Maximum Drawdown: $541.53 USD (3.83%)
Total Trades: 136
Winning Trades (Win Rate): 36.03% (49/136)
Profit Factor: 2.483
XAUUSD (OANDA) (12-hour)
Period: March 19, 2006 – November 23, 2025
Total Profit & Loss: +$1,209.56 USD (+11.89%)
Maximum Drawdown: $384.58 USD (3.61%)
Total Trades: 97
Winning Trades (Win Rate): 35.05% (34/97)
Profit Factor: 1.676
XAUUSD (OANDA) (8-hour)
Period: March 19, 2006 – November 23, 2025
Total Profit & Loss: +$1,179.36 USD (+11.81%)
Maximum Drawdown: $246.88 USD (2.32%)
Total Trades: 147
Winning Trades (Win Rate): 31.97% (47/147)
Profit Factor: 1.626
Tesla (NASDAQ) (4-hour)
Period: June 29, 2010 – November 23, 2025
Total Profit & Loss (Absolute): +$11,687.90 USD (+116.88%)
Maximum Drawdown: $922.05 USD (6.50%)
Total Trades: 68
Winning Trades (Win Rate): 39.71% (27/68)
Profit Factor: 4.156
Tesla (NASDAQ) (3-hour)
Total Profit & Loss: +$11,522.33 USD (+115.22%)
Maximum Drawdown: $1,247.60 USD (8.80%)
Total Trades: 114
Winning Trades: 33.33% (38/114)
Profit Factor: 2.811
Additional Recommendations
(These assets have shown good trending behavior with the same strategy across multiple timeframes):
• NVDA (15 min, 30 min, 1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
• NFLX (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
• MA (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
• META (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
• AAPL (1h, 2h, 3h, 4h, 6h, 8h, 12h, Daily)
• SPY (12h, Daily)
About the Code
The user can modify:
• EMA periods (20 and 50 by default)
• Bollinger Bands length (20 periods)
• Standard deviation (2.0)
Visualization
• EMA 20: Blue line
• EMA 50: Red line
• Green background when EMA20 > EMA50 (bullish trend)
• Red background when EMA20 < EMA50 (bearish trend)
Important Note:
We can significantly increase the profit factor and overall profitability by risking a fixed percentage per trade instead of a fixed amount. This would prevent losses from fluctuating with changes in volatility.
This could be implemented by reducing position size or adjusting leverage based on the volatility percentage required for each trade, but I’m not sure if this is fully possible in Pine Script. In my other script, “ Golden Cross 50/200 EMA ,” I go deeper into this topic and provide examples.
I hope you enjoy this contribution. Best regards!
SuperEMA RSI Strategy [wjdtks255]Indicator Description and Trading Guide for “SuperEMA RSI Strategy ”
Indicator Name: SuperEMA RSI Strategy
Description
The SuperEMA RSI Strategy combines fast and slow Exponential Moving Averages (EMA) to identify key trend changes, enhanced with the Relative Strength Index (RSI) to filter momentum strength. It plots clear buy and sell signals based on EMA crossovers while highlighting trend zones with colored backgrounds for quick visual reference. This multi-timeframe compatible indicator is suitable for stocks, cryptocurrencies, and other markets.
How to Use the SuperEMA RSI Strategy
Buy Signal:
Enter a long position when the short-term EMA crosses above the long-term EMA, indicated by a green circle below the price bar. Confirm the trend with a green background and consider RSI values showing sufficient momentum (typically RSI above 50).
Sell Signal:
Enter a short position when the short-term EMA crosses below the long-term EMA, indicated by a red circle above the price bar. Confirm the bearish trend with a red background and verify momentum weakening (typically RSI below 50).
Trend Confirmation:
Use the background color-shaded zones to identify prevailing trend strength and avoid counter-trend trades.
RSI Application:
Optionally enable RSI display to avoid overbought/oversold entries by watching for levels above 70 (overbought) or below 30 (oversold).
Additional Tips
Adjust EMA and RSI parameters to suit different timeframes or asset volatility.
Combine this indicator with volume analysis and other technical tools for enhanced signal reliability.
Implement well-defined stop-loss and take-profit levels to manage risk effectively.
Today Range Calculator1. Indicator Name
Today (Today’s Volatility)
2. One-line Introduction
Displays real-time 30-day historical volatility (HV30) as a compact table on the chart, helping traders instantly assess market risk levels.
3. General Overview
Today ↑↓ is a lightweight informational widget that calculates and displays the 30-day Historical Volatility (HV30) of the asset in real time.
Using logarithmic returns over the past 30 periods, the script computes variance and then annualizes it to express volatility as a percentage (%) per year.
The result is shown in a clean 1x1 table cell, which can be positioned anywhere on the chart—top/bottom, left/right—depending on your preference.
This makes it easy to quickly evaluate whether the current market is high-risk (volatile) or stable, without cluttering the chart.
It’s especially useful for position sizing, risk management, volatility-based entry/exit decisions, and as a filter for breakout strategies.
Built with performance in mind, the script uses minimal system resources and can be used alongside any indicator or strategy without interference.
4. Key Advantages
📈 Real-time HV30 Display
Calculates and displays 30-day historical volatility using annualized log return variance.
📍 Custom Table Positioning
Place the volatility display in any corner of the chart for optimal visibility.
🧮 Accurate Log Return Calculation
Uses logarithmic returns to ensure precise volatility representation over time.
🎯 Quick Market Sentiment Read
Helps you determine at a glance whether the asset is in a calm or volatile environment.
🧼 Minimalist Design
Clean 1-cell table format keeps your chart readable and organized.
🚀 Ultra-Lightweight Script
Runs efficiently with negligible impact on chart performance.
📘 Indicator User Guide
📌 Basic Concept
Today ↑↓ calculates 30-day Historical Volatility (HV30) by analyzing the asset’s log returns over the past 30 bars.
The result is annualized and shown as a percentage to reflect volatility in standardized terms.
Useful for gauging risk levels and strategy suitability in current market conditions.
⚙️ Settings Explained
Table Position: Choose where the volatility table appears:
Top Left / Top Right / Bottom Left / Bottom Right
📈 High Volatility Example
HV30 > 50% indicates a volatile environment
Suggests wider stop-losses, cautious position sizing, or favoring breakout strategies
📉 Low Volatility Example
HV30 < 15% suggests a calm market or range-bound behavior
Useful as a signal for upcoming volatility expansions or breakout preparations
🧪 Recommended Use Cases
Position Sizing: Scale position size based on HV30 readings
Strategy Filter: Activate certain systems only when volatility meets predefined conditions
Breakout Timing: Identify low-volatility zones as potential breakout opportunities
🔒 Precautions
This indicator does not generate buy/sell signals; it is a volatility reference tool
HV thresholds vary across asset classes—adjust interpretation accordingly
Since HV30 is historical, it may lag during rapid market changes
MoneyLine FusionMoneyLine Fusion is an advanced multi-indicator system combining linear regression trend analysis with dynamic volatility bands, Fisher Transform oscillator signals, and Aroon momentum filters. The core "Money Line" uses linear regression to identify trend direction, surrounded by ATR-based bands that dynamically expand during strong trends (powered by ADX). Buy and sell signals trigger when the Fisher Transform crosses extreme levels (-2.0/+2.0) while Aroon conditions confirm momentum exhaustion or reversal. The indicator features an enhanced scoring system integrating MACD, DMI, MFI, and RSI to provide a comprehensive market sentiment gauge. Visual feedback includes color-coded trend bands, scoring bars at chart bottom, and an info panel displaying Money Line value, volatility percentile, RSI levels, and composite TA score. Signal filtering prevents duplicate entries within 5 bars, and all parameters (Fisher/Aroon periods, signal thresholds, band multipliers) are fully customizable. Ideal for swing traders seeking high-probability entries with multi-timeframe confluence and clear visual confirmation.
Price Action - Reversal BarInspired by Al Brooks' "Trading Price Action Reversals," this indicator detects potential bull and bear reversal bars. Bull reversals require a green bar with close above mid-range, small upper tail (≤30%), large lower tail (≥30%), and low below previous low without significant overlap. Bear reversals are the opposite. Triangles mark these setups for early reversal signals in trends or climaxes. Remember, markets test extremes—use with trend lines for confirmation, as single bars are often traps without a second leg.
Strict Weekly 50/200 WMA Signals True Weekly Only-Strict Weekly 50/200 WMA Signals True Weekly Only => also on other time frames than weekly (like daily, etc.) always indicates the indicators based on the weekly chart
-especially useful for Crypto
-gives buy and sell signals when the 200 WMA or the 50 WMA are crossed
-typically above the 50 WMA indicates a bull market
-reaching below the 200 WMA indicates a bear market and typically for investors with a longer time frame (>2-4 years) a good entry point






















