EMA CrossMoving averages based trend indicator
Plots
Hull Moving average 34
Simple MA 200
Exponential MA 5
Signals on crossing and turn around points.
지표 및 전략
ICT Key Levels: PDH / PDL / Daily Open//@version=5
indicator("ICT Key Levels: PDH / PDL / Daily Open", shorttitle="ICT Levels", overlay=true)
// --- Inputs
showPD = input.bool(true, "Mostrar PDH/PDL")
showOpen = input.bool(true, "Mostrar Daily Open")
pdhColor = input.color(color.new(color.green, 0), "Color PDH")
pdlColor = input.color(color.new(color.red, 0), "Color PDL")
openColor = input.color(color.new(color.orange, 0), "Color Daily Open")
lineWidth = input.int(1, "Ancho líneas", minval=1, maxval=4)
// --- Previous day high / low (using daily security)
pdh = request.security(syminfo.tickerid, "D", high )
pdl = request.security(syminfo.tickerid, "D", low )
// --- Daily open (current day's open on Daily timeframe)
dailyOpen = request.security(syminfo.tickerid, "D", open)
// --- Plots
plot(showPD and not na(pdh) ? pdh : na, title="PDH", color=pdhColor, linewidth=lineWidth, style=plot.style_line)
plot(showPD and not na(pdl) ? pdl : na, title="PDL", color=pdlColor, linewidth=lineWidth, style=plot.style_line)
plot(showOpen and not na(dailyOpen) ? dailyOpen : na, title="Daily Open", color=openColor, linewidth=lineWidth, style=plot.style_line)
// --- Optional: etiquetas en inicio de día (solo en la primera barra diaria)
isNewDay = ta.change(time("D"))
labelNewDayOpen = input.bool(true, "Mostrar etiqueta en apertura diaria")
if labelNewDayOpen and isNewDay
label.new(bar_index, dailyOpen, text="Open", style=label.style_label_down, color=color.new(openColor,50), textcolor=color.black, yloc=yloc.price)
My script//@version=5
indicator("LTF Multi-Condition BUY Signal (v5 clean)", overlay=true, max_labels_count=100, max_lines_count=100)
// ───────────────── INPUTS ─────────────────
pivot_len = input.int(4, "Pivot sensitivity (structure)", minval=2, maxval=12)
range_len = input.int(20, "Range lookback for breakout", minval=5)
htf_tf = input.timeframe("480", "HTF timeframe (8H+)")
reclaim_window = input.int(5, "Reclaim window (bars)", minval=1)
ema_fast_len = input.int(9, "EMA fast length")
ema_slow_len = input.int(21, "EMA slow length")
rsi_len = input.int(14, "RSI length")
rsi_pivot_len = input.int(4, "RSI pivot sensitivity")
rsi_div_lookback = input.int(30, "RSI divergence max lookback (bars)")
daily_vol_mult = input.float(1.0, "Daily volume vs SMA multiplier", step=0.1)
htf_vol_sma_len = input.int(20, "HTF volume SMA length")
require_reclaim = input.bool(true, "Require HTF reclaim")
use_aggressive_HL = input.bool(false, "Aggressive HL detection")
// ───────────────── BASE INDICATORS ─────────────────
emaFast = ta.ema(close, ema_fast_len)
emaSlow = ta.ema(close, ema_slow_len)
rsiVal = ta.rsi(close, rsi_len)
// ───────────────── DAILY CHECKS (VOLUME & OBV) ─────────────────
// Daily OBV and previous value
daily_obv = request.security(syminfo.tickerid, "D",
ta.cum(ta.change(close) > 0 ? volume : ta.change(close) < 0 ? -volume : 0))
daily_obv_prev = request.security(syminfo.tickerid, "D",
ta.cum(ta.change(close) > 0 ? volume : ta.change(close) < 0 ? -volume : 0) )
// Daily volume & SMA
daily_vol = request.security(syminfo.tickerid, "D", volume)
daily_vol_sma = request.security(syminfo.tickerid, "D", ta.sma(volume, 20))
daily_vol_ok = not na(daily_vol) and not na(daily_vol_sma) and daily_vol > daily_vol_sma * daily_vol_mult
daily_obv_ok = not na(daily_obv) and not na(daily_obv_prev) and daily_obv > daily_obv_prev
// ───────────────── HTF SUPPORT / RECLAIM ─────────────────
htf_high = request.security(syminfo.tickerid, htf_tf, high)
htf_low = request.security(syminfo.tickerid, htf_tf, low)
htf_close = request.security(syminfo.tickerid, htf_tf, close)
htf_volume = request.security(syminfo.tickerid, htf_tf, volume)
htf_vol_sma = request.security(syminfo.tickerid, htf_tf, ta.sma(volume, htf_vol_sma_len))
htf_bull_reject = not na(htf_high) and not na(htf_low) and not na(htf_close) and (htf_close - htf_low) > (htf_high - htf_close)
htf_vol_confirm = not na(htf_volume) and not na(htf_vol_sma) and htf_volume > htf_vol_sma
htf_support_level = (htf_bull_reject and htf_vol_confirm) ? htf_low : na
// Reclaim: LTF close back above HTF support within N bars
reclaimed_now = not na(htf_support_level) and close > htf_support_level and ta.barssince(close <= htf_support_level) <= reclaim_window
htf_reclaim_ok = require_reclaim ? reclaimed_now : true
// ───────────────── STRUCTURE: BOS & HL (CoC) ─────────────────
swingHighVal = ta.pivothigh(high, pivot_len, pivot_len)
swingLowVal = ta.pivotlow(low, pivot_len, pivot_len)
swingHighCond = not na(swingHighVal)
swingLowCond = not na(swingLowVal)
lastSwingHigh = ta.valuewhen(swingHighCond, swingHighVal, 0)
prevSwingHigh = ta.valuewhen(swingHighCond, swingHighVal, 1)
lastSwingLow = ta.valuewhen(swingLowCond, swingLowVal, 0)
prevSwingLow = ta.valuewhen(swingLowCond, swingLowVal, 1)
bos_bull = not na(prevSwingHigh) and close > prevSwingHigh
hl_confirm = not na(lastSwingLow) and not na(prevSwingLow) and lastSwingLow > prevSwingLow and ta.barssince(swingLowCond) <= 30
if use_aggressive_HL
hl_confirm := hl_confirm or (low > low and ta.barssince(swingLowCond) <= 12)
// ───────────────── RSI BULLISH DIVERGENCE ─────────────────
rsiLowVal = ta.pivotlow(rsiVal, rsi_pivot_len, rsi_pivot_len)
rsiLowCond = not na(rsiLowVal)
priceAtRsiLowA = ta.valuewhen(rsiLowCond, low , 0)
priceAtRsiLowB = ta.valuewhen(rsiLowCond, low , 1)
rsiLowA = ta.valuewhen(rsiLowCond, rsiVal , 0)
rsiLowB = ta.valuewhen(rsiLowCond, rsiVal , 1)
rsi_div_ok = not na(priceAtRsiLowA) and not na(priceAtRsiLowB) and not na(rsiLowA) and not na(rsiLowB) and
(priceAtRsiLowA < priceAtRsiLowB) and (rsiLowA > rsiLowB) and ta.barssince(rsiLowCond) <= rsi_div_lookback
// ───────────────── RANGE BREAKOUT ─────────────────
range_high = ta.highest(high, range_len)
range_breakout = ta.crossover(close, range_high)
// ───────────────── EMA CROSS / TREND ─────────────────
ema_cross_happened = ta.crossover(emaFast, emaSlow)
ema_trend_ok = emaFast > emaSlow
// ───────────────── FINAL BUY CONDITION ─────────────────
all_price_checks = bos_bull and hl_confirm and rsi_div_ok and range_breakout
all_filter_checks = ema_trend_ok and ema_cross_happened and daily_vol_ok and daily_obv_ok and htf_reclaim_ok
buy_condition = all_price_checks and all_filter_checks
// ───────────────── PLOTS & ALERT ─────────────────
plotshape(
buy_condition,
title = "BUY Signal",
location = location.belowbar,
style = shape.labelup,
text = "BUY",
textcolor = color.white,
color = color.green,
size = size.small)
plot(htf_support_level, title="HTF Support", color=color.new(color.green, 0), linewidth=2, style=plot.style_linebr)
alertcondition(buy_condition, title="LTF BUY Signal", message="LTF BUY Signal on {{ticker}} ({{interval}}) — all conditions met")
Adaptive ATR% Grid + SuperTrend + OrderFlipDescription:
This indicator combines multiple technical analysis tools to identify key price levels and trading signals:
ATR% Grid – automatic plotting of support and resistance levels based on current price and volatility (ATR). Useful for identifying potential targets and entry/exit zones.
SuperTrend – a classic trend indicator with an adaptive ATR multiplier that adjusts based on average volatility.
OrderFlip – identifies price reversal points relative to a moving average with ATR-based sensitivity, optionally filtered by OBV and DMI.
MTF Confirmation – multi-timeframe trend verification using EMA to reduce false signals.
Signal Labels – "LONG" and "SHORT" labels appear on the chart with an offset from the price for better visibility.
JSON Alerts – ready-to-use format for automated alerts, including price, SuperTrend direction, Fair Zone, and ATR%.
Features:
Fully compatible with Pine Script v6
Lines and signals are fixed on the chart, do not shift with new bars
Configurable grid, ATR, SuperTrend, and filter parameters
Works with MTF analysis and classic indicators (OBV/DMI)
Usage:
Best used with additional indicators and risk management strategies. ATR% Grid is ideal for both positional trading and intraday setups.
перевод на русский
Описание:
Этот индикатор объединяет несколько методов технического анализа для выявления ключевых уровней цены и сигналов на покупку/продажу:
Сетка ATR% (ATR% Grid) – автоматическое построение уровней поддержки и сопротивления на основе текущей цены и волатильности (ATR). Позволяет видеть потенциальные цели и зоны входа/выхода.
SuperTrend – классический трендовый индикатор с адаптивным множителем ATR, который корректируется на основе средней волатильности.
OrderFlip – определение моментов разворота цены относительно скользящей средней с учетом ATR, с возможностью фильтрации по OBV и DMI.
MTF-подтверждение – проверка направления тренда на нескольких таймфреймах с помощью EMA, чтобы снизить ложные сигналы.
Сигнальные метки – на графике появляются "LONG" и "SHORT" с отступом от цены для наглядности.
JSON Alerts – готовый формат для автоматических уведомлений, включающий цену, направление SuperTrend, Fair Zone и ATR%.
Особенности:
Поддержка Pine Script v6
Линии и сигналы закреплены на графике, не двигаются при обновлении свечей
Настраиваемые параметры сетки, ATR, SuperTrend и фильтров
Совместимость с MTF-анализом и классическими индикаторами OBV/DMI
Рекомендации:
Используйте в сочетании с другими индикаторами и стратегиями управления риском. Сетка ATR% отлично подходит для позиционной торговли и интрадей.
ATR% Grid – automatic plotting of support and resistance levels based on current price and volatility (ATR). Useful for identifying potential targets and entry/exit zones.
SuperTrend – a classic trend indicator with an adaptive ATR multiplier that adjusts based on average volatility.
TRI - Linear Regression ChannelsDESCRIPTION:
Advanced Linear Regression Channel indicator with comprehensive breakout detection
and alert system. Provides visual representation of price trends using statistical
regression analysis with customizable bands, channels, and future projections.
This indicator calculates linear regression lines based on price action and creates
dynamic channels that adapt to market volatility. It includes multiple visualization
modes, breakout detection, and an extensive alert system for trading opportunities.
KEY FEATURES:
Linear Regression Bands: Upper, middle, and lower bands based on regression analysis
Regression Channel: Alternative channel visualization with deviation bands
Future Projection: Extends regression channel into the future for trend prediction
Breakout Detection: Real-time detection of price breakouts above/below key levels
Confirmed Breakouts: Validates breakouts using previous bar confirmation
Pivot Markers: Visual markers for pivot points outside channel boundaries
Comprehensive Alerts: Multiple alert types for different breakout scenarios
Customizable Colors: Full control over line colors and fill transparency
Flat Color Fills: Non-gradient background fills for clean visualization
CREDITS & ATTRIBUTION:
Based on the "Linear Regression Channel" indicator by ChartPrime.
Original work licensed under Mozilla Public License 2.0.
IMPROVEMENTS & DIFFERENCES FROM ORIGINAL:
1. Enhanced Alert System:
Added comprehensive breakout alerts for mid line, support, and resistance
Implemented confirmed breakout detection using previous bar validation
Separate alerts for bullish and bearish breakouts
Real-time and confirmed breakout alerts for better signal quality
2. Improved Visualization:
Flat color fills without gradients for cleaner appearance
Customizable line colors with separate controls for upper/lower/mid lines
Color coordination: lines match their respective fill colors with less transparency
Better visual organization with meaningful plot names
3. Performance Optimizations:
Pre-calculated common conditions to reduce redundant evaluations
Optimized RMA calculation (calculated once instead of twice)
Streamlined alert logic to eliminate redundant checks
Better code organization for improved execution efficiency
4. Code Quality:
Reorganized code structure for better readability and maintainability
Clear separation of concerns (calculations, detection, alerts, visualization)
Consistent naming conventions and code formatting
Comprehensive comments and documentation
5. Additional Features:
Pivot-based breakout markers with directional triangles
Support for multiple channel modes (bands, channel, future projection)
Arrow direction indicator for trend visualization
Configurable extension periods for channels
USAGE:
1. Enable Linear Regression Bands for standard upper/mid/lower visualization
2. Use Regression Channel for alternative channel display with deviation bands
3. Enable Future Projection to see where the channel may extend
4. Configure alerts in TradingView alert settings for breakout notifications
5. Customize colors to match your trading style and chart theme
ALERT TYPES:
Mid Line Breakout: Price crosses the middle regression line
Support Breakout: Price breaks below the lower band
Resistance Breakout: Price breaks above the upper band
Confirmed Breakouts: Validated breakouts using previous bar confirmation
Pivot Markers: Visual indicators when pivots occur outside channel boundaries
Pure Wyckoff V50R [Region Based]Pure Wyckoff V50R — Regional Wyckoff Volume-Price Structure Scanner
This script implements a semi-automatic Wyckoff volume–price analysis based purely on regional behaviour, not on single candles. Instead of trying to label every bar, it analyses the last N candles (default ≥ 50) and their volume distribution to estimate whether the market is in an accumulation, distribution or trend phase.
Main features:
🔍 Region-based structure detection
Scans the last regLen bars to find the trading range, then attempts to locate key Wyckoff points such as
SC (Selling Climax), AR, ST, Spring, UT, LPSY, and draws the SC–AR band when a structure is active.
⚖️ Supply–demand balance
Uses regional bullish vs bearish volume to show whether Demand > Supply, Supply > Demand, or Balanced for the current range.
🧠 Phase & decision panel
For the current bar the panel summarises:
overall structure (bullish / bearish / ranging),
approximate Wyckoff phase (e.g. “A phase: SC→AR rally”, “B phase: top distribution zone”, “Bottom testing zone”),
VSA-style bar reading (no supply, effort vs result, SOW, etc.),
current key signal (Spring / UT / LPSY / ST / Trend),
one-line short-term and long-term trading bias.
📊 Scoreboard
Simple scores for structure, volume and trend to give a quick “bullish / bearish / neutral” overview.
Recommended use:
Designed mainly for higher timeframes (Daily / 4H) where Wyckoff structures are clearer.
Parameters (window length, volume averages, multipliers) should be tuned to the instrument and timeframe.
This is a structure helper, not an automatic signal provider – always combine it with your own discretion and risk management.
Disclaimer: This script is for educational and analytical purposes only and does not constitute financial advice. Use at your own risk and feel free to share feedback or improvements.
QLC v8.4 – GIBAUUM BEAST + ANTI-FAKEOUTQLC v8.4 – GIBAUUM BEAST + ANTI-FAKEOUT
QLC v8.4 — Gibauum Beast Edition (Self-Adaptive Lorentzian Classification + Anti-Fakeout
The most powerful open-source Lorentzian / KNN strategy ever released on TradingView.
Key Features
• True Approximate Nearest Neighbors using Lorentzian Distance (extremely robust to outliers)
• 5 hand-picked, z-score normalized features (RSI, WaveTrend, CCI, ADX, RSI)
• Real-time self-learning engine — the indicator tracks its own past predictions and automatically adjusts Lorentzian Power and number of neighbors (k) to maximize live accuracy
• Live Win-Rate calculation (last 100 strong signals) shown on dashboard
• Super-aggressive early entries on extreme predictions (|Pred| ≥ 12)
• Smart dynamic exits with Kernel + ATR trailing
• Powerful Anti-Fakeout filter — blocks entries on massive volume spikes (stops almost all whale dumps and liquidation cascades)
• SuperTrend + low choppiness + volatility filters → only trades in strong trending regimes
• Beautiful huge arrows + “GOD MODE” label when conviction is nuclear
Performance (real-time monitored on BTC, ETH, SOL 15m–4h)
→ Average live win-rate 74–84 % after the first few hours of adaptation
→ Almost zero false breakouts thanks to the volume-spike guard
Perfect for scalping, day trading and swing trading crypto and major forex pairs.
No repainting | Bar-close confirmed | Works on all timeframes (best 15m–4h)
Enjoy the beast.
an_dy_time_marker+killzone+sessionAn indicator where you can configure 5 different trading times. You can also view the kill zone and the entire session.
Have fun and catch the pips!
Previous Day • Week • Month High/Low (Customizable)Simple Previous Day, Week and Month Levels. Customisable as well.
ORB indicatorthis indicator marks out the first 15 min high and low on the candle that opens in each session, very easy to read and minimalist
Regime [CHE] Regime — Minimal HTF MACD histogram regime marker with a simple rising versus falling state.
Summary
Regime is a lightweight overlay that turns a higher-timeframe-style MACD histogram condition into a simple regime marker on your chart. It queries an imported core module to determine whether the histogram is rising and then paints a consistent marker color based on that boolean state. The output is intentionally minimal: no lines, no panels, no extra smoothing visuals, just a repeated marker that reflects the current regime. This makes it useful as a quick context filter for other signals rather than a standalone system.
Motivation: Why this design?
A common problem in discretionary and systematic workflows is clutter and over-interpretation. Many regime tools draw multiple plots, which can distract from price structure. This script reduces the regime idea to one stable question: is the MACD histogram rising under a given preset and smoothing length. The core logic is delegated to a shared module to keep the indicator thin and consistent across scripts that rely on the same definition.
What’s different vs. standard approaches?
Reference baseline: A standard MACD histogram plotted in a separate pane with manual interpretation.
Architecture differences:
Uses a shared library call for the regime decision, rather than re-implementing MACD logic locally.
Uses a single boolean output to drive marker color, rather than plotting histogram bars.
Uses fixed marker placement at the bottom of the chart for consistent visibility.
Practical effect:
You get a persistent “context layer” on price without dedicating a separate pane or reading histogram amplitude. The chart shows state, not magnitude.
How it works (technical)
1. The script imports `chervolino/CoreMACDHTF/2` and calls `core.is_hist_rising()` on each bar.
2. Inputs provide the source series, a preset string for MACD-style parameters, and a smoothing length used by the library function.
3. The library returns a boolean `rising` that represents whether the histogram is rising according to the library’s internal definition.
4. The script maps that boolean to a color: yellow when rising, blue otherwise.
5. A circle marker is plotted on every bar at the bottom of the chart, colored by the current regime state. Only the most recent five hundred bars are displayed to limit visual load.
Notes:
The exact internal calculation details of `core.is_hist_rising()` are not shown in this code. Any higher timeframe mechanics, security usage, or confirmation behavior are determined by the imported library. (Unknown)
Parameter Guide
Source — Selects the price series used by the library call — Default: close — Tips: Use close for consistency; alternate sources may shift regime changes.
Preset — Chooses parameter preset for the library’s MACD-style configuration — Default: 3,10,16 — Trade-offs: Faster presets tend to flip more often; slower presets tend to react later.
Smoothing Length — Controls smoothing used inside the library regime decision — Default: 21 — Bounds: minimum one — Trade-offs: Higher values typically reduce noise but can delay transitions. (Library behavior: Unknown)
Reading & Interpretation
Yellow markers indicate the library considers the histogram to be rising at that bar.
Blue markers indicate the library considers it not rising, which may include falling or flat conditions depending on the library definition. (Unknown)
Because markers repeat on every bar, focus on transitions from one color to the other as regime changes.
This tool is best read as context: it does not express strength, only direction of change as defined by the library.
Practical Workflows & Combinations
Trend following:
Use yellow as a condition to allow long-side entries and blue as a condition to allow short-side entries, then trigger entries with your primary setup such as structure breaks or pullback patterns. (Optional)
Exits and stops:
Consider tightening management after a color transition against your position direction, but do not treat a single flip as an exit signal without price-based confirmation. (Optional)
Multi-asset and multi-timeframe:
Keep `Source` consistent across assets.
Use the slower preset when instruments are noisy, and the faster preset when you need earlier context shifts. The best transferability depends on the imported library’s behavior. (Unknown)
Behavior, Constraints & Performance
Repaint and confirmation:
This script itself uses no forward-looking indexing and no explicit closed-bar gating. It evaluates on every bar update.
Any repaint or confirmation behavior may come from the imported library. If the library uses higher timeframe data, intrabar updates can change the state until the higher timeframe bar closes. (Unknown)
security and HTF:
Not visible here. The library name suggests HTF behavior, but the implementation is not shown. Treat this as potentially higher-timeframe-driven unless you confirm the library source. (Unknown)
Resources:
No loops, no arrays, no heavy objects. The plotting is one marker series with a five hundred bar display window.
Known limits:
This indicator does not convey histogram magnitude, divergence, or volatility context.
A binary regime can flip in choppy phases depending on preset and smoothing.
Sensible Defaults & Quick Tuning
Starting point:
Source: close
Preset: 3,10,16
Smoothing Length: 21
Tuning recipes:
Too many flips: choose the slower preset and increase smoothing length.
Too sluggish: choose the faster preset and reduce smoothing length.
Regime changes feel misaligned with your entries: keep the preset, switch the source back to close, and tune smoothing length in small steps.
What this indicator is—and isn’t
This is a minimal regime visualization and a context filter. It is not a complete trading system, not a risk model, and not a prediction engine. Use it together with price structure, execution rules, and position management. The regime definition depends on the imported library, so validate it against your market and timeframe before relying on it.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
MACD HTF Hardcoded
CHPY vs Semiconductor Sector Comparison//@version=5
indicator("CHPY vs Semiconductor Sector Comparison", overlay=false, timeframe="W")
// CHPY
chpy = request.security("CHPY", "W", close)
plot((chpy/chpy -1)*100, color=color.new(color.blue,0), title="CHPY")
// SOXX (Semiconductor Index ETF)
soxx = request.security("SOXX", "W", close)
plot((soxx/soxx -1)*100, color=color.new(color.red,0), title="SOXX")
// SMH (Semiconductor ETF)
smh = request.security("SMH", "W", close)
plot((smh/smh -1)*100, color=color.new(color.green,0), title="SMH")
// NVDA
nvda = request.security("NVDA", "W", close)
plot((nvda/nvda -1)*100, color=color.new(color.orange,0), title="NVDA")
// AVGO
avgo = request.security("AVGO", "W", close)
plot((avgo/avgo -1)*100, color=color.new(color.purple,0), title="AVGO")
Fibonacci Retrace + 50 EMA Hariss 369This indicator combines 3 concepts:
Fibonacci retracement zones
50 EMA trend filter
Price interaction with specific Fib zones to generate Buy/Sell signals
Let’s break everything down in simple language.
1. Fibonacci Retracement Logic
The script finds:
Most recent swing high
Most recent swing low
Using these two points, it draws Fibonacci levels:
Fibonacci Levels Used
Level Meaning Calculation
0% Swing Low recentLow
38.2% Light retracement high - (range × 0.382)
50% Mid retracement high - (range × 0.50)
61.8% Deep retracement high - (range × 0.618)
100% Swing High recentHigh
🔍 Why only these levels?
Because trading signals are generated based ONLY on:38.2%, 50%,61.8%
These 3 levels define the golden retracement zones.
2. Trend Filter — 50 EMA
A powerful rule:
Trend Up (bullish)
➡️ Price > 50 EMA
Trend Down (bearish)
➡️ Price < 50 EMA
This prevents signals against the main trend.
3. BUY Conditions (Retracement + EMA)
A BUY signal appears when:
Price is above the 50 EMA (trend is up)
Price retraces into the BUY ZONE:
🔵 BUY ZONE = between 50% and 38.2% Fibonacci i.e.,close >= Fib50 AND close <= Fib38.2
This means:
Market is trending up
Price corrected to a healthy retracement level
Buyers are stepping back in
📘 Why this zone?
This is a moderate retracement (not too shallow, not too deep).
Smart money often enters at 38.2%–50% in a strong trend.
📘 BUY Signal Appears With:
Green “BUY” label
Green arrow below the candle
4. SELL Conditions (Retracement + EMA)
A SELL signal appears when:
Price is below the 50 EMA (trend is down)
Price retraces upward into the SELL ZONE:
🔴 SELL ZONE = between 50% and 61.8% Fibonacci i.e.,close <= Fib50 AND close >= Fib61.8
This means:
Market is trending down
Price made a pullback
Sellers regain control in the golden zone
📘 Why this zone?
50–61.8 retracement is the ideal bearish pullback level.
📘 SELL Signal Appears With:
Red “SELL” label
Red arrow above the candle
5. STOP-LOSS (SL) RULES
For BUY trades,
Place SL below 61.8% level.SL = Fib 61.8%
OR
more safe:SL = swing low (Fib 0%)
For SELL trades
Place SL above 38.2% level.SL = Fib 38.2%
OR conservative:
SL = swing high (Fib 100%)
6. TAKE-PROFIT (TP) RULES
Based on common Fibonacci extensions.
BUY Trade TP Options
TP Level Meaning
TP1 Return to 38.2% Quick scalping target
TP2 Return to swing high Full trend target
TP3 Breakout above swing high Trend continuation
Practical suggestion:
TP1 = 1× risk
TP2 = 2× risk
TP3 = trailing stop
SELL Trade TP Options
TP Level Meaning
TP1 Return to 61.8% Moderate bounce
TP2 Return to swing low Trend target
TP3 Break below swing low Trend continuation
7. Recommended Trading Plan (Simple)
BUY PLAN
Price > 50 EMA (uptrend)
Enter at BUY signal in 38.2–50% zone
SL at 61.8%
TP at swing high or structure break
SELL PLAN
Price < 50 EMA (downtrend)
Enter at SELL signal in 50–61.8% zone
SL above 38.2%
TP at swing low
🟩 Summary (Very Easy to Remember)
🔵 BUY
Trend: above 50 EMA
Zone: between 50% and 38.2%
SL: below 61.8%
TP: swing high
🔴 SELL
Trend: below 50 EMA
Zone: between 50% and 61.8%
SL: above 38.2%
TP: swing low
4H RSI Buy/Sell BotBelow is a clean TradingView Pine Script v5 bot that analyzes the 4-hour timeframe and triggers alerts based on RSI (even though you mentioned RCI—if you actually need RCI, tell me and I’ll rewrite it)
able zone# able zone
## 📋 Overview
**able zone** is an advanced Support & Resistance zone detection indicator optimized for **15-minute timeframe trading**. It combines Price Action, Volume Profile, and intelligent zone analysis to identify high-probability trading areas with precise entry and exit points.
## 🎯 Core Features
### 1. **Zone Detection Methods**
- **Auto Detect**: Automatically finds the best zones using combined analysis
- **Price Action**: Based on pivot points and price structure
- **Volume Profile**: Identifies High Volume Nodes (HVN) where most trading occurred
- **Combined**: Uses all methods together for comprehensive analysis
### 2. **Zone Types & Colors**
- 🟢 **Support Zones** (Green): Price tends to bounce up from these areas
- 🔴 **Resistance Zones** (Red): Price tends to reverse down from these areas
- 🟣 **HVN Zones** (Purple): High volume areas from Volume Profile
- **Strong Zones**: Darker colors indicate zones with more touches (higher reliability)
### 3. **Zone Strength Indicators**
- **Labels**: "S3" = Support with 3 touches, "R5" = Resistance with 5 touches
- **Touch Count**: More touches = stronger zone
- **Min Touch Count Setting**: Adjust to filter weak zones (default: 3)
## ⚙️ Settings Guide
### **Zone Detection Settings**
- **Detection Method**: Choose your preferred analysis method
- **Lookback Period** (50-500): How many bars to analyze (default: 200)
- For 15min: 200 bars = ~50 hours of data
- Shorter = Recent zones only
- Longer = Historical zones included
- **Min Touch Count** (2-10): Minimum touches to qualify as a zone (default: 3)
- **Zone Thickness %** (0.1-2.0): How thick the zones appear (default: 0.5)
- Based on ATR for dynamic sizing on 15min chart
### **Zone Colors**
Fully customizable colors for:
- Support Zone (default: Green)
- Resistance Zone (default: Red)
- Strong Support/Resistance (darker shades)
- Volume Profile Zone (default: Purple)
### **Zone Touch Detection**
- **Enable Touch Alerts**: Get notifications when price enters zones
- **Touch Distance %** (0.1-1.0): How close to zone counts as "touch" (default: 0.3%)
- On 15min chart, this gives early warning signals
- **Show Touch Markers**: Visual indicators when price touches zones
- 🔺 = Support touch (potential buy)
- 🔻 = Resistance touch (potential sell)
- 💎 = HVN touch (watch for breakout/rejection)
### **Volume Profile Integration**
- **Show VP Zones**: Display high volume node zones
- **VP Resolution** (20-50): Number of price levels analyzed (default: 30)
- **POC Line** (orange): Point of Control - highest volume price level
- **POC Width**: Line thickness (1-3)
- **Show HVN**: Display High Volume Node zones
- **HVN Threshold** (0.5-0.9): Volume % to qualify as HVN (default: 0.7)
### **Display Options**
- **Zone Labels**: Show S/R labels with touch count
- **Zone Border Lines**: Dotted lines at zone boundaries
- **Extend Zones Right**: Project zones into future
- **Max Visible Zones** (5-50): Maximum number of zones displayed (default: 20)
- Adjust based on chart clarity needs
- **Info Table**: Real-time information dashboard
## 📊 Info Table Explained
The info table (top-right corner) provides real-time zone analysis:
### **Row 1: ZONE Header**
- Shows current timeframe (15m)
- Total active zones
- "able" branding
### **Row 2: 🎯 TOUCH Status**
- **RES**: Currently touching resistance (⚠️ potential reversal down)
- **SUP**: Currently touching support (🚀 potential bounce up)
- **HVN**: Currently in high volume area (⚡ watch for direction)
- **FREE**: Not near any zone (⏳ wait for setup)
- Progress bar shows proximity strength
- Arrows indicate zone type
### **Row 3: 🟢 SUP - Support Zones**
- Number of active support zones below current price
- Progress bar shows relative quantity
- More support = stronger floor
### **Row 4: 🔴 RES - Resistance Zones**
- Number of active resistance zones above current price
- Progress bar shows relative quantity
- More resistance = stronger ceiling
### **Row 5: 🟣 HVN - High Volume Nodes**
- Number of HVN zones (from Volume Profile)
- These are areas where most trading activity occurred
- Often act as magnets for price
### **Row 6: 📍 NEAR - Nearest Zone**
- Shows closest zone type (SUP/RES/HVN)
- Distance in % to nearest zone
- Arrow shows if zone is above or below
### **Row 7: POSITION - Price Position**
- **HIGH**: Price near range top (70%+) - watch for resistance
- **MID**: Price in middle range (30-70%) - neutral zone
- **LOW**: Price near range bottom (<30%) - watch for support
- Shows exact position % in lookback range
### **Row 8: ═ SIGNAL ═**
- **🚀 BUY**: Touching support zone (entry opportunity)
- **⚠️ SELL**: Touching resistance zone (exit/short opportunity)
- **⚡ WATCH**: At HVN (prepare for breakout or rejection)
- **⏳ WAIT**: No clear setup (be patient)
## 🎓 Trading Strategy for 15-Minute Timeframe
### **Basic Setup**
1. Set timeframe to **15 minutes**
2. Use **Auto Detect** or **Combined** method
3. Set **Lookback Period**: 200 bars (~50 hours)
4. Set **Min Touch Count**: 3 (proven zones)
### **Entry Signals**
#### **Long Entry (Buy)**
- Price touches green support zone
- Table shows "🚀 BUY" signal
- Look for bullish candle pattern (hammer, engulfing)
- Volume increases on bounce
- **Best Entry**: Bottom of support zone
- **Stop Loss**: Below support zone (1-2 ATR)
- **Target**: Next resistance zone or 2:1 RR
#### **Short Entry (Sell)**
- Price touches red resistance zone
- Table shows "⚠️ SELL" signal
- Look for bearish candle pattern (shooting star, engulfing)
- Volume increases on rejection
- **Best Entry**: Top of resistance zone
- **Stop Loss**: Above resistance zone (1-2 ATR)
- **Target**: Next support zone or 2:1 RR
#### **HVN Breakout Strategy**
- Price approaches purple HVN zone
- Table shows "⚡ WATCH"
- Wait for breakout with strong volume
- **If breaks up**: Go long, target next resistance
- **If breaks down**: Go short, target next support
### **Zone Strength Rules**
- **S5+ or R5+**: Very strong zones (high probability)
- **S3-S4 or R3-R4**: Reliable zones (good setups)
- **S2 or R2**: Weak zones (use caution)
### **Best Trading Times (15min)**
- **London Open**: 08:00-12:00 GMT (high volume)
- **NY Open**: 13:00-17:00 GMT (high volatility)
- **Overlap**: 13:00-16:00 GMT (best setups)
- **Avoid**: Asian session low volatility periods
### **Risk Management**
- Never risk more than 1-2% per trade
- Use stop loss ALWAYS (place outside zones)
- Take partial profits at 1:1, let rest run to 2:1 or 3:1
- If price consolidates in zone > 3 candles, exit
## ⚠️ Important Notes
### **When Zones Work Best**
✅ Clear trending markets
✅ After significant price movements
✅ At session opens (London/NY)
✅ When multiple zones align
✅ Strong zone with 5+ touches
### **When to Be Cautious**
❌ During major news releases (use economic calendar)
❌ Very low volume periods
❌ Price consolidating inside zone
❌ Weak zones with only 2 touches
❌ Conflicting signals from multiple indicators
### **15-Minute Specific Tips**
- **Lookback 200**: Captures 2-3 trading days of zones
- **Touch Distance 0.3%**: Early signals on 15min moves
- **Max Zones 20**: Keeps chart clean but comprehensive
- **Watch POC**: Often acts as pivot on 15min
- **Volume spike + zone touch** = high probability setup
## 🔧 Recommended Settings for 15min
### **Conservative Trader**
- Detection Method: Combined
- Min Touch Count: 4
- Max Zones: 15
- Touch Distance: 0.2%
### **Aggressive Trader**
- Detection Method: Auto Detect
- Min Touch Count: 2
- Max Zones: 25
- Touch Distance: 0.5%
### **Volume Profile Focused**
- Detection Method: Volume Profile
- Show HVN: Yes
- HVN Threshold: 0.6
- Show POC: Yes
## 📈 Example Trade Scenario (15min)
**Setup**: BTC/USD on 15-minute chart
1. Price approaching green support zone at $42,000
2. Zone label shows "S4" (touched 4 times)
3. Table shows "🚀 BUY" signal
4. Volume increasing on approach
5. Bullish hammer candle forms
**Entry**: $42,050 (bottom of zone)
**Stop Loss**: $41,900 (below zone)
**Target 1**: $42,350 (2:1 RR)
**Target 2**: Next resistance at $42,650
**Result**: Price bounces, hits Target 1 in 3 candles (~45min)
## 💡 Pro Tips
1. **Combine with trend**: Trade in direction of higher timeframe trend
2. **Multiple touches**: Zones with 5+ touches are highest probability
3. **Volume confirmation**: Always check volume on zone touch
4. **POC magnet**: Price often returns to POC line
5. **False breakouts**: If price barely breaks zone and returns = strong signal
6. **Zone-to-zone**: Trade from support to resistance, resistance to support
7. **Time of day**: Best setups occur during peak volume hours
8. **Chart timeframe**: Use 1H to confirm trend, 15min for entry
9. **News avoidance**: Close trades before high-impact news
10. **Zone clusters**: Multiple zones together = strong area
---
**Created by able** | Optimized for 15-minute trading
**Version**: 1.0 | Compatible with TradingView Pine Script v5
For support and updates, enable alerts and monitor the info table in real-time!
CoreMACDHTF [CHE]Library "CoreMACDHTF"
calc_macd_htf(src, preset_str, smooth_len)
Parameters:
src (float)
preset_str (simple string)
smooth_len (int)
is_hist_rising(src, preset_str, smooth_len)
Parameters:
src (float)
preset_str (simple string)
smooth_len (int)
hist_rising_01(src, preset_str, smooth_len)
Parameters:
src (float)
preset_str (simple string)
smooth_len (int)
CoreMACDHTF — Hardcoded HTF MACD Presets with Smoothed Histogram Regime Flags
Summary
CoreMACDHTF provides a reusable MACD engine that approximates higher-timeframe behavior by selecting hardcoded EMA lengths based on the current chart timeframe, then optionally smoothing the resulting histogram with a stateful filter. It is published as a Pine v6 library but intentionally includes a minimal demo plot so you can validate behavior directly on a chart. The primary exported outputs are MACD, signal, a smoothed histogram, and the resolved lengths plus a timeframe tag. In addition, it exposes a histogram rising condition so importing scripts can reuse the same regime logic instead of re-implementing it.
Motivation: Why this design?
Classic MACD settings are often tuned to one timeframe. When you apply the same parameters to very different chart intervals, the histogram can become either too noisy or too sluggish. This script addresses that by using a fixed mapping from the chart timeframe into a precomputed set of EMA lengths, aiming for more consistent “tempo” across intervals. A second problem is histogram micro-chop around turning points; the included smoother reduces short-run flips so regime-style conditions can be more stable for alerts and filters.
What’s different vs. standard approaches?
Reference baseline: a standard MACD using fixed fast, slow, and signal lengths on the current chart timeframe.
Architecture differences:
Automatic timeframe bucketing that selects a hardcoded length set for the chosen preset.
Two preset families: one labeled A with lengths three, ten, sixteen; one labeled B with lengths twelve, twenty-six, nine.
A custom, stateful histogram smoother intended to damp noisy transitions.
Library exports that return both signals and metadata, plus a dedicated “histogram rising” boolean.
Practical effect:
The MACD lengths change when the chart timeframe changes, so the oscillator’s responsiveness is not constant across intervals by design.
The rising-flag logic is based on the smoothed histogram, which typically reduces single-bar flip noise compared to using the raw histogram directly.
How it works (technical)
1. The script reads the chart timeframe and converts it into milliseconds using built-in timeframe helpers.
2. It assigns the timeframe into a bucket label, such as an intraday bucket or a daily-and-above bucket, using fixed thresholds.
3. It resolves a hardcoded fast, slow, and signal length triplet based on:
The selected preset family.
The bucket label.
In some cases, the current minute multiplier for finer mapping.
4. It computes fast and slow EMAs on the selected source and subtracts them to obtain MACD, then computes an EMA of MACD for the signal line.
5. The histogram is derived from the difference between MACD and signal, then passed through a custom smoother.
6. The smoother uses persistent internal state to carry forward its intermediate values from bar to bar. This is intentional and means the smoothing output depends on contiguous bar history.
7. The histogram rising flag compares the current smoothed histogram to its prior value. On the first comparable bar it defaults to “rising” to avoid a missing prior reference.
8. Exports:
A function that returns MACD, signal, smoothed histogram, the resolved lengths, and a text tag.
A function that returns the boolean rising state.
A function that returns a numeric one-or-zero series for direct plotting or downstream numeric logic.
HTF note: this is not a true higher-timeframe request. It does not fetch higher-timeframe candles. It approximates HTF feel by selecting different lengths on the current timeframe.
Parameter Guide
Source — Input price series used for EMA calculations — Default close — Trade-offs/Tips
Preset — Selects the hardcoded mapping family — Default preset A — Preset A is more reactive than preset B in typical use
Table Position — Anchor for an information table — Default top right — Present but not wired in the provided code (Unknown/Optional)
Table Size — Text size for the information table — Default normal — Present but not wired in the provided code (Unknown/Optional)
Dark Mode — Theme toggle for the table — Default enabled — Present but not wired in the provided code (Unknown/Optional)
Show Table — Visibility toggle for the table — Default enabled — Present but not wired in the provided code (Unknown/Optional)
Zero dead-band (epsilon) — Intended neutral band around zero for regime classification — Default zero — Present but not used in the provided code (Unknown/Optional)
Acceptance bars (n) — Intended debounce count for regime confirmation — Default three — Present but not used in the provided code (Unknown/Optional)
Smoothing length — Length controlling the histogram smoother’s responsiveness — Default nine — Smaller values react faster but can reintroduce flip noise
Reading & Interpretation
Smoothed histogram: use it as the momentum core. A positive value implies MACD is above signal, a negative value implies the opposite.
Histogram rising flag:
True means the smoothed histogram increased compared to the prior bar.
False means it did not increase compared to the prior bar.
Demo plot:
The included plot outputs one when rising is true and zero otherwise. It is a diagnostic-style signal line, not a scaled oscillator display.
Practical Workflows & Combinations
Trend following:
Use rising as a momentum confirmation filter after structural direction is established by higher highs and higher lows, or lower highs and lower lows.
Combine with a simple trend filter such as a higher-timeframe moving average from your main script (Unknown/Optional).
Exits and risk management:
If you use rising to stay in trends, consider exiting or reducing exposure when rising turns false for multiple consecutive bars rather than reacting to a single flip.
If you build alerts, evaluate on closed bars to avoid intra-bar flicker in live candles.
Multi-asset and multi-timeframe:
Because the mapping is hardcoded, validate on each asset class you trade. Volatility regimes differ and the perceived “equivalence” across timeframes is not guaranteed.
For consistent behavior, keep the smoothing length aligned across assets and adjust only when flip frequency becomes problematic.
Behavior, Constraints & Performance
Repaint and confirmation:
There is no forward-looking indexing. The logic uses current and prior values only.
Live-bar values can change until the bar closes, so rising can flicker intra-bar if you evaluate it in real time.
security and HTF:
No higher-timeframe candle requests are used. Length mapping is internal and deterministic per chart timeframe.
Resources:
No loops and no arrays in the core calculation path.
The smoother maintains persistent state, which is lightweight but means results depend on uninterrupted history.
Known limits:
Length mappings are fixed. If your chart timeframe is unusual, the bucket choice may not represent what you expect.
Several table and regime-related inputs are declared but not used in the provided code (Unknown/Optional).
The smoother is stateful; resetting chart history or changing symbol can alter early bars until state settles.
Sensible Defaults & Quick Tuning
S tarting point:
Preset A
Smoothing length nine
Source close
Tuning recipes:
Too many flips: increase smoothing length and evaluate rising only on closed bars.
Too sluggish: reduce smoothing length, but expect more short-run reversals.
Different timeframe feel after switching intervals: keep preset fixed and adjust smoothing length first before changing preset.
Want a clean plot signal: use the exported numeric rising series and apply your own display rules in the importing script.
What this indicator is—and isn’t
This is a momentum and regime utility layer built around a MACD-style backbone with hardcoded timeframe-dependent parameters and an optional smoother. It is not a complete trading system, not a risk model, and not predictive. Use it in context with market structure, execution rules, and risk controls.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
1 PM IST MarkerThis lightweight Pine Script indicator automatically marks 1:00 PM IST on intraday charts, regardless of the chart’s timezone. It extracts the date from each bar and generates a precise timestamp for 13:00 in the Asia/Kolkata timezone. When a bar matches this time, the script draws a vertical red line across the chart and adds a small label for easy visual reference.
The tool is useful for traders who track mid-session behavior, monitor liquidity shifts, or analyze post-lunch volatility patterns in Indian markets. It works on all intraday timeframes and require
RSI + Psy + ADXRSI + Psychological Line + ADX (with RCI-replacement logic)
This custom TradingView indicator combines three major technical analysis tools—RSI, Psychological Line (Psy), and ADX—to help traders identify trend strength, market momentum, and overbought/oversold conditions with improved clarity.
1. Multi-Period RSI
The indicator calculates three RSI values:
Short-term RSI (9)
Mid-term RSI (26)
Long-term RSI (52)
These help users observe short-, mid-, and long-term momentum simultaneously.
Threshold lines are drawn at 70, 50, and 30 for standard RSI overbought/oversold analysis.
2. Psychological Line (Psy) with Dynamic Column Display
The Psy indicator counts how many closes within the selected period (default: 12) were higher than the previous close.
Values above 75 indicate overbought markets.
Values below 25 indicate oversold markets.
When Psy crosses these thresholds, it is displayed as a column chart centered at 50, visually expanding upward (overbought) or downward (oversold).
3. ADX Trend Strength with Color Coding
ADX is calculated from DI+ and DI− values (using true range and directional movement).
The ADX line changes color based on trend strength:
Blue: Weak trend (below 20)
Yellow: Moderate trend (20–30)
Red: Strong trend (above 30)
This helps traders easily recognize when the market transitions from low-volatility to strong-trend conditions.
NIFTY, SENSEX AND BANKNIFTY Options Expiry MarkerNSE Options Expiry Background Marker
Category: Date/Time Indicators
Timeframe: Daily
Markets: NSE (India) / Any Exchange
Description
Automatically highlights weekly and monthly options expiry days for NIFTY, BANKNIFTY, and SENSEX using color-coded background shading. Works across entire chart history with customizable transparency levels.
Key Features
✅ Background Highlighting - Non-intrusive color shading on expiry days
✅ Multi-Index Support - NIFTY, BANKNIFTY, and SENSEX simultaneously
✅ Weekly & Monthly Expiry - Different transparency levels for easy distinction
✅ Customizable Expiry Days - Set any weekday (Mon-Fri) as expiry day
✅ Adjustable Transparency - Separate controls for weekly and monthly expiries
✅ Full Historical Data - Works on all visible bars across years
✅ Smart Monthly Detection - Automatically identifies last occurrence in month
✅ Color Coded - Blue (NIFTY), Red (BANKNIFTY), Green (SENSEX)
Use Cases
Options trading strategy planning
Identify expiry day volatility patterns
Visual reference for monthly vs weekly cycles
Backtest strategies around expiry days
Track multiple index expiries on single chart
Technical Details
Uses India timezone (GMT+5:30) for accurate date calculations
Handles leap years automatically
Smart algorithm identifies last weekday occurrence per month
Works seamlessly on any chart timeframe (optimized for Daily)
No performance impact - simple background coloring
Adaptive MACD PROAdaptive MACD PRO
Highlights structural momentum changes using dynamic normalization of MACD and Signal.
Phase Momentum Core
Adds directional confirmation based on short-term phase behavior.
Visual Output
• MACD & Signal lines with trend-based coloring
• Adaptive histogram reflecting momentum strength
• Fixed-position Buy/Sell dots at predefined levels
• AutoCalib dots on MACD_z threshold crossings
• Optional HUD panel displaying calibration levels and MACD_z
Features
• Selectable MA types (EMA, SMA, KAMA)
• Z-score normalization
• ATR-based volatility weighting
• Higher timeframe alignment
• Auto-calibration with SAFE / AGGRESSIVE modes
• Unified long/short triggers
• Full bar-coloring control
• Works on all assets and timeframes
The full source code is visible and may be modified or extended.
This script is intended for technical analysis and research only.
This indicator is published as a free, open-source script with full visible code.






















