Redistribution ZoneIndicator marks the
- 9:30 Open
- 16:00 Close
- Midpoint or "Half-Gap" between the two.
Everyone is familiar with a typical gap fill indicator, this just makes it easier to see. Rule of thumb is Market Makers test for buyers and sellers at the midpoint, if price stalls it typically indicates a gap and go.
MOO and MOC most liquid spots in the market.
Penunjuk dan strategi
Simply BB WidthSimply BB Width
Plots the difference between the upper Bollinger Band and the lower Bollinger Band. That's it.
Analisi ilMondoVeroAnalisi ilMondoVero
Quantitative analysis indicator for long-term investors. Provides a comprehensive view of any asset's historical performance through rigorous statistical metrics.
Calculated Metrics:
• Growth Rate — Total return since the beginning of available data
• CAGR — Compound Annual Growth Rate, measures the annualized average return accounting for compounding effects
• Annual Mean — Arithmetic mean of yearly returns, useful for estimating expected return
• Annual Median — Central value of returns, more robust to outliers than the mean
• Standard Deviation — Measures volatility of annual returns, indicates historical risk
• Max Drawdown — Maximum percentage decline from peak, essential for assessing downside risk
• ROC — Daily Rate of Change, displays the percentage variation between consecutive bars
Visualization:
• Color-coded labels for each year showing % return (green = positive, red = negative)
• YTD (Year-To-Date) label for the current year
• ROC histogram on the zero line
• Historical Max Drawdown line
• Summary table with all metrics
Methodological Notes:
• Years with incomplete data (e.g., first year if not starting in January) are marked with an asterisk (*) and excluded from statistical calculations to avoid distorting results
• Standard deviation uses the sample formula (n-1) for an unbiased estimate
• CAGR is calculated using the formula: (Final_Value / Initial_Value)^(1/years) - 1
Recommended Use:
Apply on daily or higher timeframes for long-term analysis. Ideal for comparing historical performance across different assets (indices, ETFs, stocks) and evaluating the risk/return ratio.
Simple candle pattern detector🕯️ Simple Candle Pattern Detector
A comprehensive Pine Script indicator that automatically detects and displays 15 popular candlestick patterns with a convenient reference table.
📊 Features
Real-time Pattern Detection : Automatically identifies candlestick patterns as they form
Visual Labels : Displays emoji-based labels directly on the chart for easy recognition
Reference Table : Shows all available patterns with descriptions and trading signals
Pattern Highlighting : Current pattern is highlighted in yellow in the reference table
Customizable Styling : Adjust table size, borders, and text sizes to your preference
Tooltips : Hover over pattern labels for detailed descriptions
🎯 Detected Patterns
Reversal Patterns
╥ Hammer - Bullish reversal after decline
🪢👤 Hanging Man - Bearish reversal at peak
╨ Inverted Hammer - Bullish reversal after decline
🌠 Shooting Star - Bearish reversal after rise
🐂⤴ Bullish Engulfing - Strong bullish reversal
🐻⤵ Bearish Engulfing - Strong bearish reversal
🐂‖ Tweezer Bottom - Support level, bullish signal
🐻‖ Tweezer Top - Resistance level, bearish signal
☀⭐ Morning Star - Three-candle bullish reversal
🌙⭐ Evening Star - Three-candle bearish reversal
Continuation Patterns
🛡🛡🛡 Three White Soldiers - Strong uptrend continuation
🐦⬛🐦⬛🐦⬛ Three Black Crows - Strong downtrend continuation
Indecision Patterns
┼ Doji - Market uncertainty
🐂👔 Bullish In-Neck - Weak bullish signal
🐻👔 Bearish In-Neck - Weak bearish signal
⚙️ Customization Options
Table Style Settings
Table Rows (5-30): Adjust the number of visible rows
Border Width (0-5): Change cell border thickness
Frame Width (0-10): Adjust outer frame thickness
Text Size Settings
Header Text Size : Customize column header size
Pattern Text Size : Adjust emoji pattern display size
Description Text Size : Change description text size
🚀 How to Use
Add to Chart : Apply the indicator to any timeframe
Watch for Labels : Pattern labels appear above candles when detected
Check the Table : Reference table shows all patterns (top-right by default)
Current Pattern : Active pattern is highlighted in yellow
Hover for Details : Tooltips provide full pattern description
💡 Trading Tips
⚠️ Important : This indicator is for educational purposes. Always:
Confirm patterns with other technical indicators
Consider overall market trend and context
Use proper risk management
Practice on demo accounts first
Never rely on a single indicator for trading decisions
📈 Best Practices
Multi-Timeframe Analysis : Check patterns across different timeframes
Volume Confirmation : Verify patterns with volume indicators
Support/Resistance : Look for patterns near key levels
Trend Context : Reversal patterns work best at trend extremes
Continuation Patterns : Most effective within established trends
🔧 Technical Details
Version : Pine Script v6
Overlay : Yes (displays on price chart)
Performance : Lightweight, minimal resource usage
Compatibility : Works on all timeframes and instruments
📝 Pattern Detection Logic
Each pattern uses specific mathematical criteria:
Body size : |close - open|
Upper shadow : high - max(open, close)
Lower shadow : min(open, close) - low
Ratios : Customized for each pattern type
🎨 Visual Design
Clean, modern table design
Emoji-based pattern representation for
FOREXSOM EMA Crossover Buy & Sell IndicatorFOREXSOM EMA Crossover Buy & Sell Indicator
The FOREXSOM EMA Crossover Buy & Sell Indicator is a lightweight technical analysis tool designed to help traders visualize trend direction and momentum shifts using a dual Exponential Moving Average (EMA) framework.
This script plots a fast EMA and a slow EMA on the price chart and highlights potential BUY and SELL points when a crossover occurs. While EMA crossovers are a well-known concept, this indicator focuses on clarity, simplicity, and practical usability, making it suitable for traders who want a clean visual representation of trend changes without additional complexity.
How the indicator works
A BUY signal is displayed when the fast EMA crosses above the slow EMA, indicating a potential bullish momentum shift.
A SELL signal is displayed when the fast EMA crosses below the slow EMA, indicating a potential bearish momentum shift.
Both EMA lengths are fully adjustable, allowing users to adapt the indicator to different markets, timeframes, and personal trading preferences.
What makes this script useful
Clear visual signals directly on the chart
Adjustable EMA parameters for flexibility
Minimal design that does not clutter the chart
Works across Forex, stocks, indices, and cryptocurrencies
Can be combined with market structure, support and resistance, or higher-timeframe analysis
Usage notes and limitations
EMA crossover signals are most effective in trending market conditions and may generate false signals during sideways or low-volatility periods. This indicator does not attempt to predict price movement or filter market conditions on its own.
This script is intended for educational and technical analysis purposes only. It does not provide financial advice and does not guarantee trading outcomes. Users should apply proper risk management and use additional confirmation methods when making trading decisions.
GMS EMA'sGMS EMA’s is a clean, structure-focused indicator designed to help traders understand trend direction, market structure, and momentum shifts without cluttering the chart.
This indicator combines key exponential moving averages with internal and external market structure, Break of Structure (BOS), and Change of Character (CHOCH) logic to support discretionary, price-action-based trading.
It does not provide buy or sell signals. Instead, it helps traders read the market clearly and make informed decisions.
🔹 What’s Included
9 / 20 / 200 EMA system
Toggle each EMA on or off to match your trading style.
Internal & External Structure Detection
Clearly labeled swing highs and lows:
ISH / ISL (internal)
ESH / ESL (external)
Break of Structure (BOS)
Identifies structure continuation in the direction of the trend.
Change of Character (CHOCH)
Highlights potential shifts in momentum and early trend transitions.
Custom Structure Mode
View internal structure, external structure, or both.
Clean, candle-based visualization
No oscillators, no separate panels, no zigzag lines.
🔹 Who This Indicator Is For
Price-action traders
Structure-based traders
Forex, indices, crypto, and futures traders
Traders using top-down analysis
Traders who prefer clarity over complexity
🔹 How to Use
Use the 200 EMA and external structure to determine market bias.
Look for BOS to confirm trend continuation.
Use internal structure to refine entries.
Treat CHOCH as a warning, not a signal.
🔹 Philosophy
GMS EMA’s is built on the idea that less information leads to better decisions.
It’s designed to support discipline, awareness, and structure-based thinking — not to replace it.
Disclaimer:
This indicator is for educational purposes only and does not constitute financial advice. Always manage risk appropriately.
Three pillar rule + YTD line with color coding in the info boxThe script objectively shows you whether a market should be "held" from an annual, trend and YTD point of view - or not.
The infobox summarizes all three core statements:
Component statement
Beginning of the year: Was the start of the year positive?
YTD: Is the market above last year's level?
SMA: Is the market above the long-term trend? Positive?
Representation in the info box
Arrows/symbols (configurable)
Green/Red
Freely positionable in the chart
Typical use in practice
1. As bias filter
"Am I acting more long or defensive today?"
2. For position trading
"Can I buy pullbacks or just sell them?"
3. For Investments/ETFs/Crypto
"Hold or reduce risk?"
The script is not a
❌ No entry signal
❌ No exit signal
❌ No short-term trading indicator
The script follows Andre Stagge's three-thumb rule
First Candle RuleCaptures the 09:30–09:35 EST opening range on a 5-minute chart
Draws the high/low lines, optional midline, and a shaded box until 16:30 EST
Computes breakout signals every bar and then gates them by session/range readiness to satisfy the consistency warning
Multi TF Cierre de velas mayoresCuenta regresiva para el cierre de velas de H4, H8, H12 y TM personalizado
Overnight QQQ/ NQ Auto LevelsUsing QQQ Overnight pricing to have correct levels on the NQ Future Chart.
SOL Short EMA165 Failed ReclaimThis script identifies short opportunities on SOL when price attempts to reclaim the EMA 165 but fails.
A signal is generated when price trades above the EMA 165 and then closes back below it on the selected timeframe.
The script plots the EMA 165 and triggers an alert() for use with external execution (e.g. Bitget signal bots).
Designed for reliability and clean alert execution.
MACD Histogram Expansion Alerts (Scalp)Purpose: Alerts when MACD histogram is expanding (momentum increasing) rather than simply crossing. Designed for 1-minute scalping and intraday momentum confirmation.
This script is for traders who are tired of late MACD cross alerts.
Instead of firing when MACD lines cross (which often happens after the move), this indicator alerts when the MACD histogram is expanding — meaning momentum is actually increasing right now, not rolling over.
I use it as a “heads up” alert, not a buy/sell signal. When it fires, I check price action, volume, VWAP, support/resistance, etc., to see if the move is worth trading.
Best suited for 1-minute charts, scalping, and fast intraday momentum.
MACD Histogram Expansion Alerts (Scalp) is a lightweight alert-focused indicator designed for intraday traders and scalpers, particularly on lower timeframes such as the 1-minute chart.
Rather than triggering alerts on standard MACD line crossovers (which tend to lag in fast or volatile markets), this script detects MACD histogram expansion — a condition that indicates momentum acceleration, not just direction.
🔍 What this script does
Uses a fast MACD configuration suitable for lower timeframes
Monitors the MACD histogram slope and magnitude
Triggers alerts only when the histogram expands for multiple consecutive bars
Alerts are fired on bar close only, reducing noise and false intrabar signals
🚀 Why focus on histogram expansion?
Histogram expansion highlights when momentum is building, which can be useful for:
Continuation setups
Early momentum confirmation
Avoiding entries when momentum is already fading
This approach is especially helpful in small caps, news-driven stocks, and volatile intraday instruments, where traditional MACD cross alerts can arrive too late.
🔔 Alert Types
Bullish MACD Histogram Expansion
Bearish MACD Histogram Expansion
Each alert can be enabled independently and is intended as an attention signal, not a standalone trading system.
⚙️ Customizable Inputs
MACD Fast / Slow / Signal lengths
Number of consecutive expanding histogram bars required
Optional minimum histogram magnitude filter
Optional directional filter (above/below zero line)
⚠️ Important Notes!!!!
This script does not place trades
Alerts should be used with additional context, such as price action, volume, VWAP, or support/resistance
Not designed for higher-timeframe or swing trading use .
If you find this helpful, feel free to adapt it to your own trading style or timeframe. This script is meant to be simple, flexible, and non-opinionated.
NQ Scalp EMA Reclaim EMA Momentum Pullback Indicator
What it does (typical EMA method used for momentum trading):
Trend filter: Fast EMA above Slow EMA = bullish bias; below = bearish bias
Entry: In bullish bias, wait for a pullback to the EMA “zone”, then a reclaim candle → BUY
In bearish bias, pullback into zone then rejection → SELL
Optional 200 EMA filter (only take longs above 200, shorts below 200)
Timeframe WatermarkA clean, minimal watermark indicator that displays the current chart timeframe as a large, semi-transparent text overlay.
Features:
Automatically formats timeframes (1M, 15M, 1H, 4H, 1D, 1W, etc.)
Fully customizable appearance
9 position options (corners, edges, center)
Adjustable transparency for non-intrusive display
Works on all chart types and timeframes
Settings:
Appearance
Color : Watermark text color (default: gray)
Transparency : 0 = solid, 100 = invisible (default: 85)
Size : Tiny / Small / Normal / Large / Huge
Position
Vertical : Top / Middle / Bottom
Horizontal : Left / Center / Right
Use Cases:
Quick timeframe reference when analyzing multiple charts
Screenshot clarity for sharing chart analysis
Multi-monitor setups where timeframe visibility matters
Lightweight overlay indicator with zero impact on chart performance.
[GYTS] VolatilityToolkit LibraryVolatilityToolkit Library
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What Does This Library Contain?
VolatilityToolkit provides a comprehensive suite of volatility estimation functions derived from academic research in financial econometrics. Rather than relying on simplistic measures, this library implements range-based estimators that extract maximum information from OHLC data — delivering estimates that are 5–14× more efficient than traditional close-to-close methods.
The library spans the full volatility workflow: estimation, smoothing, and regime detection.
💮 Key Categories
• Range-Based Estimators — Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang (academically-grounded variance estimators)
• Classical Measures — Close-to-Close, ATR, Chaikin Volatility (baseline and price-unit measures)
• Smoothing & Post-Processing — Asymmetric EWMA for differential decay rates
• Aggregation & Regime Detection — Multi-horizon blending, MTF aggregation, Volatility Burst Ratio
💮 Originality
To the best of our knowledge, no other TradingView script combines range-based estimators (Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang), classical measures, and regime detection tools in a single package. Unlike typical volatility implementations that offer only a single method, this library:
• Implements four academically-grounded range-based estimators with proper mathematical foundations
• Handles drift bias and overnight gaps, issues that plague simpler estimators in trending markets
• Integrates with GYTS FiltersToolkit for advanced smoothing (10 filter types vs. typical SMA-only)
• Provides regime detection tools (Burst Ratio, MTF aggregation) for systematic strategy integration
• Standardises output units for seamless estimator comparison and swapping
🌸 --------- ADDED VALUE --------- 🌸
💮 Academic Rigour
Each estimator implements peer-reviewed methodologies with proper mathematical foundations. The library handles aspects that are easily missed, e.g. drift independence, overnight gap adjustment, and optimal weighting factors. All functions include guards against edge cases (division by zero, negative variance floors, warmup handling).
💮 Statistical Efficiency
Range-based estimators extract more information from the same data. Yang-Zhang achieves up to 14× the efficiency of close-to-close variance, meaning you can achieve the same estimation accuracy with far fewer bars — critical for adapting quickly to changing market conditions.
💮 Flexible Smoothing
All estimators support configurable smoothing via the GYTS FiltersToolkit integration. Choose from 10 filter types to balance responsiveness against noise reduction:
• Ultimate Smoother (2-Pole / 3-Pole) — Near-zero lag; the 3-pole variant is a GYTS design with tunable overshoot
• Super Smoother (2-Pole / 3-Pole) — Excellent noise reduction with minimal lag
• BiQuad — Second-order IIR filter with quality factor control
• ADXvma — Adaptive smoothing based on directional volatility
• MAMA — Cycle-adaptive moving average
• A2RMA — Adaptive autonomous recursive moving average
• SMA / EMA — Classical averages (SMA is default for most estimators)
Using Infinite Impulse Response (IIR) filters (e.g. Super Smoother, Ultimate Smoother) instead of SMA avoids the "drop-off artefact" where volatility readings crash when old spikes exit the window.
💮 Plug-and-Play Integration
Standardised output units (per-bar log-return volatility) make it trivial to swap estimators. The annualize() helper converts to yearly volatility with a single call. All functions work seamlessly with other GYTS components.
🌸 --------- RANGE-BASED ESTIMATORS --------- 🌸
These estimators utilise High, Low, Open, and Close prices to extract significantly more information about the underlying diffusion process than close-only methods.
💮 parkinson()
The Extreme Value Method -- approximately 5× more efficient than close-to-close, requiring about 80% less data for equivalent accuracy. Uses only the High-Low range, making it simple and robust.
• Assumption: Zero drift (random walk). May be biased in strongly trending markets.
• Best for: Quick volatility reads when drift is minimal.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
💮 garman_klass()
Extends Parkinson by incorporating Open and Close prices, achieving approximately 7.4× efficiency over close-to-close. Implements the "practical" analytic estimator (σ̂²₅) which avoids cross-product terms whilst maintaining near-optimal efficiency.
• Assumption: Zero drift, continuous trading (no gaps).
• Best for: Markets with minimal overnight gaps and ranging conditions.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Garman, M.B. & Klass, M.J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
💮 rogers_satchell()
The drift-independent estimator correctly isolates variance even in strongly trending markets where Parkinson and Garman-Klass become significantly biased. Uses the formula: ln(H/C)·ln(H/O) + ln(L/C)·ln(L/O).
• Key advantage: Unbiased regardless of trend direction or magnitude.
• Best for: Trending markets, crypto (24/7 trading with minimal gaps), general-purpose use.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Rogers, L.C.G. & Satchell, S.E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
💮 yang_zhang()
The minimum-variance composite estimator — both drift-independent AND gap-aware. Combines overnight returns, open-to-close returns, and the Rogers-Satchell component with optimal weighting to minimise estimator variance. Up to 14× more efficient than close-to-close.
• Parameters: lookback (default 14, minimum 2), alpha (default 1.34, optimised for equities).
• Best for: Equity markets with significant overnight gaps, highest-quality volatility estimation.
• Note: Unlike other estimators, Yang-Zhang does not support custom filter types — it uses rolling sample variance internally.
Source: Yang, D. & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
🌸 --------- CLASSICAL MEASURES --------- 🌸
💮 close_to_close()
Classical sample variance of logarithmic returns. Provided primarily as a baseline benchmark — it is approximately 5–8× less efficient than range-based estimators, requiring proportionally more data for the same accuracy.
• Parameters: lookback (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
• Use case: Comparison baseline, situations requiring strict methodological consistency with academic literature.
💮 atr()
Average True Range -- measures volatility in price units rather than log-returns. Directly interpretable for stop-loss placement (e.g., "2× ATR trailing stop") and handles gaps naturally via the True Range formula.
• Output: Price units (not comparable across different price levels).
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
• Best for: Position sizing, trailing stops, any application requiring volatility in currency terms.
Source: Wilder, J.W. (1978). New Concepts in Technical Trading Systems . Trend Research.
💮 chaikin_volatility()
Rate of Change of the smoothed trading range. Unlike level-based measures, Chaikin Volatility shows whether volatility is expanding or contracting relative to recent history.
• Output: Percentage change (oscillates around zero).
• Parameters: length (default 10), roc_length (default 10), filter_type (default EMA), smoothing_factor (default 0.7)
• Interpretation: High values suggest nervous, wide-ranging markets; low values indicate compression.
• Best for: Detecting volatility regime shifts, breakout anticipation.
🌸 --------- SMOOTHING & POST-PROCESSING --------- 🌸
💮 asymmetric_ewma()
Differential smoothing with separate alphas for rising versus falling volatility. Allows volatility to spike quickly (fast reaction to shocks) whilst decaying slowly (stability). Essential for trailing stops that should widen rapidly during turbulence but narrow gradually.
• Parameters: alpha_up (default 0.1), alpha_down (default 0.02).
• Note: Stateful function — call exactly once per bar.
💮 annualize()
Converts per-bar volatility to annualised volatility using the square-root-of-time rule: σ_annual = σ_bar × √(periods_per_year).
• Parameters: vol (series float), periods (default 252 for daily equity bars).
• Common values: 365 (crypto), 52 (weekly), 12 (monthly).
🌸 --------- AGGREGATION & REGIME DETECTION --------- 🌸
💮 weighted_horizon_volatility()
Blends volatility readings across short, medium, and long lookback horizons. Inspired by the Heterogeneous Autoregressive (HAR-RV) model's recognition that market participants operate on different time scales.
• Default horizons: 1-bar (short), 5-bar (medium), 22-bar (long).
• Default weights: 0.5, 0.3, 0.2.
• Note: This is a weighted trailing average, not a forecasting regression. For true HAR-RV forecasting, it would be required to fit regression coefficients.
Inspired by: Corsi, F. (2009). A Simple Approximate Long-Memory Model of Realized Volatility. Journal of Financial Econometrics .
💮 volatility_mtf()
Multi-timeframe aggregation for intraday charts. Combines base volatility with higher-timeframe (Daily, Weekly, Monthly) readings, automatically scaling HTF volatilities down to the current timeframe's magnitude using the square-root-of-time rule.
• Usage: Calculate HTF volatilities via request.security() externally, then pass to this function.
• Behaviour: Returns base volatility unchanged on Daily+ timeframes (MTF aggregation not applicable).
💮 volatility_burst_ratio()
Regime shift detector comparing short-term to long-term volatility.
• Parameters: short_period (default 8), long_period (default 50), filter_type (default Super Smoother 2-Pole), smoothing_factor (default 0.7)
• Interpretation: Ratio > 1.0 indicates expanding volatility; values > 1.5 often precede or accompany explosive breakouts.
• Best for: Filtering entries (e.g., "only enter if volatility is expanding"), dynamic risk adjustment, breakout confirmation.
🌸 --------- PRACTICAL USAGE NOTES --------- 🌸
💮 Choosing an Estimator
• Trending equities with gaps: yang_zhang() — handles both drift and overnight gaps optimally.
• Crypto (24/7 trading): rogers_satchell() — drift-independent without the lag of Yang-Zhang's multi-period window.
• Ranging markets: garman_klass() or parkinson() — simpler, no drift adjustment needed.
• Price-based stops: atr() — output in price units, directly usable for stop distances.
• Regime detection: Combine any estimator with volatility_burst_ratio().
💮 Output Units
All range-based estimators output per-bar volatility in log-return units (standard deviation). To convert to annualised percentage volatility (the convention in options and risk management), use:
vol_annual = annualize(yang_zhang(14), 252) // For daily bars
vol_percent = vol_annual * 100 // Express as percentage
💮 Smoothing Selection
The library integrates with FiltersToolkit for flexible smoothing. General guidance:
• SMA: Classical, statistically valid, but suffers from "drop-off" artefacts when spikes exit the window.
• Super Smoother / Ultimate Smoother / BiQuad: Natural decay, reduced lag — preferred for trading applications.
• MAMA / ADXvma / A2RMA: Adaptive smoothing, sometimes interesting for highly dynamic environments.
💮 Edge Cases and Limitations
• Flat candles: Guards prevent log(0) errors, but single-tick bars produce near-zero variance readings.
• Illiquid assets: Discretisation bias causes underestimation when ticks-per-bar is small. Use higher timeframes for more reliable estimates.
• Yang-Zhang minimum: Requires lookback ≥ 2 (enforced internally). Cannot produce instantaneous readings.
• Drift in Parkinson/GK: These estimators overestimate variance in trending conditions — switch to Rogers-Satchell or Yang-Zhang.
Note: This library is actively maintained. Suggestions for additional estimators or improvements are welcome.
EMTIA_MASTER_LIBLibrary "EMTIA_MASTER_LIB"
trendUp(emaFast, emaSlow)
Parameters:
emaFast (float)
emaSlow (float)
rsiHealthy(rsi)
Parameters:
rsi (float)
adxStrong(adx, diPlus, diMinus)
Parameters:
adx (float)
diPlus (float)
diMinus (float)
macroSlope(emaFast, emaSlow)
Parameters:
emaFast (float)
emaSlow (float)
structureBull(hh, hl)
Parameters:
hh (bool)
hl (bool)
calcScore(weeklyTrend, dailyTrend, adxOk, rsiOk, structureOk, macroOk)
Parameters:
weeklyTrend (bool)
dailyTrend (bool)
adxOk (bool)
rsiOk (bool)
structureOk (bool)
macroOk (bool)
ZigZag forceLibrary "ZigZag"
method lastPivot(this)
Retrieves the last `Pivot` object's reference from a `ZigZag` object's `pivots`
array if it contains at least one element, or `na` if the array is empty.
Callable as a method or a function.
Namespace types: ZigZag
Parameters:
this (ZigZag) : (series ZigZag) The `ZigZag` object's reference.
Returns: (Pivot) The reference of the last `Pivot` instance in the `ZigZag` object's
`pivots` array, or `na` if the array is empty.
method update(this)
Updates a `ZigZag` object's pivot information, volume data, lines, and
labels when it detects new pivot points.
NOTE: This function requires a single execution on each bar for accurate
calculations.
Callable as a method or a function.
Namespace types: ZigZag
Parameters:
this (ZigZag) : (series ZigZag) The `ZigZag` object's reference.
Returns: (bool) `true` if the function detects a new pivot point and updates the
`ZigZag` object's data, `false` otherwise.
newInstance(settings)
Creates a new `ZigZag` instance with optional settings.
Parameters:
settings (Settings) : (series Settings) Optional. A `Settings` object's reference for the new
`ZigZag` instance's `settings` field. If `na`, the `ZigZag` instance
uses a new `Settings` object with default properties. The default is `na`.
Returns: (ZigZag) A new `ZigZag` object's reference.
Settings
A structure for objects that store calculation and display properties for `ZigZag` instances.
Fields:
devThreshold (series float) : The minimum percentage deviation from a previous pivot point required to change the Zig Zag's direction.
depth (series int) : The number of bars required for pivot point detection.
lineColor (series color) : The color of each line in the Zig Zag drawing.
extendLast (series bool) : Specifies whether the Zig Zag drawing includes a line connecting the most recent pivot point to the latest bar's `close`.
displayReversalPrice (series bool) : Specifies whether the Zig Zag drawing shows pivot prices in its labels.
displayCumulativeVolume (series bool) : Specifies whether the Zig Zag drawing shows the cumulative volume between pivot points in its labels.
displayReversalPriceChange (series bool) : Specifies whether the Zig Zag drawing shows the reversal amount from the previous pivot point in each label.
differencePriceMode (series string) : The reversal amount display mode. Possible values: `"Absolute"` for price change or `"Percent"` for percentage change.
draw (series bool) : Specifies whether the Zig Zag drawing displays its lines and labels.
allowZigZagOnOneBar (series bool) : Specifies whether the Zig Zag calculation can register a pivot high *and* pivot low on the same bar.
Pivot
A structure for objects that store chart point references, drawing references, and volume information for `ZigZag` instances.
Fields:
ln (series line) : References a `line` object that connects the coordinates from the `start` and `end` chart points.
lb (series label) : References a `label` object that displays pivot data at the `end` chart point's coordinates.
isHigh (series bool) : Specifies whether the pivot at the `end` chart point's coordinates is a pivot high.
vol (series float) : The cumulative volume across the bars between the `start` and `end` chart points.
start (chart.point) : References a `chart.point` object containing the coordinates of the previous pivot point.
end (chart.point) : References a `chart.point` object containing the coordinates of the current pivot point.
ZigZag
A structure for objects that maintain Zig Zag drawing settings, pivots, and cumulative volume data.
Fields:
settings (Settings) : References a `Settings` object that specifies the Zig Zag drawing's calculation and display properties.
pivots (array) : References an array of `Pivot` objects that store pivot point, drawing, and volume information.
sumVol (series float) : The cumulative volume across bars covered by the latest `Pivot` object's line segment.
extend (Pivot) : References a `Pivot` object that projects a line from the last confirmed pivot point to the current bar's `close`.
LO1_News2024H1Library "LO1_News2024H1"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
LO1_News2026H1Library "LO1_News2026H1"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()






















