50 SMA / 200 EMA / 128EMA Moving Average CrossFound success using 50SMA vs 200EMA.
128 EMA also charted for it's BTC relevance.
חפש סקריפטים עבור "北证50+股票+新浪财经"
50/100/200 Moving Averages (Pine Script For Copy)by fresca
SCRIPT LANGUAGE
Copy script below and adjust based on your preferences.
-function (change function from "sma" to "ema", "wma" and more)
-length (25 Day, 150 Day or add more averages to the three in this script.)
-color, (red, yellow, etc. or use color hex codes i.e. #FEDA15, #FFAD8F, etc.)
-transparency (set to desired level 1-100)
Or add more options.
RESOURCES
Color hex codes site: www.canva.com
Trading View Pine Script Editor Reference Guide: www.tradingview.com
Taint's Multi Time Frame MA50-100-200 SMA with two 200 EMA's all with the ability choose a time frame for each.
Money Moving PROGuide to Using the "Money Moving PRO" Indicator
Important Note: This is a custom indicator compiled from several indicators by other authors. It combines elements from "Money Moving" (based on ATR trailing stop), EMA lines, premium/discount zones with delta volume, and volume profile. I am not the original author of the base components, but the indicator has been adapted for comprehensive analysis. Use it at your own risk as a tool for analysis, not as the sole basis for trading. It is recommended to test it on a demo account.
Installing the Indicator
Open TradingView (tradingview.com) and log into your account.
Go to the chart of any asset (e.g., cryptocurrencies, stocks, or forex).
Click on the "Indicators" button (at the top of the chart).
Select "Pine Editor" at the bottom of the window (or press Ctrl+E).
Copy the entire code from the file "Money Moving PRO (LummiCrypto) alerts.txt" and paste it into the editor.
Click "Add to Chart."
The indicator will appear on the chart. You can customize its settings in the indicator menu (gear icon next to the indicator name).
The indicator operates in overlay mode (overlaid on the price chart), supports up to 500 lines and boxes, and uses up to 5,000 bars of historical data.
Indicator Settings
The indicator is divided into setting groups. Below are the main parameters and their descriptions:
Money Moving Settings
MM Key Value (Sensitivity): Sensitivity (default: 1). Higher values widen the ATR-based stop-loss.
MM ATR Period: ATR period (default: 3). Affects volatility calculation.
MM Use Heiken Ashi Candles: Use Heiken Ashi candles instead of regular ones (default: disabled). Enable for smoother signals.
EMA Settings
Show Ema 20/50/100/200: Display EMAs with periods 20, 50, 100, 200 (all enabled by default).
Ema Colors: Line colors (red for 20, orange for 50, aqua for 100, blue for 200). Can be changed for convenience.
Premium & Discount Settings
Show Premium & Discount Delta Volume: Display zones with delta volume (default: enabled).
Premium & Discount Lookback Period: Lookback period for support/resistance levels (default: 50 bars).
Macro Lookback Period: Lookback period for macro levels (default: 200 bars).
Discount/Premium Colors: Zone colors (blue for discount, orange for premium).
Volume Profile Settings
Show Volume Profile: Display volume profile (default: enabled).
Fixed Range Lookback Depth: Historical bars to include (10–3000, default: 200).
Number of Volume Bars: Number of bars in the profile (10–490, default: 200).
Volume Bar Thickness: Bar width (1–30, default: 1).
Bar Length Multiplier: Bar length multiplier (1–50, default: 20).
Right Offset: Space from the right edge of the chart (0–400, default: 70).
Volume Type: Volume type ("Both," "Bullish," or "Bearish"; default: "Both").
Display Point of Control (PoC): Show PoC (default: enabled).
Display Value Area: Show value area (default: enabled, 68% by default).
Other: Colors and line thicknesses for PoC and Value Area.
Customize the settings to match your trading style. For beginners, keep the default values.
Buy and Sell Signals
The primary signals are generated in the "Money Moving" block based on the ATR trailing stop and EMA(1). This is a simple system similar to SuperTrend but with custom settings.
Buy Signal (BUY): Green upward triangle below the bar. Triggered when the price crosses above the trailing stop (src > xATRTrailingStop and EMA(1) crosses above the stop). Indicates a potential upward reversal or trend continuation.
Entry Conditions: Confirm the signal with price crossing above EMA 20/50 or in the Discount zone. Volume profile should show accumulation at the lower end.
Alert: In TradingView, set up an alert for "BUY Signal" — message "Money Moving: BUY Signal at {{close}}".
Sell Signal (SELL): Red downward triangle above the bar. Triggered when the price crosses below the trailing stop (src < xATRTrailingStop and EMA(1) crosses below the stop). Indicates a potential downward reversal or correction.
Entry Conditions: Confirm with price crossing below EMA 20/50 or in the Premium zone. Volume profile should show distribution at the upper end.
Alert: Set up an alert for "SELL Signal" — message "Money Moving: SELL Signal at {{close}}".
Important: Signals are not 100% accurate. Use them in combination with other indicator elements:
EMA Lines: Uptrend — price above EMA 200, EMA 20 above EMA 50. For buys, look for bounces off lower EMAs.
Premium/Discount Zones:
Discount (Blue box at the bottom): Oversold zone with positive delta volume (more buying). Ideal for buys.
Premium (Orange box at the top): Overbought zone with negative delta volume (more selling). Ideal for sells.
Delta Volume shows balance (in %): positive — bullish, negative — bearish.
Volume Profile:
PoC (Red line): Level of maximum volume — strong support/resistance.
Value Area (Blue bars/lines): 68% of volume — equilibrium zone. Breakout above VAH (top) is bullish, below VAL (bottom) is bearish.
Example Strategy:
Wait for a BUY signal in the Discount zone, with price above EMA 50 and PoC below the price.
Stop-Loss: Below the trailing stop or nearest low.
Take-Profit: At the Premium zone or 1–2 ATR distance.
Similar for SELL.
Additional Features
Alert Conditions: The indicator includes built-in alerts for BUY/SELL. In TradingView, set up notifications (SMS, email, popup).
Visualization: Boxes for zones, lines for EMAs and volume profile. If the chart is cluttered, disable unnecessary parts (e.g., Volume Profile for short timeframes).
Compatibility: Works on any timeframe, but best on H1-D1 for crypto/stocks. Enable Heiken Ashi for noise filtering.
Tips for Use
Testing: Backtest on historical data in TradingView. Test on different assets (BTC, ETH, etc.).
Risk Management: Risk no more than 1–2% of capital per trade. Combine with other indicators (RSI, MACD).
Limitations: The indicator relies on volume (better on exchanges with real volume data). For forex/crypto, volumes may be tick-based.
Updates: If the code changes, check TradingView forums (e.g., search for "Money Moving" or "Volume Profile").
Warning: Trading carries risks. This is not financial advice.
Руководство по использованию индикатора "Money Moving PRO"
Важное замечание: Этот индикатор является кастомным, собранным из нескольких индикаторов других авторов. Он сочетает элементы из "Money Moving" (на основе ATR-трейлинг-стопа), EMA-линий, зон премиум/дисконт с дельта-объемом и профиля объема. Я не являюсь оригинальным автором базовых компонентов, но индикатор адаптирован для комплексного анализа. Используйте его на свой риск, как инструмент для анализа, а не как единственную основу для торговли. Рекомендуется тестировать на демо-счете.
Установка индикатора
Откройте TradingView (tradingview.com) и войдите в аккаунт.
Перейдите в график любого актива (например, криптовалюты, акции или форекс).
Нажмите на кнопку "Индикаторы" (в верхней панели графика).
Выберите "Pine Editor" в нижней части окна (или нажмите Ctrl+E).
Скопируйте весь код из файла "Money Moving PRO (LummiCrypto) alerts.txt" и вставьте его в редактор.
Нажмите "Add to Chart" (Добавить на график).
Индикатор появится на графике. Вы можете настроить его параметры в меню индикатора (шестеренка рядом с названием).
Индикатор работает в overlay-режиме (накладывается на график цены), поддерживает до 500 линий и боксов, и использует до 5000 баров истории.
Настройки индикатора
Индикатор разделен на группы настроек. Вот основные параметры и их описание:
Money Moving Settings (Настройки Money Moving)
MM Key Value (Sensitivity): Чувствительность (по умолчанию 1). Чем выше значение, тем шире стоп-лосс на основе ATR.
MM ATR Period: Период ATR (по умолчанию 3). Влияет на расчет волатильности.
MM Use Heiken Ashi Candles: Использовать Heiken Ashi свечи вместо обычных (по умолчанию выключено). Включайте для сглаживания сигналов.
EMA Settings (Настройки EMA)
Show Ema 20/50/100/200: Показывать EMA с периодами 20, 50, 100, 200 (все по умолчанию включены).
Ema Colors: Цвета линий (красный для 20, оранжевый для 50, аква для 100, синий для 200). Можно изменить для удобства.
Premium & Discount Settings (Настройки Премиум и Дисконт)
Show Premium & Discount Delta Volume: Показывать зоны с дельта-объемом (по умолчанию включено).
Premium & Discount Lookback Period: Период обзора для S/R уровней (по умолчанию 50 баров).
Macro Lookback Period: Период для макро-уровней (по умолчанию 200 баров).
Discount/Premium Colors: Цвета зон (голубой для дисконт, оранжевый для премиум).
Volume Profile Settings (Настройки Профиля Объема)
Show Volume Profile: Показывать профиль объема (по умолчанию включено).
Fixed Range Lookback Depth: Глубина обзора (10–3000 баров, по умолчанию 200).
Number of Volume Bars: Количество баров в профиле (10–490, по умолчанию 200).
Volume Bar Thickness: Толщина баров (1–30, по умолчанию 1).
Bar Length Multiplier: Множитель длины баров (1–50, по умолчанию 20).
Right Offset: Отступ справа (0–400, по умолчанию 70).
Volume Type: Тип объема ("Both" — оба, "Bullish" — бычий, "Bearish" — медвежий; по умолчанию "Both").
Display Point of Control (PoC): Показывать точку контроля (по умолчанию включено).
Display Value Area: Показывать область значения (по умолчанию включено, 68% по умолчанию).
Другие: Цвета, толщины линий для PoC и Value Area.
Настройте параметры под свой стиль торговли. Для начинающих оставьте значения по умолчанию.
Сигналы на покупку и продажу
Основные сигналы генерируются в блоке "Money Moving" на основе ATR-трейлинг-стопа и EMA(1). Это простая система, похожая на SuperTrend, но с кастомными настройками.
Сигнал на покупку (BUY): Зеленый треугольник вверх под баром. Происходит, когда цена пересекает вверх трейлинг-стоп (src > xATRTrailingStop и кроссовер EMA(1) над стопом). Это указывает на потенциальный разворот вверх или продолжение тренда.
Условия для входа: Подтвердите сигнал пересечением цены выше EMA 20/50 или в зоне дисконт (Discount). Объем в профиле должен показывать накопление в нижней части.
Алерт: В TradingView настройте алерт на "BUY Signal" — сообщение "Money Moving: BUY Signal at {{close}}".
Сигнал на продажу (SELL): Красный треугольник вниз над баром. Происходит, когда цена пересекает вниз трейлинг-стоп (src < xATRTrailingStop и кроссундер EMA(1) под стопом). Указывает на разворот вниз или коррекцию.
Условия для входа: Подтвердите пересечением ниже EMA 20/50 или в зоне премиум (Premium). Объем в профиле должен показывать распределение в верхней части.
Алерт: Настройте алерт на "SELL Signal" — сообщение "Money Moving: SELL Signal at {{close}}".
Важно: Сигналы не 100% точны. Используйте их в комбинации с другими элементами индикатора:
EMA-линии: Восходящий тренд — цена выше EMA 200, EMA 20 выше EMA 50. Для покупок ищите отскок от нижних EMA.
Премиум/Дисконт зоны:
Discount (Дисконт, голубой бокс снизу): Зона перепроданности с положительным дельта-объемом (больше покупок). Идеально для покупок.
Premium (Премиум, оранжевый бокс сверху): Зона перекупленности с отрицательным дельта-объемом (больше продаж). Идеально для продаж.
Delta Volume показывает баланс (в %): положительный — бычий, отрицательный — медвежий.
Профиль объема:
PoC (красная линия): Уровень максимального объема — сильная поддержка/сопротивление.
Value Area (синие бары/линии): 68% объема — зона равновесия. Пробой VAH (верх) — бычий, VAL (низ) — медвежий.
Пример стратегии:
Ждите сигнала BUY в зоне Discount, когда цена выше EMA 50 и PoC ниже цены.
Стоп-лосс: Ниже трейлинг-стопа или ближайшего минимума.
Тейк-профит: У зоны Premium или на расстоянии 1-2 ATR.
Аналогично для SELL.
Дополнительные функции
Алерткондиции: Индикатор имеет встроенные алерты для BUY/SELL. В TradingView настройте уведомления (SMS, email, popup).
Визуализация: Боксы для зон, линии для EMA и профиля. Если график перегружен, отключите ненужные части (например, Volume Profile для коротких таймфреймов).
Совместимость: Работает на любых таймфреймах, но лучше на H1-D1 для крипты/акций. Для Heiken Ashi включите опцию для фильтрации шума.
Советы по использованию
Тестирование: Backtest на исторических данных в TradingView. Проверьте на разных активах (BTC, ETH и т.д.).
Риск-менеджмент: Не рискуйте более 1-2% капитала на сделку. Комбинируйте с другими индикаторами (RSI, MACD).
Ограничения: Индикатор зависит от объема (лучше на биржах с реальными объемами). На форексе/крипте объемы могут быть тиковыми.
Обновления: Если код изменится, проверьте на форумах TradingView (например, по ключам "Money Moving" или "Volume Profile").
Предупреждение: Торговля несет риски. Это не финансовый совет.
Hidden Impulse═══════════════════════════════════════════════════════════════════
HIDDEN IMPULSE - Multi-Timeframe Momentum Detection System
═══════════════════════════════════════════════════════════════════
OVERVIEW
Hidden Impulse is an advanced momentum oscillator that combines the Schaff Trend Cycle (STC) and Force Index into a comprehensive multi-timeframe trading system. Unlike standard implementations of these indicators, this script introduces three distinct trading setups with specific entry conditions, multi-timeframe confirmation, and trend filtering.
═══════════════════════════════════════════════════════════════════
ORIGINALITY & KEY FEATURES
This indicator is original in the following ways:
1. DUAL-TIMEFRAME STC ANALYSIS
Standard STC implementations work on a single timeframe. This script
simultaneously analyzes STC on both your trading timeframe and a higher
timeframe, providing trend context and filtering out low-probability signals.
2. FORCE INDEX INTEGRATION
The script combines STC with Force Index (volume-weighted price momentum)
to confirm the strength behind price moves. This combination helps identify
when momentum shifts are backed by genuine buying/selling pressure.
3. THREE DISTINCT TRADING SETUPS
Rather than generic overbought/oversold signals, the indicator provides
three specific, rule-based setups:
- Setup A: Classic trend-following entries with multi-timeframe confirmation
- Setup B: Divergence-based reversal entries (highest probability)
- Setup C: Mean-reversion bounce trades at extreme levels
4. INTELLIGENT FILTERING
All signals are filtered through:
- 50 EMA trend direction (prevents counter-trend trades)
- Higher timeframe STC alignment (ensures macro trend agreement)
- Force Index confirmation (validates volume support)
═══════════════════════════════════════════════════════════════════
HOW IT WORKS - TECHNICAL EXPLANATION
SCHAFF TREND CYCLE (STC) CALCULATION:
The STC is a cyclical oscillator that combines MACD concepts with stochastic
smoothing to create earlier and smoother trend signals.
Step 1: Calculate MACD
- Fast MA = EMA(close, Length1) — default 23
- Slow MA = EMA(close, Length2) — default 50
- MACD Line = Fast MA - Slow MA
Step 2: First Stochastic Smoothing
- Apply stochastic calculation to MACD
- Stoch1 = 100 × (MACD - Lowest(MACD, Smoothing)) / (Highest(MACD, Smoothing) - Lowest(MACD, Smoothing))
- Smooth result with EMA(Stoch1, Smoothing) — default 10
Step 3: Second Stochastic Smoothing
- Apply stochastic calculation again to the smoothed stochastic
- This creates the final STC value between 0-100
The dual stochastic smoothing makes STC more responsive than MACD while
being smoother than traditional stochastics.
FORCE INDEX CALCULATION:
Force Index measures the power behind price movements by incorporating volume:
Force Raw = (Close - Close ) × Volume
Force Index = EMA(Force Raw, Period) — default 13
Interpretation:
- Positive Force Index = Buying pressure (bulls in control)
- Negative Force Index = Selling pressure (bears in control)
- Force Index crossing zero = Momentum shift
- Divergences with price = Weakening momentum (reversal signal)
TREND FILTER:
A 50-period EMA serves as the trend filter:
- Price above EMA50 = Uptrend → Only LONG signals allowed
- Price below EMA50 = Downtrend → Only SHORT signals allowed
This prevents counter-trend trading which accounts for most losing trades.
═══════════════════════════════════════════════════════════════════
THE THREE TRADING SETUPS - DETAILED
SETUP A: CLASSIC MOMENTUM ENTRY
Concept: Enter when STC exits oversold/overbought zones with trend confirmation
LONG CONDITIONS:
1. Higher timeframe STC > 25 (macro trend is up)
2. Primary timeframe STC crosses above 25 (momentum turning up)
3. Force Index crosses above 0 OR already positive (volume confirms)
4. Price above 50 EMA (local trend is up)
SHORT CONDITIONS:
1. Higher timeframe STC < 75 (macro trend is down)
2. Primary timeframe STC crosses below 75 (momentum turning down)
3. Force Index crosses below 0 OR already negative (volume confirms)
4. Price below 50 EMA (local trend is down)
Best for: Trending markets, continuation trades
Win rate: Moderate (60-65%)
Risk/Reward: 1:2 to 1:3
───────────────────────────────────────────────────────────────────
SETUP B: DIVERGENCE REVERSAL (HIGHEST PROBABILITY)
Concept: Identify exhaustion points where price makes new extremes but
momentum (Force Index) fails to confirm
BULLISH DIVERGENCE:
1. Price makes a lower low (LL) over 10 bars
2. Force Index makes a higher low (HL) — refuses to follow price down
3. STC is below 25 (oversold condition)
Trigger: STC starts rising AND Force Index crosses above zero
BEARISH DIVERGENCE:
1. Price makes a higher high (HH) over 10 bars
2. Force Index makes a lower high (LH) — refuses to follow price up
3. STC is above 75 (overbought condition)
Trigger: STC starts falling AND Force Index crosses below zero
Why this works: Divergences signal that the current trend is losing steam.
When volume (Force Index) doesn't confirm new price extremes, a reversal
is likely.
Best for: Reversal trading, range-bound markets
Win rate: High (70-75%)
Risk/Reward: 1:3 to 1:5
───────────────────────────────────────────────────────────────────
SETUP C: QUICK BOUNCE AT EXTREMES
Concept: Catch rapid mean-reversion moves when price touches EMA50 in
extreme STC zones
LONG CONDITIONS:
1. Price touches 50 EMA from above (pullback in uptrend)
2. STC < 15 (extreme oversold)
3. Force Index > 0 (buyers stepping in)
SHORT CONDITIONS:
1. Price touches 50 EMA from below (pullback in downtrend)
2. STC > 85 (extreme overbought)
3. Force Index < 0 (sellers stepping in)
Best for: Scalping, quick mean-reversion trades
Win rate: Moderate (55-60%)
Risk/Reward: 1:1 to 1:2
Note: Use tighter stops and quick profit-taking
═══════════════════════════════════════════════════════════════════
HOW TO USE THE INDICATOR
STEP 1: CONFIGURE TIMEFRAMES
Primary Timeframe (STC - Primary Timeframe):
- Leave empty to use your current chart timeframe
- This is where you'll take trades
Higher Timeframe (STC - Higher Timeframe):
- Default: 30 minutes
- Recommended ratios:
* 5min chart → 30min higher TF
* 15min chart → 1H higher TF
* 1H chart → 4H higher TF
* Daily chart → Weekly higher TF
───────────────────────────────────────────────────────────────────
STEP 2: ADJUST STC PARAMETERS FOR YOUR MARKET
Default (23/50/10) works well for stocks and forex, but adjust for:
CRYPTO (volatile):
- Length 1: 15
- Length 2: 35
- Smoothing: 8
(Faster response for rapid price movements)
STOCKS (standard):
- Length 1: 23
- Length 2: 50
- Smoothing: 10
(Balanced settings)
FOREX MAJORS (slower):
- Length 1: 30
- Length 2: 60
- Smoothing: 12
(Filters out noise in 24/7 markets)
───────────────────────────────────────────────────────────────────
STEP 3: ENABLE YOUR PREFERRED SETUPS
Toggle setups based on your trading style:
Conservative Trader:
✓ Setup B (Divergence) — highest win rate
✗ Setup A (Classic) — only in strong trends
✗ Setup C (Bounce) — too aggressive
Trend Trader:
✓ Setup A (Classic) — primary signals
✓ Setup B (Divergence) — for entries on pullbacks
✗ Setup C (Bounce) — not suitable for trending
Scalper:
✓ Setup C (Bounce) — quick in-and-out
✓ Setup B (Divergence) — high probability scalps
✗ Setup A (Classic) — too slow
───────────────────────────────────────────────────────────────────
STEP 4: READ THE SIGNALS
ON THE CHART:
Labels appear when conditions are met:
Green labels:
- "LONG A" — Setup A long entry
- "LONG B DIV" — Setup B divergence long (best signal)
- "LONG C" — Setup C bounce long
Red labels:
- "SHORT A" — Setup A short entry
- "SHORT B DIV" — Setup B divergence short (best signal)
- "SHORT C" — Setup C bounce short
IN THE INDICATOR PANEL (bottom):
- Blue line = Primary timeframe STC
- Orange dots = Higher timeframe STC (optional)
- Green/Red bars = Force Index histogram
- Dashed lines at 25/75 = Entry/Exit zones
- Background shading = Oversold (green) / Overbought (red)
INFO TABLE (top-right corner):
Shows real-time status:
- STC values for both timeframes
- Force Index direction
- Price position vs EMA
- Current trend direction
- Active signal type
═══════════════════════════════════════════════════════════════════
TRADING STRATEGY & RISK MANAGEMENT
ENTRY RULES:
Priority ranking (best to worst):
1st: Setup B (Divergence) — wait for these
2nd: Setup A (Classic) — in confirmed trends only
3rd: Setup C (Bounce) — scalping only
Confirmation checklist before entry:
☑ Signal label appears on chart
☑ TREND in info table matches signal direction
☑ Higher timeframe STC aligned (check orange dots or table)
☑ Force Index confirming (check histogram color)
───────────────────────────────────────────────────────────────────
STOP LOSS PLACEMENT:
Setup A (Classic):
- LONG: Below recent swing low
- SHORT: Above recent swing high
- Typical: 1-2 ATR distance
Setup B (Divergence):
- LONG: Below the divergence low
- SHORT: Above the divergence high
- Typical: 0.5-1.5 ATR distance
Setup C (Bounce):
- LONG: 5-10 pips below EMA50
- SHORT: 5-10 pips above EMA50
- Typical: 0.3-0.8 ATR distance
───────────────────────────────────────────────────────────────────
TAKE PROFIT TARGETS:
Conservative approach:
- Exit when STC reaches opposite level
- LONG: Exit when STC > 75
- SHORT: Exit when STC < 25
Aggressive approach:
- Hold until opposite signal appears
- Trail stop as STC moves in your favor
Partial profits:
- Take 50% at 1:2 risk/reward
- Let remaining 50% run to target
───────────────────────────────────────────────────────────────────
WHAT TO AVOID:
❌ Trading Setup A in sideways/choppy markets
→ Wait for clear trend or use Setup B only
❌ Ignoring higher timeframe STC
→ Always check orange dots align with your direction
❌ Taking signals against the major trend
→ If weekly trend is down, be cautious with longs
❌ Overtrading Setup C
→ Maximum 2-3 bounce trades per session
❌ Trading during low volume periods
→ Force Index becomes unreliable
═══════════════════════════════════════════════════════════════════
ALERTS CONFIGURATION
The indicator includes 8 alert types:
Individual setup alerts:
- "Setup A - LONG" / "Setup A - SHORT"
- "Setup B - DIV LONG" / "Setup B - DIV SHORT" ⭐ recommended
- "Setup C - BOUNCE LONG" / "Setup C - BOUNCE SHORT"
Combined alerts:
- "ANY LONG" — fires on any long signal
- "ANY SHORT" — fires on any short signal
Recommended alert setup:
- Create "Setup B - DIV LONG" and "Setup B - DIV SHORT" alerts
- These are the highest probability signals
- Set "Once Per Bar Close" to avoid false alerts
═══════════════════════════════════════════════════════════════════
VISUALIZATION SETTINGS
Show Labels on Chart:
Toggle on/off the signal labels (green/red)
Disable for cleaner chart once you're familiar with the indicator
Show Higher TF STC:
Toggle the orange dots showing higher timeframe STC
Useful for visual confirmation of multi-timeframe alignment
Info Panel:
Cannot be disabled — always shows current status
Positioned top-right to avoid chart interference
═══════════════════════════════════════════════════════════════════
EXAMPLE TRADE WALKTHROUGH
SETUP B DIVERGENCE LONG EXAMPLE:
1. Market Context:
- Price in downtrend, below 50 EMA
- Multiple lower lows forming
- STC below 25 (oversold)
2. Divergence Formation:
- Price makes new low at $45.20
- Force Index refuses to make new low (higher low forms)
- This indicates selling pressure weakening
3. Signal Trigger:
- STC starts turning up
- Force Index crosses above zero
- Label appears: "LONG B DIV"
4. Trade Execution:
- Entry: $45.50 (current price at signal)
- Stop Loss: $44.80 (below divergence low)
- Target 1: $47.90 (STC reaches 75) — risk/reward 1:3.4
- Target 2: Opposite signal or trail stop
5. Trade Management:
- Price rallies to $47.20
- STC reaches 68 (approaching target zone)
- Take 50% profit, move stop to breakeven
- Exit remaining at $48.10 when STC crosses 75
Result: 3.7R gain
═══════════════════════════════════════════════════════════════════
ADVANCED TIPS
1. MULTI-TIMEFRAME CONFLUENCE
For highest probability trades, wait for:
- Primary TF signal
- Higher TF STC aligned (>25 for longs, <75 for shorts)
- Even higher TF trend in same direction (manual check)
2. VOLUME CONFIRMATION
Watch the Force Index histogram:
- Increasing bar size = Strengthening momentum
- Decreasing bar size = Weakening momentum
- Use this to gauge signal strength
3. AVOID THESE MARKET CONDITIONS
- Major news events (Force Index becomes erratic)
- Market open first 30 minutes (volatility spikes)
- Low liquidity instruments (Force Index unreliable)
- Extreme trending days (wait for pullbacks)
4. COMBINE WITH SUPPORT/RESISTANCE
Best signals occur near:
- Key horizontal levels
- Fibonacci retracements
- Previous day's high/low
- Psychological round numbers
5. SESSION AWARENESS
- Asia session: Use lower timeframes, Setup C works well
- London session: Setup A and B both effective
- New York session: All setups work, highest volume
═══════════════════════════════════════════════════════════════════
INDICATOR WINDOWS LAYOUT
MAIN CHART:
- Price action
- 50 EMA (green/red)
- Signal labels
- Info panel
INDICATOR WINDOW:
- STC oscillator (blue line, 0-100 scale)
- Higher TF STC (orange dots, optional)
- Force Index histogram (green/red bars)
- Reference levels (25, 50, 75)
- Background zones (green oversold, red overbought)
═══════════════════════════════════════════════════════════════════
PERFORMANCE OPTIMIZATION
For best results:
Backtesting:
- Test on your specific instrument and timeframe
- Adjust STC parameters if win rate < 55%
- Record which setup works best for your market
Position Sizing:
- Risk 1-2% per trade
- Setup B can use 2% risk (higher win rate)
- Setup C should use 1% risk (lower win rate)
Trade Frequency:
- Setup B: 2-5 signals per week (be patient)
- Setup A: 5-10 signals per week
- Setup C: 10+ signals per week (scalping)
═══════════════════════════════════════════════════════════════════
CREDITS & REFERENCES
This indicator builds upon established technical analysis concepts:
Schaff Trend Cycle:
- Developed by Doug Schaff (1996)
- Original concept published in Technical Analysis of Stocks & Commodities
- Implementation based on standard STC formula
Force Index:
- Developed by Dr. Alexander Elder
- Described in "Trading for a Living" (1993)
- Classic volume-momentum indicator
The multi-timeframe integration, three-setup system, and specific
entry conditions are original contributions of this indicator.
═══════════════════════════════════════════════════════════════════
DISCLAIMER
This indicator is a technical analysis tool and does not guarantee profits.
Past performance is not indicative of future results. Always:
- Use proper risk management
- Test on demo account first
- Combine with fundamental analysis
- Never risk more than you can afford to lose
═══════════════════════════════════════════════════════════════════
SUPPORT & QUESTIONS
If you find this indicator helpful, please:
- Leave a like and comment
- Share your feedback and results
- Report any bugs or issues
For questions about usage or optimization for specific markets,
feel free to comment below.
═════════════════════════════════════════════════════════════
Granny Strategy [rdjxyz]This is the Granny Strategy, as described on TG Capital's Sunday Service stream .
Definitions
C0 - Candle 0 - the candle where the FVG start is plotted
C1 - Candle 1 - the candle that drives the FVG
C2 - Candle 2 - the candle where the FVG end is plotted
C3 - Candle 3 - the entry candle (assuming all criteria are met)
👵🏻 - Valid setup
🤡 - Invalid setup
The Setup
*As described on the stream.
*Look for longs when price is above 50 EMA; look for shorts when price is below the 50 EMA.
FVG is printed
C2 sweeps the low of C1 and closes bullish (for longs) or sweeps the high of C1 and closes bearish (for shorts)
C3 inverts FVG and closes below C1 open (for longs) or above C1 open (for shorts)
If criteria above is met, position is entered on the close of C3 with stop loss at the low of C3 (for longs) or high of C3 (for shorts)
Inputs
Time Window Filter - only look for setups within a certain range of time
EMA length - original strategy calls for 50
Stop loss offset - ticks to offset stop loss from low (for longs) / high (for shorts) of C3
Risk:Reward ratio - take profit as a multiple of the stop loss size from entry
Break even stop loss - optional, move stop loss to break even after price reaches a specific R:R; e.g. once price hits 1:1 R:R, move stop loss to break even
Exception Inputs
Allow some exceptions to the rigid rules
Select which candle in the sequence the EMA filter is applied to (can produce different results)
Disable EMA bias filter (will find shorts when price is above EMA and longs when price is below)
Allow C3 to close inside of FVG (instead of completely inverting it)
Allow C3 to close above C1 open (for longs) or below C1 open (for shorts)
Allow C2 to close opposite of setup direction; e.g. if long, C2 is allowed to close as a bearish candle instead of bullish candle
Play around with the different settings on various timeframes and instruments to find rules that work best for your strategy goals. Or just use it to find valid vs. invalid setups historically.
Will be working on adding a trailing stop loss.
Leave a comment with any bugs or ideas you have to improve the strategy.
IMPORTANT
Adjust account size, position size, commissions, etc in the properties tab for accurate results!
RSI + EMA + Volume Breakout (Robust)//@version=5
indicator("RSI + EMA + Volume Breakout (Robust)", overlay=true)
// === INPUTS ===
ema1_len = input.int(20, "EMA Fast (Short)")
ema2_len = input.int(50, "EMA Slow (Long)")
rsi_len = input.int(14, "RSI Length")
vol_mult = input.float(1.5, "Volume Multiplier", step=0.1)
vol_sma_len = input.int(20, "Volume SMA Length")
// === INDICATORS ===
ema1 = ta.ema(close, ema1_len)
ema2 = ta.ema(close, ema2_len)
rsi = ta.rsi(close, rsi_len)
vol_avg = ta.sma(volume, vol_sma_len)
vol_avg_safe = nz(vol_avg) == 0 ? 1 : vol_avg // protect against zero
// === CONDITIONS ===
bull_cross = ta.crossover(ema1, ema2)
bear_cross = ta.crossunder(ema1, ema2)
vol_break = volume > vol_avg_safe * vol_mult
rsi_bull = rsi > 55
rsi_bear = rsi < 45
buy_signal = bull_cross and vol_break and rsi_bull and close > ema1 and close > ema2
sell_signal = bear_cross and vol_break and rsi_bear and close < ema1 and close < ema2
// === PLOT EMAs ===
plot(ema1, title="EMA 20", linewidth=2)
plot(ema2, title="EMA 50", linewidth=2)
// === SIGNALS ===
plotshape(buy_signal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.large)
plotshape(sell_signal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large)
// === ALERTS ===
alertcondition(buy_signal, title="Buy Alert", message="Buy Signal Triggered")
alertcondition(sell_signal, title="Sell Alert", message="Sell Signal Triggered")
Multi SMA + Golden/Death + Heatmap + BB**Multi SMA (50/100/200) + Golden/Death + Candle Heatmap + BB**
A practical trend toolkit that blends classic 50/100/200 SMAs with clear crossover labels, special 🚀 Golden / 💀 Death Cross markers, and a readable candle heatmap based on a dynamic regression midline and volatility bands. Optional Bollinger Bands are included for context.
* See trend direction at a glance with SMAs.
* Get minimal, de-cluttered labels on important crosses (50↔100, 50↔200, 100↔200).
* Highlight big regime shifts with special Golden/Death tags.
* Read momentum and volatility with the candle heatmap.
* Add Bollinger Bands if you want classic mean-reversion context.
Designed to be lightweight, non-repainting on confirmed bars, and flexible across timeframes.
# What This Indicator Does (plain English)
* **Tracks trend** using **SMA 50/100/200** and lets you optionally compute each SMA on a higher or different timeframe (HTF-safe, no lookahead).
* **Prints labels** when SMAs cross each other (up or down). You can force signals only after bar close to avoid repaint.
* **Marks Golden/Death Crosses** (50 over/under 200) with special labels so major regime changes stand out.
* **Colors candles** with a **heatmap** built from a regression midline and volatility bands—greenish above, reddish below, with a smooth gradient.
* **Optionally shows Bollinger Bands** (basis SMA + stdev bands) and fills the area between them.
* **Includes alert conditions** for Golden and Death Cross so you can automate notifications.
---
# Settings — Simple Explanations
## Source
* **Source**: Price source used to calculate SMAs and Bollinger basis. Default: `close`.
## SMA 50
* **Show 50**: Turn the SMA(50) line on/off.
* **Length 50**: How many bars to average. Lower = faster but noisier.
* **Color 50** / **Width 50**: Visual style.
* **Timeframe 50**: Optional alternate timeframe for SMA(50). Leave empty to use the chart timeframe.
## SMA 100
* **Show 100**: Turn the SMA(100) line on/off.
* **Length 100**: Bars used for the mid-term trend.
* **Color 100** / **Width 100**: Visual style.
* **Timeframe 100**: Optional alternate timeframe for SMA(100).
## SMA 200
* **Show 200**: Turn the SMA(200) line on/off.
* **Length 200**: Bars used for the long-term trend.
* **Color 200** / **Width 200**: Visual style.
* **Timeframe 200**: Optional alternate timeframe for SMA(200).
## Signals (crossover labels)
* **Show crossover signals**: Prints triangle labels on SMA crosses (50↔100, 50↔200, 100↔200).
* **Wait for bar close (confirmed)**: If ON, signals only appear after the candle closes (reduces repaint).
* **Min bars between same-pair signals**: Minimum spacing to avoid duplicate labels from the same SMA pair too often.
* **Trend filter (buy: 50>100>200, sell: 50<100<200)**: Only show bullish labels when SMAs are stacked bullish (50 above 100 above 200), and only show bearish labels when stacked bearish.
### Label Offset
* **Offset mode**: Choose how to push labels away from price:
* **Percent**: Offset is a % of price.
* **ATR x**: Offset is ATR(14) × multiplier.
* **Percent of price (%)**: Used when mode = Percent.
* **ATR multiplier (for ‘ATR x’)**: Used when mode = ATR x.
### Label Colors
* **Bull color** / **Bear color**: Background of triangle labels.
* **Bull label text color** / **Bear label text color**: Text color inside the triangles.
## Golden / Death Cross
* **Show 🚀 Golden Cross (50↑200)**: Show a special “Golden” label when SMA50 crosses above SMA200.
* **Golden label color** / **Golden text color**: Styling for Golden label.
* **Show 💀 Death Cross (50↓200)**: Show a special “Death” label when SMA50 crosses below SMA200.
* **Death label color** / **Death text color**: Styling for Death label.
## Candle Heatmap
* **Enable heatmap candle colors**: Turns the heatmap on/off.
* **Length**: Lookback for the regression midline and volatility measure.
* **Deviation Multiplier**: Band width around the midline (bigger = wider).
* **Volatility basis**:
* **RMA Range** (smoothed high-low range)
* **Stdev** (standard deviation of close)
* **Upper/Middle/Lower color**: Gradient colors for the heatmap.
* **Heatmap transparency (0..100)**: 0 = solid, 100 = invisible.
* **Force override base candles**: Repaint base candles so heatmap stays visible even if your chart has custom coloring.
## Bollinger Bands (optional)
* **Show Bollinger Bands**: Toggle the overlay on/off.
* **Length**: Basis SMA length.
* **StdDev Multiplier**: Distance of bands from the basis in standard deviations.
* **Basis color** / **Band color**: Line colors for basis and bands.
* **Bands fill transparency**: Opacity of the fill between upper/lower bands.
---
# Features & How It Works
## 1) HTF-Safe SMAs
Each SMA can be calculated on the chart timeframe or a higher/different timeframe you choose. The script pulls HTF values **without lookahead** (non-repainting on confirmed bars).
## 2) Crossover Labels (Three Pairs)
* **50↔100**, **50↔200**, **100↔200**:
* **Triangle Up** label when the first SMA crosses **above** the second.
* **Triangle Down** label when it crosses **below**.
* Optional **Trend Filter** ensures only signals aligned with the overall stack (50>100>200 for bullish, 50<100<200 for bearish).
* **Debounce** spacing avoids repeated labels for the same pair too close together.
## 3) Golden / Death Cross Highlights
* **🚀 Golden Cross**: SMA50 crosses **above** SMA200 (often a longer-term bullish regime shift).
* **💀 Death Cross**: SMA50 crosses **below** SMA200 (often a longer-term bearish regime shift).
* Separate styling so they stand out from regular cross labels.
## 4) Candle Heatmap
* Builds a **regression midline** with **volatility bands**; colors candles by their position inside that channel.
* Smooth gradient: lower side → reddish, mid → yellowish, upper side → greenish.
* Helps you see momentum and “where price sits” relative to a dynamic channel.
## 5) Bollinger Bands (Optional)
* Classic **basis SMA** ± **StdDev** bands.
* Light visual context for mean-reversion and volatility expansion.
## 6) Alerts
* **Golden Cross**: `🚀 GOLDEN CROSS: SMA 50 crossed ABOVE SMA 200`
* **Death Cross**: `💀 DEATH CROSS: SMA 50 crossed BELOW SMA 200`
Add these to your alerts to get notified automatically.
---
# Tips & Notes
* For fewer false positives, keep **“Wait for bar close”** ON, especially on lower timeframes.
* Use the **Trend Filter** to align signals with the broader stack and cut noise.
* For HTF context, set **Timeframe 50/100/200** to higher frames (e.g., H1/H4/D) while you trade on a lower frame.
* Heatmap “Length” and “Deviation Multiplier” control smoothness and channel width—tune for your asset’s volatility.
Breadth Indicators NYSE Percent Above Moving AverageBreadth Indicators NYSE - transmits the processed data from the Barchart provider
NYSE - Breadth Indicators
S&P 500 - Breadth Indicators
DOW - Breadth Indicators
RUSSEL 1000 - Breadth Indicators
RUSSEL 2000 - Breadth Indicators
RUSSEL 3000 - Breadth Indicators
Moving Average - 5, 20, 50, 100, 150, 200
The "Percentage above 50-day SMA" indicator measures the percentage of stocks in the index trading above their 50-day moving average. It is a useful tool for assessing the general state of the market and identifying overbought and oversold conditions.
One way to use the "Percentage above 50-day SMA" indicator in a trading strategy is to combine it with a long-term moving average to determine whether the trend is bullish or bearish. Another way to use it is to combine it with a short-term moving average to identify pullbacks and rebounds within the overall trend.
The purpose of using the "Percentage above 50-day SMA" indicator is to participate in a larger trend with a better risk-reward ratio. By using this indicator to identify pullbacks and bounces, you can reduce the risk of entering trades at the wrong time.
Bull Signal Recap:
150-day EMA of $SPXA50R crosses above 52.5 and remains above 47.50 to set the bullish tone.
5-day EMA of $SPXA50R moves below 40 to signal a pullback
5-day EMA of $SPXA50R moves above 50 to signal an upturn
Bear Signal Recap:
150-day EMA of $SPXA50R crosses below 47.50 and remains below 52.50 to set the bearish tone.
5-day EMA of $SPXA50R moves above 60 to signal a bounce
5-day EMA of $SPXA50R moves below 50 to signal a downturn
Tweaking
There are numerous ways to tweak a trading system, but chartists should avoid over-optimizing the indicator settings. In other words, don't attempt to find the perfect moving average period or crossover level. Perfection is unattainable when developing a system or trading the markets. It is important to keep the system logical and focus tweaks on other aspects, such as the actual price chart of the underlying security.
What do levels above and below 50% signify in the long-term moving average?
A move above 52.5% is deemed bullish, and below 47.5% is deemed bearish. These levels help to reduce whipsaws by using buffers for bullish and bearish thresholds.
How does the short-term moving average work to identify pullbacks or bounces?
When using a 5-day EMA, a move below 40 signals a pullback, and a move above 60 signals a bounce.
How is the reversal of pullback or bounce identified?
A move back above 50 after a pullback or below 50 after a bounce signals that the respective trend may be resuming.
How can you ensure that the uptrend has resumed?
It’s important to wait for the surge above 50 to ensure the uptrend has resumed, signaling improved breadth.
Can the system be tweaked to optimize indicator settings?
While there are various ways to tweak the system, seeking perfection through over-optimizing settings is advised against. It's crucial to keep the system logical and focus tweaks on the price chart of the underlying security.
RUSSIAN \ Русская версия.
Индикатор "Процент выше 50-дневной скользящей средней" измеряет процент акций, торгующихся в индексе выше их 50-дневной скользящей средней. Это полезный инструмент для оценки общего состояния рынка и выявления условий перекупленности и перепроданности.
Один из способов использования индикатора "Процент выше 50-дневной скользящей средней" в торговой стратегии - это объединить его с долгосрочной скользящей средней, чтобы определить, является ли тренд бычьим или медвежьим. Другой способ использовать его - объединить с краткосрочной скользящей средней, чтобы выявить откаты и отскоки в рамках общего тренда.
Цель использования индикатора "Процент выше 50-дневной скользящей средней" - участвовать в более широком тренде с лучшим соотношением риска и прибыли. Используя этот индикатор для выявления откатов и отскоков, вы можете снизить риск входа в сделки в неподходящее время.
Краткое описание бычьего сигнала:
150-дневная ЕМА на уровне $SPXA50R пересекает отметку 52,5 и остается выше 47,50, что задает бычий настрой.
5-дневная ЕМА на уровне $SPXA50R опускается ниже 40, сигнализируя об откате
5-дневная ЕМА на уровне $SPXA50R поднимается выше 50, сигнализируя о росте
Обзор медвежьих сигналов:
150-дневная ЕМА на уровне $SPXA50R пересекает уровень ниже 47,50 и остается ниже 52,50, что указывает на медвежий настрой.
5-дневная ЕМА на уровне $SPXA50R поднимается выше 60, сигнализируя о отскоке
5-дневная ЕМА на уровне $SPXA50 опускается ниже 50, что сигнализирует о спаде
Корректировка
Существует множество способов настроить торговую систему, но графологам следует избегать чрезмерной оптимизации настроек индикатора. Другими словами, не пытайтесь найти идеальный период скользящей средней или уровень пересечения. Совершенство недостижимо при разработке системы или торговле на рынках. Важно поддерживать логику системы и уделять особое внимание другим аспектам, таким как график фактической цены базовой ценной бумаги.
Что означают уровни выше и ниже 50% в долгосрочной скользящей средней?
Движение выше 52,5% считается бычьим, а ниже 47,5% - медвежьим. Эти уровни помогают снизить риски, используя буферы для бычьих и медвежьих порогов.
Как краткосрочная скользящая средняя помогает идентифицировать откаты или отскоки?
При использовании 5-дневной ЕМА движение ниже 40 указывает на откат, а движение выше 60 указывает на отскок.
Как определяется разворот отката или отскока?
Движение выше 50 после отката или ниже 50 после отскока сигнализирует о возможном возобновлении соответствующего тренда.
Как вы можете гарантировать, что восходящий тренд возобновился?
Важно дождаться скачка выше 50, чтобы убедиться в возобновлении восходящего тренда, сигнализирующего о расширении диапазона.
Можно ли настроить систему для оптимизации настроек индикатора?
Хотя существуют различные способы настройки системы, не рекомендуется стремиться к совершенству с помощью чрезмерной оптимизации настроек. Крайне важно сохранить логичность системы и сфокусировать изменения на ценовом графике базовой ценной бумаги.
Parameter Free RSI [InvestorUnknown]The Parameter Free RSI (PF-RSI) is an innovative adaptation of the traditional Relative Strength Index (RSI), a widely used momentum oscillator that measures the speed and change of price movements. Unlike the standard RSI, which relies on a fixed lookback period (typically 14), the PF-RSI dynamically adjusts its calculation length based on real-time market conditions. By incorporating volatility and the RSI's deviation from its midpoint (50), this indicator aims to provide a more responsive and adaptable tool for identifying overbought/oversold conditions, trend shifts, and momentum changes. This adaptability makes it particularly valuable for traders navigating diverse market environments, from trending to ranging conditions.
PF-RSI offers a suite of customizable features, including dynamic length variants, smoothing options, visualization tools, and alert conditions.
Key Features
1. Dynamic RSI Length Calculation
The cornerstone of the PF-RSI is its ability to adjust the RSI calculation period dynamically, eliminating the need for a static parameter. The length is computed using two primary factors:
Volatility: Measured via the standard deviation of past RSI values.
Distance from Midpoint: The absolute deviation of the RSI from 50, reflecting the strength of bullish or bearish momentum.
The indicator offers three variants for calculating this dynamic length, allowing users to tailor its responsiveness:
Variant I (Aggressive): Increases the length dramatically based on volatility and a nonlinear scaling of the distance from 50. Ideal for traders seeking highly sensitive signals in fast-moving markets.
Variant II (Moderate): Combines volatility with a scaled distance from 50, using a less aggressive adjustment. Strikes a balance between responsiveness and stability, suitable for most trading scenarios.
Variant III (Conservative): Applies a linear combination of volatility and raw distance from 50. Offers a stable, less reactive length adjustment for traders prioritizing consistency.
// Function that returns a dynamic RSI length based on past RSI values
// The idea is to make the RSI length adaptive using volatility (stdev) and distance from the RSI midpoint (50)
// Different "variant" options control how aggressively the length changes
parameter_free_length(free_rsi, variant) =>
len = switch variant
// Variant I: Most aggressive adaptation
// Uses standard deviation scaled by a nonlinear factor of distance from 50
// Also adds another distance-based term to increase length more dramatically
"I" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) *
math.pow(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100), 2)
) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
// Variant II: Moderate adaptation
// Adds the standard deviation and a distance-based scaling term (less nonlinear)
"II" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
)
// Variant III: Least aggressive adaptation
// Simply adds standard deviation and raw distance from 50 (linear scaling)
"III" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
math.ceil(math.abs(free_rsi - 50))
)
2. Smoothing Options
To refine the dynamic RSI and reduce noise, the PF-RSI provides smoothing capabilities:
Smoothing Toggle: Enable or disable smoothing of the dynamic length used for RSI.
Smoothing MA Type for RSI MA: Choose between SMA and EMA
Smoothing Length Options for RSI MA:
Full: Uses the entire calculated dynamic length.
Half: Applies half of the dynamic length for smoother output.
SQRT: Uses the square root of the dynamic length, offering a compromise between responsiveness and smoothness.
The smoothed RSI is complemented by a separate moving average (MA) of the RSI itself, further enhancing signal clarity.
3. Visualization Tools
The PF-RSI includes visualization options to help traders interpret market conditions at a glance.
Plots:
Dynamic RSI: Displayed as a white line, showing the adaptive RSI value.
RSI Moving Average: Plotted in yellow, providing a smoothed reference for trend and momentum analysis.
Dynamic Length: A secondary plot (in faint white) showing how the calculation period evolves over time.
Histogram: Represents the RSI’s position relative to 50, with color gradients.
Fill Area: The space between the RSI and its MA is filled with a gradient (green for RSI > MA, red for RSI < MA), highlighting momentum shifts.
Customizable bar colors on the price chart reflect trend and momentum:
Trend (Raw RSI): Green (RSI > 50), Red (RSI < 50).
Trend (RSI MA): Green (MA > 50), Red (MA < 50).
Trend (Raw RSI) + Momentum: Adds momentum shading (lighter green/red when RSI and MA diverge).
Trend (RSI MA) + Momentum: Similar, but based on the MA’s trend.
Momentum: Green (RSI > MA), Red (RSI < MA).
Off: Disables bar coloring.
Intrabar Updating: Optional real-time updates within each bar for enhanced responsiveness.
4. Alerts
The PF-RSI supports customizable alerts to keep traders informed of key events.
Trend Alerts:
Raw RSI: Triggers when the RSI crosses above (uptrend) or below (downtrend) 50.
RSI MA: Triggers when the moving average crosses 50.
Off: Disables trend alerts.
Momentum Alerts:
Triggers when the RSI crosses its moving average, indicating rising (RSI > MA) or declining (RSI < MA) momentum.
Alerts are fired once per bar close, with descriptive messages including the ticker symbol (e.g., " Uptrend on: AAPL").
How It Works
The PF-RSI operates in a multi-step process:
Initialization
On the first run, it calculates a standard RSI with a 14-period length to seed the dynamic calculation.
Dynamic Length Computation
Once seeded, the indicator switches to a dynamic length based on the selected variant, factoring in volatility and distance from 50.
If smoothing is enabled, the length is further refined using an SMA.
RSI Calculation
The adaptive RSI is computed using the dynamic length, ensuring it reflects current market conditions.
Moving Average
A separate MA (SMA or EMA) is applied to the RSI, with a length derived from the dynamic length (Full, Half, or SQRT).
Visualization and Alerts
The results are plotted, and alerts are triggered based on user settings.
This adaptive approach minimizes lag in fast markets and reduces false signals in choppy conditions, offering a significant edge over fixed-period RSI implementations.
Why Use PF-RSI?
The Parameter Free RSI stands out by eliminating the guesswork of selecting an RSI period. Its dynamic length adjusts to market volatility and momentum, providing timely signals without manual tweaking.
Support and resistance levels (Day, Week, Month) + EMAs + SMAs(ENG): This Pine 5 script provides various tools for configuring and displaying different support and resistance levels, as well as moving averages (EMA and SMA) on charts. Using these tools is an essential strategy for determining entry and exit points in trades.
Support and Resistance Levels
Daily, weekly, and monthly support and resistance levels play a key role in analyzing price movements:
Daily levels: Represent prices where a cryptocurrency has tended to bounce within the current trading day.
Weekly levels: Reflect strong prices that hold throughout the week.
Monthly levels: Indicate the most significant levels that can influence price movement over the month.
When trading cryptocurrencies, traders use these levels to make decisions about entering or exiting positions. For example, if a cryptocurrency approaches a weekly resistance level and fails to break through it, this may signal a sell opportunity. If the price reaches a daily support level and starts to bounce up, it may indicate a potential long position.
Market context and trading volumes are also important when analyzing support and resistance levels. High volume near a level can confirm its significance and the likelihood of subsequent price movement. Traders often combine analysis across different time frames to get a more complete picture and improve the accuracy of their trading decisions.
Moving Averages
Moving averages (EMA and SMA) are another important tool in the technical analysis of cryptocurrencies:
EMA (Exponential Moving Average): Gives more weight to recent prices, allowing it to respond more quickly to price changes.
SMA (Simple Moving Average): Equally considers all prices over a given period.
Key types of moving averages used by traders:
EMA 50 and 200: Often used to identify trends. The crossing of the 50-day EMA with the 200-day EMA is called a "golden cross" (buy signal) or a "death cross" (sell signal).
SMA 50, 100, 150, and 200: These periods are often used to determine long-term trends and support/resistance levels. Similar to the EMA, the crossings of these averages can signal potential trend changes.
Settings Groups:
EMA Golden Cross & Death Cross: A setting to display the "golden cross" and "death cross" for the EMA.
EMA 50 & 200: A setting to display the 50-day and 200-day EMA.
Support and Resistance Levels: Includes settings for daily, weekly, and monthly levels.
SMA 50, 100, 150, 200: A setting to display the 50, 100, 150, and 200-day SMA.
SMA Golden Cross & Death Cross: A setting to display the "golden cross" and "death cross" for the SMA.
Components:
Enable/disable the display of support and resistance levels.
Show level labels.
Parameters for adjusting offset, display of EMA and SMA, and their time intervals.
Parameters for configuring EMA and SMA Golden Cross & Death Cross.
EMA Parameters:
Enable/disable the display of 50 and 200-day EMA.
Color and style settings for EMA.
Options to use bar gaps and the "LookAhead" function.
SMA Parameters:
Enable/disable the display of 50, 100, 150, and 200-day SMA.
Color and style settings for SMA.
Options to use bar gaps and the "LookAhead" function.
Effective use of support and resistance levels, as well as moving averages, requires an understanding of technical analysis, discipline, and the ability to adapt the strategy according to changing market conditions.
(RUS) Данный Pine 5 скрипт предоставляет разнообразные инструменты для настройки и отображения различных уровней поддержки и сопротивления, а также скользящих средних (EMA и SMA) на графиках. Использование этих инструментов является важной стратегией для определения точек входа и выхода из сделок.
Уровни поддержки и сопротивления
Дневные, недельные и месячные уровни поддержки и сопротивления играют ключевую роль в анализе движения цен:
Дневные уровни: Представляют собой цены, на которых криптовалюта имела тенденцию отскакивать в течение текущего торгового дня.
Недельные уровни: Отражают сильные цены, которые сохраняются в течение недели.
Месячные уровни: Указывают на наиболее значимые уровни, которые могут влиять на движение цены в течение месяца.
При торговле криптовалютами трейдеры используют эти уровни для принятия решений о входе в позицию или закрытии сделки. Например, если криптовалюта приближается к недельному уровню сопротивления и не удается его преодолеть, это может стать сигналом для продажи. Если цена достигает дневного уровня поддержки и начинает отскакивать вверх, это может указывать на возможность открытия длинной позиции.
Контекст рынка и объемы торговли также важны при анализе уровней поддержки и сопротивления. Высокий объем при приближении к уровню может подтвердить его значимость и вероятность последующего движения цены. Трейдеры часто комбинируют анализ различных временных рамок для получения более полной картины и улучшения точности своих торговых решений.
Скользящие средние
Скользящие средние (EMA и SMA) являются еще одним важным инструментом в техническом анализе криптовалют:
EMA (Exponential Moving Average): Экспоненциальная скользящая средняя, которая придает большее значение последним ценам. Это позволяет более быстро реагировать на изменения в ценах.
SMA (Simple Moving Average): Простая скользящая средняя, которая равномерно учитывает все цены в заданном периоде.
Основные виды скользящих средних, которые используются трейдерами:
EMA 50 и 200: Часто используются для выявления трендов. Пересечение 50-дневной EMA с 200-дневной EMA называется "золотым крестом" (сигнал на покупку) или "крестом смерти" (сигнал на продажу).
SMA 50, 100, 150 и 200: Эти периоды часто используются для определения долгосрочных трендов и уровней поддержки/сопротивления. Аналогично EMA, пересечения этих средних могут сигнализировать о возможных изменениях тренда.
Группы настроек:
EMA Golden Cross & Death Cross: Настройка для отображения "золотого креста" и "креста смерти" для EMA.
EMA 50 & 200: Настройка для отображения 50-дневной и 200-дневной EMA.
Уровни поддержки и сопротивления: Включает настройки для дневных, недельных и месячных уровней.
SMA 50, 100, 150, 200: Настройка для отображения 50, 100, 150 и 200-дневных SMA.
SMA Golden Cross & Death Cross: Настройка для отображения "золотого креста" и "креста смерти" для SMA.
Компоненты:
Включение/отключение отображения уровней поддержки и сопротивления.
Показ ярлыков уровней.
Параметры для настройки смещения, отображения EMA и SMA, а также их временных интервалов.
Параметры для настройки EMA и SMA Golden Cross & Death Cross.
Параметры EMA:
Включение/отключение отображения 50 и 200-дневных EMA.
Настройки цвета и стиля для EMA.
Опции для использования разрыва баров и функции "LookAhead".
Параметры SMA:
Включение/отключение отображения 50, 100, 150 и 200-дневных SMA.
Настройки цвета и стиля для SMA.
Опции для использования разрыва баров и функции "LookAhead".
Эффективное использование уровней поддержки и сопротивления, а также скользящих средних, требует понимания технического анализа, дисциплины и умения адаптировать стратегию в зависимости от изменяющихся условий рынка.
ICT Killzones and Sessions W/ Silver Bullet + MacrosForex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
Usage:
To maximize your experience, minimize the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience.
Forex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
ICT Sessions and Kill Zones
What They Are:
ICT Sessions: These are specific times during the trading day when market activity is expected to be higher, such as the London Open, New York Open, and the Asian session.
Kill Zones: These are specific time windows within these sessions where the probability of significant price movements is higher. For example, the New York AM Kill Zone is typically from 8:30 AM to 11:00 AM EST.
How to Use Them:
Identify the Session: Determine which trading session you are in (London, New York, or Asian).
Focus on Kill Zones: Within that session, focus on the kill zones for potential trade setups. For instance, during the New York session, look for setups between 8:30 AM and 11:00 AM EST.
Silver Bullets
What They Are:
Silver Bullets: These are specific, high-probability trade setups that occur within the kill zones. They are designed to be "one shot, one kill" trades, meaning they aim for precise and effective entries and exits.
How to Use Them:
Time-Based Setup: Look for these setups within the designated kill zones. For example, between 10:00 AM and 11:00 AM for the New York AM session .
Chart Analysis: Start with higher time frames like the 15-minute chart and then refine down to 5-minute and 1-minute charts to identify imbalances or specific patterns .
Macros
What They Are:
Macros: These are broader market conditions and trends that influence your trading decisions. They include understanding the overall market direction, seasonal tendencies, and the Commitment of Traders (COT) reports.
How to Use Them:
Understand Market Conditions: Be aware of the macroeconomic factors and market conditions that could affect price movements.
Seasonal Tendencies: Know the seasonal patterns that might influence the market direction.
COT Reports: Use the Commitment of Traders reports to understand the positioning of large traders and commercial hedgers .
Putting It All Together
Preparation: Understand the macro conditions and review the COT reports.
Session and Kill Zone: Identify the trading session and focus on the kill zones.
Silver Bullet Setup: Look for high-probability setups within the kill zones using refined chart analysis.
Execution: Execute the trade with precision, aiming for a "one shot, one kill" outcome.
By following these steps, you can effectively use ICT sessions, kill zones, silver bullets, and macros to enhance your trading strategy.
Usage:
To maximize your experience, shrink the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience. All credit goes to itradesize for the SB + Macro boxes
Pinescript - Common Label & Line Array Functions Library by RRBPinescript - Common Label & Line Array Functions Library by RagingRocketBull 2021
Version 1.0
This script provides a library of common array functions for arrays of label and line objects with live testing of all functions.
Using this library you can easily create, update, delete, join label/line object arrays, and get/set properties of individual label/line object array items.
You can find the full list of supported label/line array functions below.
There are several libraries:
- Common String Functions Library
- Standard Array Functions Library
- Common Fixed Type Array Functions Library
- Common Label & Line Array Functions Library
- Common Variable Type Array Functions Library
Features:
- 30 array functions in categories create/update/delete/join/get/set with support for both label/line objects (45+ including all implementations)
- Create, Update label/line object arrays from list/array params
- GET/SET properties of individual label/line array items by index
- Join label/line objects/arrays into a single string for output
- Supports User Input of x,y coords of 5 different types: abs/rel/rel%/inc/inc% list/array, auto transforms x,y input into list/array based on type, base and xloc, translates rel into abs bar indexes
- Supports User Input of lists with shortened names of string properties, auto expands all standard string properties to their full names for use in functions
- Live Output for all/selected functions based on User Input. Test any function for possible errors you may encounter before using in script.
- Output filters: hide all excluded and show only allowed functions using a list of function names
- Output Panel customization options: set custom style, color, text size, and line spacing
Usage:
- select create function - create label/line arrays from lists or arrays (optional). Doesn't affect the update functions. The only change in output should be function name regardless of the selected implementation.
- specify num_objects for both label/line arrays (default is 7)
- specify common anchor point settings x,y base/type for both label/line arrays and GET/SET items in Common Settings
- fill lists with items to use as inputs for create label/line array functions in Create Label/Line Arrays section
- specify label/line array item index and properties to SET in corresponding sections
- select label/line SET function to see the changes applied live
Code Structure:
- translate x,y depending on x,y type, base and xloc as specified in UI (required for all functions)
- expand all shortened standard property names to full names (required for create/update* from arrays and set* functions, not needed for create/update* from lists) to prevent errors in label.new and line.new
- create param arrays from string lists (required for create/update* from arrays and set* functions, not needed for create/update* from lists)
- create label/line array from string lists (property names are auto expanded) or param arrays (requires already expanded properties)
- update entire label/line array or
- get/set label/line array item properties by index
Transforming/Expanding Input values:
- for this script to work on any chart regardless of price/scale, all x*,y* are specified as % increase relative to x0,y0 base levels by default, but user can enter abs x,price values specific for that chart if necessary.
- all lists can be empty, contain 1 or several items, have the same/different lengths. Array Length = min(min(len(list*)), mum_objects) is used to create label/line objects. Missing list items are replaced with default property values.
- when a list contains only 1 item it is duplicated (label name/tooltip is also auto incremented) to match the calculated Array Length
- since this script processes user input, all x,y values must be translated to abs bar indexes before passing them to functions. Your script may provide all data internally and doesn't require this step.
- at first int x, float y arrays are created from user string lists, transformed as described below and returned as x,y arrays.
- translated x,y arrays can then be passed to create from arrays function or can be converted back to x,y string lists for the create from lists function if necessary.
- all translation logic is separated from create/update/set functions for the following reasons:
- to avoid redundant code/dependency on ext functions/reduce local scopes and to be able to translate everything only once in one place - should be faster
- to simplify internal logic of all functions
- because your script may provide all data internally without user input and won't need the translation step
- there are 5 types available for both x,y: abs, rel, rel%, inc, inc%. In addition to that, x can be: bar index or time, y is always price.
- abs - absolute bar index/time from start bar0 (x) or price (y) from 0, is >= 0
- rel - relative bar index/time from cur bar n (x) or price from y0 base level, is >= 0
- rel% - relative % increase of bar index/time (x) or price (y) from corresponding base level (x0 or y0), can be <=> 0
- inc - relative increment (step) for each new level of bar index/time (x) or price (y) from corresponding base level (x0 or y0), can be <=> 0
- inc% - relative % increment (% step) for each new level of bar index/time (x) or price (y) from corresponding base level (x0 or y0), can be <=> 0
- x base level >= 0
- y base level can be 0 (empty) or open, close, high, low of cur bar
- single item x1_list = "50" translates into:
- for x type abs: "50, 50, 50 ..." num_objects times regardless of xloc => x = 50
- for x type rel: "50, 50, 50 ... " num_objects times => x = x_base + 50
- for x type rel%: "50%, 50%, 50% ... " num_objects times => x_base * (1 + 0.5)
- for x type inc: "0, 50, 100 ... " num_objects times => x_base + 50 * i
- for x type inc%: "0%, 50%, 100% ... " num_objects times => x_base * (1 + 0.5 * i)
- when xloc = xloc.bar_index each rel*/inc* value in the above list is then subtracted from n: n - x to convert rel to abs bar index, values of abs type are not affected
- x1_list = "0, 50, 100, ..." of type rel is the same as "50" of type inc
- x1_list = "50, 50, 50, ..." of type abs/rel/rel% produces a sequence of the same values and can be shortened to just "50"
- single item y1_list = "2" translates into (ragardless of yloc):
- for y type abs: "2, 2, 2 ..." num_objects times => y = 2
- for y type rel: "2, 2, 2 ... " num_objects times => y = y_base + 2
- for y type rel%: "2%, 2%, 2% ... " num_objects times => y = y_base * (1 + 0.02)
- for y type inc: "0, 2, 4 ... " num_objects times => y = y_base + 2 * i
- for y type inc%: "0%, 2%, 4% ... " num_objects times => y = y_base * (1 + 0.02 * i)
- when yloc != yloc.price all calculated values above are simply ignored
- y1_list = "0, 2, 4" of type rel% is the same as "2" with type inc%
- y1_list = "2, 2, 2" of type abs/rel/rel% produces a sequence of the same values and can be shortened to just "2"
- you can enter shortened property names in lists. To lookup supported shortened names use corresponding dropdowns in Set Label/Line Array Item Properties sections
- all shortened standard property names must be expanded to full names (required for create/update* from arrays and set* functions, not needed for create/update* from lists) to prevent errors in label.new and line.new
- examples of shortened property names that can be used in lists: bar_index, large, solid, label_right, white, left, left, price
- expanded to their corresponding full names: xloc.bar_index, size.large, line.style_solid, label.style_label_right, color.white, text.align_left, extend.left, yloc.price
- all expanding logic is separated from create/update* from arrays and set* functions for the same reasons as above, and because param arrays already have different types, implying the use of final values.
- all expanding logic is included in the create/update* from lists functions because it seemed more natural to process string lists from user input directly inside the function, since they are already strings.
Creating Label/Line Objects:
- use study max_lines_count and max_labels_count params to increase the max number of label/line objects to 500 (+3) if necessary. Default number of label/line objects is 50 (+3)
- all functions use standard param sequence from methods in reference, except style always comes before colors.
- standard label/line.get* functions only return a few properties, you can't read style, color, width etc.
- label.new(na, na, "") will still create a label with x = n-301, y = NaN, text = "" because max default scope for a var is 300 bars back.
- there are 2 types of color na, label color requires color(na) instead of color_na to prevent error. text_color and line_color can be color_na
- for line to be visible both x1, x2 ends must be visible on screen, also when y1 == y2 => abs(x1 - x2) >= 2 bars => line is visible
- xloc.bar_index line uses abs x1, x2 indexes and can only be within 0 and n ends, where n <= 5000 bars (free accounts) or 10000 bars (paid accounts) limit, can't be plotted into the future
- xloc.bar_time line uses abs x1, x2 times, can't go past bar0 time but can continue past cur bar time into the future, doesn't have a length limit in bars.
- xloc.bar_time line with length = exact number of bars can be plotted only within bar0 and cur bar, can't be plotted into the future reliably because of future gaps due to sessions on some charts
- xloc.bar_index line can't be created on bar 0 with fixed length value because there's only 1 bar of horiz length
- it can be created on cur bar using fixed length x < n <= 5000 or
- created on bar0 using na and then assigned final x* values on cur bar using set_x*
- created on bar0 using n - fixed_length x and then updated on cur bar using set_x*, where n <= 5000
- default orientation of lines (for style_arrow* and extend) is from left to right (from bar 50 to bar 0), it reverses when x1 and x2 are swapped
- price is a function, not a line object property
Variable Type Arrays:
- you can't create an if/function that returns var type value/array - compiler uses strict types and doesn't allow that
- however you can assign array of any type to another array of any type creating an arr pointer of invalid type that must be reassigned to a matching array type before used in any expression to prevent error
- create_any_array2 uses this loophole to return an int_arr pointer of a var type array
- this works for all array types defined with/without var keyword and doesn't work for string arrays defined with var keyword for some reason
- you can't do this with var type vars, only var type arrays because arrays are pointers passed by reference, while vars are actual values passed by value.
- you can only pass a var type value/array param to a function if all functions inside support every type - otherwise error
- alternatively values of every type must be passed simultaneously and processed separately by corresponding if branches/functions supporting these particular types returning a common single type result
- get_var_types solves this problem by generating a list of dummy values of every possible type including the source type, tricking the compiler into allowing a single valid branch to execute without error, while ignoring all dummy results
Notes:
- uses Pinescript v3 Compatibility Framework
- uses Common String Functions Library, Common Fixed Type Array Functions Library, Common Variable Type Array Functions Library
- has to be a separate script to reduce the number of local scopes/compiled file size, can't be merged with another library.
- lets you live test all label/line array functions for errors. If you see an error - change params in UI
- if you see "Loop too long" error - hide/unhide or reattach the script
- if you see "Chart references too many candles" error - change x type or value between abs/rel*. This can happen on charts with 5000+ bars when a rel bar index x is passed to label.new or line.new instead of abs bar index n - x
- create/update_label/line_array* use string lists, while create/update_label/line_array_from_arrays* use array params to create label/line arrays. "from_lists" is dropped to shorten the names of the most commonly used functions.
- create_label/line_array2,4 are preferable, 5,6 are listed for pure demonstration purposes only - don't use them, they don't improve anything but dramatically increase local scopes/compiled file size
- for this reason you would mainly be using create/update_label/line_array2,4 for list params or create/update_label/line_array_from_arrays2 for array params
- all update functions are executed after each create as proof of work and can be disabled. Only create functions are required. Use update functions when necessary - when list/array params are changed by your script.
- both lists and array item properties use the same x,y_type, x,y_base from common settings
- doesn't use pagination, a single str contains all output
- why is this so complicated? What are all these functions for?
- this script merges standard label/line object methods with standard array functions to create a powerful set of label/line object array functions to simplify manipulation of these arrays.
- this library also extends the functionality of Common Variable Type Array Functions Library providing support for label/line types in var type array functions (any_to_str6, join_any_array5)
- creating arrays from either lists or arrays adds a level of flexibility that comes with complexity. It's very likely that in your script you'd have to deal with both string lists as input, and arrays internally, once everything is converted.
- processing user input, allowing customization and targeting for any chart adds a whole new layer of complexity, all inputs must be translated and expanded before used in functions.
- different function implementations can increase/reduce local scopes and compiled file size. Select a version that best suits your needs. Creating complex scripts often requires rewriting your code multiple times to fit the limits, every line matters.
P.S. Don't rely too much on labels, for too often they are fables.
List of functions*:
* - functions from other libraries are not listed
1. Join Functions
Labels
- join_label_object(label_, d1, d2)
- join_label_array(arr, d1, d2)
- join_label_array2(arr, d1, d2, d3)
Lines
- join_line_object(line_, d1, d2)
- join_line_array(arr, d1, d2)
- join_line_array2(arr, d1, d2, d3)
Any Type
- any_to_str6(arr, index, type)
- join_any_array4(arr, d1, d2, type)
- join_any_array5(arr, d, type)
2. GET/SET Functions
Labels
- label_array_get_text(arr, index)
- label_array_get_xy(arr, index)
- label_array_get_fields(arr, index)
- label_array_set_text(arr, index, str)
- label_array_set_xy(arr, index, x, y)
- label_array_set_fields(arr, index, x, y, str)
- label_array_set_all_fields(arr, index, x, y, str, xloc, yloc, label_style, label_color, text_color, text_size, text_align, tooltip)
- label_array_set_all_fields2(arr, index, x, y, str, xloc, yloc, label_style, label_color, text_color, text_size, text_align, tooltip)
Lines
- line_array_get_price(arr, index, bar)
- line_array_get_xy(arr, index)
- line_array_get_fields(arr, index)
- line_array_set_text(arr, index, width)
- line_array_set_xy(arr, index, x1, y1, x2, y2)
- line_array_set_fields(arr, index, x1, y1, x2, y2, width)
- line_array_set_all_fields(arr, index, x1, y1, x2, y2, xloc, extend, line_style, line_color, width)
- line_array_set_all_fields2(arr, index, x1, y1, x2, y2, xloc, extend, line_style, line_color, width)
3. Create/Update/Delete Functions
Labels
- delete_label_array(label_arr)
- create_label_array(list1, list2, list3, list4, list5, d)
- create_label_array2(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array3(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array4(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array5(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array6(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- update_label_array2(label_arr, x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- update_label_array4(label_arr, x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array_from_arrays2(x_arr, y_arr, str_arr, xloc_arr, yloc_arr, style_arr, color1_arr, color2_arr, size_arr, align_arr, tooltip_arr, d)
- create_label_array_from_arrays4(x_arr, y_arr, str_arr, xloc_arr, yloc_arr, style_arr, color1_arr, color2_arr, size_arr, align_arr, tooltip_arr, d)
- update_label_array_from_arrays2(label_arr, x_arr, y_arr, str_arr, xloc_arr, yloc_arr, style_arr, color1_arr, color2_arr, size_arr, align_arr, tooltip_arr, d)
Lines
- delete_line_array(line_arr)
- create_line_array(list1, list2, list3, list4, list5, list6, d)
- create_line_array2(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array3(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array4(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array5(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array6(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- update_line_array2(line_arr, x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- update_line_array4(line_arr, x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array_from_arrays2(x1_arr, y1_arr, x2_arr, y2_arr, xloc_arr, extend_arr, style_arr, color_arr, width_arr, d)
- update_line_array_from_arrays2(line_arr, x1_arr, y1_arr, x2_arr, y2_arr, xloc_arr, extend_arr, style_arr, color_arr, width_arr, d)
Volume Weighted RSI (VW RSI)The Volume Weighted RSI (VW RSI) is a momentum oscillator designed for TradingView, implemented in Pine Script v6, that enhances the traditional Relative Strength Index (RSI) by incorporating trading volume into its calculation. Unlike the standard RSI, which measures the speed and change of price movements based solely on price data, the VW RSI weights its analysis by volume, emphasizing price movements backed by significant trading activity. This makes the VW RSI particularly effective for identifying bullish or bearish momentum, overbought/oversold conditions, and potential trend reversals in markets where volume plays a critical role, such as stocks, forex, and cryptocurrencies.
Key Features
Volume-Weighted Momentum Calculation:
The VW RSI calculates momentum by comparing the volume associated with upward price movements (up-volume) to the volume associated with downward price movements (down-volume).
Up-volume is the volume on bars where the closing price is higher than the previous close, while down-volume is the volume on bars where the closing price is lower than the previous close.
These volumes are smoothed over a user-defined period (default: 14 bars) using a Running Moving Average (RMA), and the VW RSI is computed using the formula:
\text{VW RSI} = 100 - \frac{100}{1 + \text{VoRS}}
where
\text{VoRS} = \frac{\text{Average Up-Volume}}{\text{Average Down-Volume}}
.
Oscillator Range and Interpretation:
The VW RSI oscillates between 0 and 100, with a centerline at 50.
Above 50: Indicates bullish volume momentum, suggesting that volume on up bars dominates, which may signal buying pressure and a potential uptrend.
Below 50: Indicates bearish volume momentum, suggesting that volume on down bars dominates, which may signal selling pressure and a potential downtrend.
Overbought/Oversold Levels: User-defined thresholds (default: 70 for overbought, 30 for oversold) help identify potential reversal points:
VW RSI > 70: Overbought, indicating a possible pullback or reversal.
VW RSI < 30: Oversold, indicating a possible bounce or reversal.
Visual Elements:
VW RSI Line: Plotted in a separate pane below the price chart, colored dynamically based on its value:
Green when above 50 (bullish momentum).
Red when below 50 (bearish momentum).
Gray when at 50 (neutral).
Centerline: A dashed line at 50, optionally displayed, serving as the neutral threshold between bullish and bearish momentum.
Overbought/Oversold Lines: Dashed lines at the user-defined overbought (default: 70) and oversold (default: 30) levels, optionally displayed, to highlight extreme conditions.
Background Coloring: The background of the VW RSI pane is shaded red when the indicator is in overbought territory and green when in oversold territory, providing a quick visual cue of potential reversal zones.
Alerts:
Built-in alerts for key events:
Bullish Momentum: Triggered when the VW RSI crosses above 50, indicating a shift to bullish volume momentum.
Bearish Momentum: Triggered when the VW RSI crosses below 50, indicating a shift to bearish volume momentum.
Overbought Condition: Triggered when the VW RSI crosses above the overbought threshold (default: 70), signaling a potential pullback.
Oversold Condition: Triggered when the VW RSI crosses below the oversold threshold (default: 30), signaling a potential bounce.
Input Parameters
VW RSI Length (default: 14): The period over which the up-volume and down-volume are smoothed to calculate the VW RSI. A longer period results in smoother signals, while a shorter period increases sensitivity.
Overbought Level (default: 70): The threshold above which the VW RSI is considered overbought, indicating a potential reversal or pullback.
Oversold Level (default: 30): The threshold below which the VW RSI is considered oversold, indicating a potential reversal or bounce.
Show Centerline (default: true): Toggles the display of the 50 centerline, which separates bullish and bearish momentum zones.
Show Overbought/Oversold Lines (default: true): Toggles the display of the overbought and oversold threshold lines.
How It Works
Volume Classification:
For each bar, the indicator determines whether the price movement is upward or downward:
If the current close is higher than the previous close, the bar’s volume is classified as up-volume.
If the current close is lower than the previous close, the bar’s volume is classified as down-volume.
If the close is unchanged, both up-volume and down-volume are set to 0 for that bar.
Smoothing:
The up-volume and down-volume are smoothed using a Running Moving Average (RMA) over the specified period (default: 14 bars) to reduce noise and provide a more stable measure of volume momentum.
VW RSI Calculation:
The Volume Relative Strength (VoRS) is calculated as the ratio of smoothed up-volume to smoothed down-volume.
The VW RSI is then computed using the standard RSI formula, but with volume data instead of price changes, resulting in a value between 0 and 100.
Visualization and Alerts:
The VW RSI is plotted with dynamic coloring to reflect its momentum direction, and optional lines are drawn for the centerline and overbought/oversold levels.
Background coloring highlights overbought and oversold conditions, and alerts notify the trader of significant crossings.
Usage
Timeframe: The VW RSI can be used on any timeframe, but it is particularly effective on intraday charts (e.g., 1-hour, 4-hour) or daily charts where volume data is reliable. Shorter timeframes may require a shorter length for increased sensitivity, while longer timeframes may benefit from a longer length for smoother signals.
Markets: Best suited for markets with significant and reliable volume data, such as stocks, forex, and cryptocurrencies. It may be less effective in markets with low or inconsistent volume, such as certain futures contracts.
Trading Strategies:
Trend Confirmation:
Use the VW RSI to confirm the direction of a trend. For example, in an uptrend, look for the VW RSI to remain above 50, indicating sustained bullish volume momentum, and consider buying on pullbacks when the VW RSI dips but stays above 50.
In a downtrend, look for the VW RSI to remain below 50, indicating sustained bearish volume momentum, and consider selling on rallies when the VW RSI rises but stays below 50.
Overbought/Oversold Conditions:
When the VW RSI crosses above 70, the market may be overbought, suggesting a potential pullback or reversal. Consider taking profits on long positions or preparing for a short entry, but confirm with price action or other indicators.
When the VW RSI crosses below 30, the market may be oversold, suggesting a potential bounce or reversal. Consider entering long positions or covering shorts, but confirm with additional signals.
Divergences:
Look for divergences between the VW RSI and price to spot potential reversals. For example, if the price makes a higher high but the VW RSI makes a lower high, this bearish divergence may signal an impending downtrend.
Conversely, if the price makes a lower low but the VW RSI makes a higher low, this bullish divergence may signal an impending uptrend.
Momentum Shifts:
A crossover above 50 can signal the start of bullish momentum, making it a potential entry point for long trades.
A crossunder below 50 can signal the start of bearish momentum, making it a potential entry point for short trades or an exit for long positions.
Example
On a 4-hour SOLUSDT chart:
During an uptrend, the VW RSI might rise above 50 and stay there, confirming bullish volume momentum. If it approaches 70, it may indicate overbought conditions, as seen near a price peak of 145.08, suggesting a potential pullback.
During a downtrend, the VW RSI might fall below 50, confirming bearish volume momentum. If it drops below 30 near a price low of 141.82, it may indicate oversold conditions, suggesting a potential bounce, as seen in a slight recovery afterward.
A bullish divergence might occur if the price makes a lower low during the downtrend, but the VW RSI makes a higher low, signaling a potential reversal.
Limitations
Lagging Nature: Like the traditional RSI, the VW RSI is a lagging indicator because it relies on smoothed data (RMA). It may not react quickly to sudden price reversals, potentially missing the start of new trends.
False Signals in Ranging Markets: In choppy or ranging markets, the VW RSI may oscillate around 50, generating frequent crossovers that lead to false signals. Combining it with a trend filter (e.g., ADX) can help mitigate this.
Volume Data Dependency: The VW RSI relies on accurate volume data, which may be inconsistent or unavailable in some markets (e.g., certain forex pairs or futures contracts). In such cases, the indicator’s effectiveness may be reduced.
Overbought/Oversold in Strong Trends: During strong trends, the VW RSI can remain in overbought or oversold territory for extended periods, leading to premature exit signals. Use additional confirmation to avoid exiting too early.
Potential Improvements
Smoothing Options: Add options to use different smoothing methods (e.g., EMA, SMA) instead of RMA for the up/down volume calculations, allowing users to adjust the indicator’s responsiveness.
Divergence Detection: Include logic to detect and plot bullish/bearish divergences between the VW RSI and price, providing visual cues for potential reversals.
Customizable Colors: Allow users to customize the colors of the VW RSI line, centerline, overbought/oversold lines, and background shading.
Trend Filter: Integrate a trend strength filter (e.g., ADX > 25) to ensure signals are generated only during strong trends, reducing false signals in ranging markets.
The Volume Weighted RSI (VW RSI) is a powerful tool for traders seeking to incorporate volume into their momentum analysis, offering a unique perspective on market dynamics by emphasizing price movements backed by significant trading activity. It is best used in conjunction with other indicators and price action analysis to confirm signals and improve trading decisions.
Extreme Pressure Zones Indicator (EPZ) [BullByte]Extreme Pressure Zones Indicator(EPZ)
The Extreme Pressure Zones (EPZ) Indicator is a proprietary market analysis tool designed to highlight potential overbought and oversold "pressure zones" in any financial chart. It does this by combining several unique measurements of price action and volume into a single, bounded oscillator (0–100). Unlike simple momentum or volatility indicators, EPZ captures multiple facets of market pressure: price rejection, trend momentum, supply/demand imbalance, and institutional (smart money) flow. This is not a random mashup of generic indicators; each component was chosen and weighted to reveal extreme market conditions that often precede reversals or strong continuations.
What it is?
EPZ estimates buying/selling pressure and highlights potential extreme zones with a single, bounded 0–100 oscillator built from four normalized components. Context-aware weighting adapts to volatility, trendiness, and relative volume. Visual tools include adaptive thresholds, confirmed-on-close extremes, divergence, an MTF dashboard, and optional gradient candles.
Purpose and originality (not a mashup)
Purpose: Identify when pressure is building or reaching potential extremes while filtering noise across regimes and symbols.
Originality: EPZ integrates price rejection, momentum cascade, pressure distribution, and smart money flow into one bounded scale with context-aware weighting. It is not a cosmetic mashup of public indicators.
Why a trader might use EPZ
EPZ provides a multi-dimensional gauge of market extremes that standalone indicators may miss. Traders might use it to:
Spot Reversals: When EPZ enters an "Extreme High" zone (high red), it implies selling pressure might soon dominate. This can hint at a topside reversal or at least a pause in rallies. Conversely, "Extreme Low" (green) can highlight bottom-fish opportunities. The indicator's divergence module (optional) also finds hidden bullish/bearish divergences between price and EPZ, a clue that price momentum is weakening.
Measure Momentum Shifts: Because EPZ blends momentum and volume, it reacts faster than many single metrics. A rising MPO indicates building bullish pressure, while a falling MPO shows increasing bearish pressure. Traders can use this like a refined RSI: above 50 means bullish bias, below 50 means bearish bias, but with context provided by the thresholds.
Filter Trades: In trend-following systems, one could require EPZ to be in the bullish (green) zone before taking longs, or avoid new trades when EPZ is extreme. In mean-reversion systems, one might specifically look to fade extremes flagged by EPZ.
Multi-Timeframe Confirmation: The dashboard can fetch a higher timeframe EPZ value. For example, you might trade a 15-minute chart only when the 60-minute EPZ agrees on pressure direction.
Components and how they're combined
Rejection (PRV) – Captures price rejection based on candle wicks and volume (see Price Rejection Volume).
Momentum Cascade (MCD) – Blends multiple momentum periods (3,5,8,13) into a normalized momentum score.
Pressure Distribution (PDI) – Measures net buy/sell pressure by comparing volume on up vs down candles.
Smart Money Flow (SMF) – An adaptation of money flow index that emphasizes unusual volume spikes.
Each of these components produces a 0–100 value (higher means more bullish pressure). They are then weighted and averaged into the final Market Pressure Oscillator (MPO), which is smoothed and scaled. By combining these four views, EPZ stands out as a comprehensive pressure gauge – the whole is greater than the sum of parts
Context-aware weighting:
Higher volatility → more PRV weight
Trendiness up (RSI of ATR > 25) → more MCD weight
Relative volume > 1.2x → more PDI weight
SMF holds a stable weight
The weighted average is smoothed and scaled into MPO ∈ with 50 as the neutral midline.
What makes EPZ stand out
Four orthogonal inputs (price action, momentum, pressure, flow) unified in a single bounded oscillator with consistent thresholds.
Adaptive thresholds (optional) plus robust extreme detection that also triggers on crossovers, so static thresholds work reliably too.
Confirm Extremes on Bar Close (default ON): dots/arrows/labels/alerts print on closed bars to avoid repaint confusion.
Clean dashboard, divergence tools, pre-alerts, and optional on-price gradients. Visual 3D layering uses offsets for depth only,no lookahead.
Recommended markets and timeframes
Best: liquid symbols (index futures, large-cap equities, major FX, BTC/ETH).
Timeframes: 5–15m (more signals; consider higher thresholds), 1H–4H (balanced), 1D (clear regimes).
Use caution on illiquid or very low TFs where wick/volume geometry is erratic.
Logic and thresholds
MPO ∈ ; 50 = neutral. Above 50 = bullish pressure; below 50 = bearish.
Static thresholds (defaults): thrHigh = 70, thrLow = 30; warning bands 5 pts inside extremes (65/35).
Adaptive thresholds (optional):
thrHigh = min(BaseHigh + 5, mean(MPO,100) + stdev(MPO,100) × ExtremeSensitivity)
thrLow = max(BaseLow − 5, mean(MPO,100) − stdev(MPO,100) × ExtremeSensitivity)
Extreme detection
High: MPO ≥ thrHigh with peak/slope or crossover filter.
Low: MPO ≤ thrLow with trough/slope or crossover filter.
Cooldown: 5 bars (default). A new extreme will not print until the cooldown elapses, even if MPO re-enters the zone.
Confirmation
"Confirm Extremes on Bar Close" (default ON) gates extreme markers, pre-alerts, and alerts to closed bars (non-repainting).
Divergences
Pivot-based bullish/bearish divergence; tags appear only after left/right bars elapse (lookbackPivot).
MTF
HTF MPO retrieved with lookahead_off; values can update intrabar and finalize at HTF close. This is disclosed and expected.
Inputs and defaults (key ones)
Core: Sensitivity=1.0; Analysis Period=14; Smoothing=3; Adaptive Thresholds=OFF.
Extremes: Base High=70, Base Low=30; Extreme Sensitivity=1.5; Confirm Extremes on Bar Close=ON; Cooldown=5; Dot size Small/Tiny.
Visuals: Heatmap ON; 3D depth optional; Strength bars ON; Pre-alerts OFF; Divergences ON with tags ON; Gradient candles OFF; Glow ON.
Dashboard: ON; Position=Top Right; Size=Normal; MTF ON; HTF=60m; compact overlay table on price chart.
Advanced caps: Max Oscillator Labels=80; Max Extreme Guide Lines=80; Divergence objects=60.
Dashboard: what each element means
Header: EPZ ANALYSIS.
Large readout: Current MPO; color reflects state (extreme, approaching, or neutral).
Status badge: "Extreme High/Low", "Approaching High/Low", "Bullish/Neutral/Bearish".
HTF cell (when MTF ON): Higher-timeframe MPO, color-coded vs extremes; updates intrabar, settles at HTF close.
Predicted (when MTF OFF): Simple MPO extrapolation using momentum/acceleration—illustrative only.
Thresholds: Current thrHigh/thrLow (static or adaptive).
Components: ASCII bars + values for PRV, MCD, PDI, SMF.
Market metrics: Volume Ratio (x) and ATR% of price.
Strength: Bar indicator of |MPO − 50| × 2.
Confidence: Heuristic gauge (100 in extremes, 70 in warnings, 50 with divergence, else |MPO − 50|). Convenience only, not probability.
How to read the oscillator
MPO Value (0–100): A reading of 50 is neutral. Values above ~55 are increasingly bullish (green), while below ~45 are increasingly bearish (red). Think of these as "market pressure".
Extreme Zones: When MPO climbs into the bright orange/red area (above the base-high line, default 70), the chart will display a dot and downward arrow marking that extreme. Traders often treat this as a sign to tighten stops or look for shorts. Similarly, a bright green dot/up-arrow appears when MPO falls below the base-low (30), hinting at a bullish setup.
Heatmap/Candles: If "Pressure Heatmap" is enabled, the background of the oscillator pane will fade green or red depending on MPO. Users can optionally color the price candles by MPO value (gradient candles) to see these extremes on the main chart.
Prediction Zone(optional): A dashed projection line extends the MPO forward by a small number of bars (prediction_bars) using current MPO momentum and acceleration. This is a heuristic extrapolation best used for short horizons (1–5 bars) to anticipate whether MPO may touch a warning or extreme zone. It is provisional and becomes less reliable with longer projection lengths — always confirm predicted moves with bar-close MPO and HTF context before acting.
Divergences: When price makes a higher high but EPZ makes a lower high (bearish divergence), the indicator can draw dotted lines and a "Bear Div" tag. The opposite (lower low price, higher EPZ) gives "Bull Div". These signals confirm waning momentum at extremes.
Zones: Warning bands near extremes; Extreme zones beyond thresholds.
Crossovers: MPO rising through 35 suggests easing downside pressure; falling through 65 suggests waning upside pressure.
Dots/arrows: Extreme markers appear on closed bars when confirmation is ON and respect the 5-bar cooldown.
Pre-alert dots (optional): Proximity cues in warning zones; also gated to bar close when confirmation is ON.
Histogram: Distance from neutral (50); highlights strengthening or weakening pressure.
Divergence tags: "Bear Div" = higher price high with lower MPO high; "Bull Div" = lower price low with higher MPO low.
Pressure Heatmap : Layered gradient background that visually highlights pressure strength across the MPO scale; adjustable intensity and optional zone overlays (warning / extreme) for quick visual scanning.
A typical reading: If the oscillator is rising from neutral towards the high zone (green→orange→red), the chart may see strong buying culminating in a stall. If it then turns down from the extreme, that peak EPZ dot signals sell pressure.
Alerts
EPZ: Extreme Context — fires on confirmed extremes (respects cooldown).
EPZ: Approaching Threshold — fires in warning zones if no extreme.
EPZ: Divergence — fires on confirmed pivot divergences.
Tip: Set alerts to "Once per bar close" to align with confirmation and avoid intrabar repaint.
Practical usage ideas
Trend continuation: In positive regimes (MPO > 50 and rising), pullbacks holding above 50 often precede continuation; mirror for bearish regimes.
Exhaustion caution: E High/E Low can mark exhaustion risk; many wait for MPO rollover or divergence to time fades or partial exits.
Adaptive thresholds: Useful on assets with shifting volatility regimes to maintain meaningful "extreme" levels.
MTF alignment: Prefer setups that agree with the HTF MPO to reduce countertrend noise.
Examples
Screenshots captured in TradingView Replay to freeze the bar at close so values don't fluctuate intrabar. These examples use default settings and are reproducible on the same bars; they are for illustration, not cherry-picking or performance claims.
Example 1 — BTCUSDT, 1h — E Low
MPO closed at 26.6 (below the 30 extreme), printing a confirmed E Low. HTF MPO is 26.6, so higher-timeframe pressure remains bearish. Components are subdued (Momentum/Pressure/Smart$ ≈ 29–37), with Vol Ratio ≈ 1.19x and ATR% ≈ 0.37%. A prior Bear Div flagged weakening impulse into the drop. With cooldown set to 5 bars, new extremes are rate-limited. Many traders wait for MPO to curl up and reclaim 35 or for a fresh Bull Div before considering countertrend ideas; if MPO cannot reclaim 35 and HTF stays weak, treat bounces cautiously. Educational illustration only.
Example 2 — ETHUSD, 30m — E High
A strong impulse pushed MPO into the extreme zone (≥ 70), printing a confirmed E High on close. Shortly after, MPO cooled to ~61.5 while a Bear Div appeared, showing momentum lag as price pushed a higher high. Volume and volatility were elevated (≈ 1.79x / 1.25%). With a 5-bar cooldown, additional extremes won't print immediately. Some treat E High as exhaustion risk—either waiting for MPO rollover under 65/50 to fade, or for a pullback that holds above 50 to re-join the trend if higher-timeframe pressure remains constructive. Educational illustration only.
Known limitations and caveats
The MPO line itself can change intrabar; extreme markers/alerts do not repaint when "Confirm Extremes on Bar Close" is ON.
HTF values settle at the close of the HTF bar.
Illiquid symbols or very low TFs can be noisy; consider higher thresholds or longer smoothing.
Prediction line (when enabled) is a visual extrapolation only.
For coders
Pine v6. MTF via request.security with lookahead_off.
Extremes include crossover triggers so static thresholds also yield E High/E Low.
Extreme markers and pre-alerts are gated by barstate.isconfirmed when confirmation is ON.
Arrays prune oldest objects to respect resource limits; defaults (80/80/60) are conservative for low TFs.
3D layering uses negative offsets purely for drawing depth (no lookahead).
Screenshot methodology:
To make labels legible and to demonstrate non-repainting behavior, the examples were captured in TradingView Replay with "Confirm Extremes on Bar Close" enabled. Replay is used only to freeze the bar at close so plots don't change intrabar. The examples use default settings, include both Extreme Low and Extreme High cases, and can be reproduced by scrolling to the same bars outside Replay. This is an educational illustration, not a performance claim.
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Markets involve risk; past behavior does not guarantee future results. You are responsible for your own testing, risk management, and decisions.
QTrade Golden, Bronze & Death, Bubonic Cross AlertsThis indicator highlights key EMA regime shifts with simple, color-coded triangles:
- Golden / Death Cross — 50 EMA crossing above/below the 200 EMA.
- Bronze / Bubonic Cross — 50 EMA crossing above/below the 100 EMA.
- Early-Warning Proxy — tiny triangles for the 4 EMA vs. 200 EMA (4↑200 and 4↓200). These often fire before the 50/100 and 50/200 crosses.
No text clutter on the chart—just triangles. Colors: gold (50↑200), red (50↓200), darker-yellow bronze (50↑100), burgundy (50↓100), turquoise (4↑200), purple (4↓200).
What it tells you (in order of warning → confirmation)
- First warning: 4 EMA crosses the 200 EMA (proxy for price shifting around the 200 line).
- Second warning: 50 EMA crosses the 100 EMA (Bronze/Bubonic).
- Confirmation: 50 EMA crosses the 200 EMA (Golden/Death).
Alerts included
- Golden Cross (50↑200) and Death Cross (50↓200)
- Bronze Cross (50↑100) and Bubonic Cross (50↓100)
- 4 EMA vs. 200 EMA crosses (up & down) — early-warning proxy
- Price–100 EMA events (touch/cross, if enabled in settings)