$ - HTF Sweeps & PO3HTF Sweeps & PO3 Indicator
The HTF Sweeps & PO3 indicator is a powerful tool designed for traders to visualise higher timeframe (HTF) candles, identify liquidity sweeps, and track key price levels on a lower timeframe (LTF) chart. Built for TradingView using Pine Script v6, it overlays HTF candle data and highlights significant price movements, such as sweeps of previous highs or lows, to help traders identify potential liquidity sweep and reversal points. The indicator is highly customisable, offering a range of visual and alert options to suit various trading strategies.
Features
Higher Timeframe (HTF) Candle Visualisation:
- Displays up to three user-defined HTF candles (e.g., 15m, 1H, 4H) overlaid on the LTF chart.
- Customisable candle appearance with adjustable size (Tiny to Huge), offset, spacing, and colours for bullish/bearish candles and wicks.
- Option to show timeframe labels above or below HTF candles with configurable size and position.
Liquidity Sweep Detection:
- Identifies bullish and bearish sweeps when price moves beyond the high or low of a previous HTF candle and meets specific conditions.
- Displays sweeps on both LTF and HTF with customisable line styles (Solid, Dashed, Dotted), widths, and colours.
- Option to show only the most recent sweep per candle to reduce chart clutter.
Invalidated Sweep Tracking:
- Detects and visualises invalidated sweeps (when price moves past a sweep level in the opposite direction).
- Configurable display for invalidated sweeps on LTF and HTF with distinct line styles and colours.
Previous High/Low Lines:
- Plots horizontal lines at the high and low of the previous HTF candle, extending on both LTF and HTF.
- Customisable line style, width, and color for easy identification of key levels.
- Real-Time Sweep Detection:
-Optional real-time sweep visualisation for active candles, enabling traders to monitor developing price action.
Alert System:
- Triggers alerts for sweep formation (when a new sweep is detected).
- Triggers alerts for sweep invalidation (when a sweep is no longer valid).
- Alerts include details such as timeframe, ticker, and price level for precise notifications.
Performance Optimisation:
- Efficiently manages resources with configurable limits for lines, labels, boxes, and bars (up to 500 each).
- Cleans up outdated visual elements to maintain chart clarity.
Flexible Configuration:
- Supports multiple timeframes for HTF candles with user-defined settings for visibility and number of candles displayed (1–60).
- Toggle visibility for HTF candles, sweeps, invalidated sweeps, and high/low lines independently for LTF and HTF.
This indicator is ideal for traders focusing on liquidity hunting, order block analysis, or price action strategies, providing clear visual cues and alerts to enhance decision-making.
Candlestick analysis
Katz Candle Momentum Reversal Indicator v4.1Katz Candle Momentum Reversal Indicator (CMRI) v4.1
Overview
The Katz CMRI is a comprehensive trading indicator designed to identify trend direction, momentum shifts, and potential market reversals. It combines several different concepts into a single, cohesive visual tool.
At its core, the indicator uses a custom Line Break chart calculation to filter out market noise and a Heikin-Ashi-style formula to smooth price action. This combination helps to more clearly define the underlying trend. The main output is a dynamic, multi-colored trend line accompanied by various signals that appear directly on your chart. It's designed to help traders stay with the trend while also spotting key moments of expansion, contraction, and potential reversal.
How to Interpret the Indicator
The indicator has several key visual components:
Main Trend Line: This is the thick, central line that changes color.
Green: Indicates a bullish (upward) trend.
Red: Indicates a bearish (downward) trend.
Faded/Light Colors: Suggest a potential loss of momentum or a pullback within the trend.
White: Signals a significant break in the trend structure.
Trend Cloud: The shaded area between the main trend line and the white midline (mid). A green cloud shows the trend is above the midpoint, while a red cloud shows it's below.
Upper/Lower Bands: The aqua (Trend Up) and yellow (Trend Down) lines represent the recent highs and lows of the established trend. When price is pushing against these bands, it signals trend strength.
Background Colors:
Gray: A "Contraction Zone." This indicates that the trend is losing momentum and consolidating, warning of potential chop or a reversal.
Blue: An "Expansion Event." This highlights a sudden increase in momentum in the direction of the trend.
Signal Shapes:
Diamonds: These are the primary entry signals. A green diamond below a candle signals a potential long entry, while a red diamond above a candle signals a potential short entry.
⬆️⬇️ Arrows: These are secondary momentum signals. They can be used as confirmation that the trend is continuing.
Trading Strategy & Rules
This strategy uses the primary diamond signals for entries and trend changes for exits.
Long Trade (Buy) Rules
Entry: Wait for a green diamond to appear below the price candles. For confirmation, the main trend line should turn solid green, and the price should ideally be above the white midline.
Exit:
Stop Loss: Place a stop loss below the recent swing low or below the candle where the green diamond appeared.
Take Profit: Consider exiting the trade when a red diamond appears above the candles, signaling a potential trend reversal. Alternatively, a trader might exit if the background turns gray (Contraction Zone), indicating the bullish momentum has faded.
Short Trade (Sell) Rules
Entry: Wait for a red diamond to appear above the price candles. For confirmation, the main trend line should turn solid red, and the price should ideally be below the white midline.
Exit:
Stop Loss: Place a stop loss above the recent swing high or above the candle where the red diamond appeared.
Take Profit: Consider exiting the trade when a green diamond appears below the candles. A gray "Contraction Zone" can also serve as an early warning to exit as bearish momentum wanes.
Indicator Filters Explained
The indicator includes a "Trend Filter Type" setting that allows you to adjust its sensitivity. This can help reduce false signals in choppy markets.
Raw: This is the most sensitive setting. It will generate a trend change signal as soon as the basic conditions are met. Use this for scalping or in strongly trending markets, but be aware that it may produce more false signals.
OutStep: This is the default, balanced setting. It adds an extra layer of confirmation by requiring the main trend line itself to be moving in the direction of the new trend. For example, a new green signal will only be confirmed if the trend line's value is higher than its previous value. This helps filter out weak signals.
FullStep: This is the most conservative and filtered setting. It includes the "OutStep" logic and adds further conditions related to the upper and lower trend bands. This setting will produce the fewest signals, but they are generally the highest quality, making it suitable for swing trading or avoiding choppy market conditions.
Disclaimer
This indicator is a tool for technical analysis and should not be considered financial advice. All trading involves substantial risk, including the possible loss of principal. Past performance is not indicative of future results. The signals generated by this indicator are for educational and informational purposes only. You are solely responsible for any trading decisions you make. Use this indicator at your own risk.
Apex Edge – HTF Overlay Candles“Trade your 5m chart with the eyes of the 1H — Apex Edge brings higher-timeframe structure and liquidity sweeps directly onto your execution chart.”
Apex Edge – HTF Overlay Candles
The Apex Edge – HTF Overlay Candles indicator overlays higher-timeframe (HTF) candles directly onto your lower-timeframe chart. Instead of flipping between timeframes, you see HTF structure “breathe” live on your execution chart.
What It Does
• HTF Body Boxes → open/close zones drawn as semi-transparent rectangles.
• HTF Wick Boxes → high/low extremes projected as envelopes around each body.
• Midpoint Line → a dynamic equilibrium line that flips bias as price trades above or below.
• Sweep Arrows → one-time markers showing the first liquidity raid at HTF highs or lows.
Under the Hood
This isn’t just a visual overlay — it’s engineered for accuracy and performance in PineScript.
1. HTF Data Retrieval
• Uses request.security() to import open, high, low, close, time from any selected HTF.
• lookahead=barmerge.lookahead_off ensures OHLC values update bar by bar as the HTF
candle builds.
• When the HTF bar closes, boxes and midpoint lock to historical values — matching the
native HTF chart exactly.
2. Box Construction
• Body box: built from HTF open → close.
• Wick box: built from HTF high → low.
• Boxes extend dynamically across each HTF period, updating in real time, then freeze at
close.
3. Midpoint Logic
• (htfOpen + htfClose) / 2 calculates intrabar midpoint.
• Line drawn edge-to-edge across the active HTF body.
• Style, width, color, and opacity are user-controlled.
4. Sweep Detection
• Flags (sweepedHigh / sweepedLow) prevent clutter: only the first tap per side per HTF
candle is marked.
• Lower-timeframe price breaking the HTF high/low triggers the sweep arrow.
• Arrows are offset above/below wick envelopes for clean visuals.
5. Customisation
• Every layer (body, wick, midpoint, arrows) has independent color + opacity settings.
• Arrow size, arrow color, and transparency are adjustable.
• Default HTF = 1H (perfect for 5m/15m traders) but can be switched to 30m, 4H, Daily,
etc.
Why It’s Useful
• HTF intent + LTF execution without chart hopping.
• Liquidity mapping: see where liquidity is swept in real time.
• Bias clarity: midpoint line defines HTF equilibrium.
• Clean signals: only the first sweep prints — no spam.
What Makes It Different
Most MTF overlays just plot candles or single lines. This tool:
• Splits body vs wick zones for institutional precision.
• Updates live intrabar (no repainting).
• Highlights liquidity sweeps clearly.
• Built for readability and professional use — not another retail signal toy.
Cheat-Sheet Playbook
1️⃣ Structure Bias
• Above midpoint line = bullish intent.
• Below midpoint line = bearish intent.
• Chop around midpoint = no clear direction.
2️⃣ Liquidity Sweeps
• ▲ Green up arrow below wick box = sell-side liquidity taken → watch for longs.
• ▼ Red down arrow above wick box = buy-side liquidity taken → watch for shorts.
• First sweep is the cleanest.
3️⃣ Trade Logic
• Body box = where institutions transact.
• Wick box = liquidity traps.
• Midpoint = bias filter.
• Best setups occur when sweep + midpoint flip align.
4️⃣ Example (5m + 1H Overlay)
1. ▲ Green up arrow prints below HTF wick.
2. Price reclaims the body box.
3. Midpoint flips to support.
4. Enter long → stop below sweep → targets = midpoint first, opposite wick second.
In short:
• Boxes = structure
• Wicks = liquidity pools
• Midpoint = bias line
• Arrows = liquidity sweeps
This is your SMC edge on one chart — HTF structure and liquidity fused directly into your execution timeframe.
Alerta 10 Velas Consecutivas (Bull/Bear)despues de 10 velas alcista o bajitas probabilidad que haga reversion
Algo MA💎 (V.4.3)Algo MA💎 V.4.3 - Multi-EMA System with Advanced Candle Analysis
**Algo MA💎 V.4.3** is a comprehensive trend analysis system that combines multiple EMA configurations with advanced candle coloring, support/resistance detection, and integrated trade management dashboards. This indicator provides a complete visual trading environment with sophisticated trend identification and portfolio tracking capabilities.
**Core Innovation & Originality**
This system uniquely integrates seven distinct analytical components:
1. **Dual-EMA Signal Engine** - Primary trend detection using 9/21 EMA crossovers with customizable sensitivity
2. **Advanced Candle Classification** - Multi-layer candle coloring with two sensitivity levels (violet/rose) based on ATR calculations
3. **Trend Confirmation System** - Secondary 20/50 EMA trend filter with dynamic cloud visualization
4. **Zero Lag EMA Implementation** - 144-period Zero Lag EMA with directional color coding for reduced lag trend analysis
5. **RSI Extreme Detection** - Overbought (75) and oversold (25) level identification with visual markers
6. **Dynamic Support/Resistance** - Pivot-based support and resistance level calculation with 50-bar lookback
7. **Integrated Trade Management** - Three customizable dashboard tables for real-time portfolio tracking
**System Architecture & Functionality**
**Primary Signal Generation:**
The core system uses a 9-period EMA and 21-period EMA comparison to generate directional bias. When EMA9 > EMA21, the system indicates bullish conditions; when EMA9 < EMA21, it signals bearish conditions. This creates the foundation for all visual elements and trend analysis.
**Advanced Candle Coloring Logic:**
The system employs a sophisticated three-layer candle coloring approach:
- **Green Candles**: EMA9 > EMA21 (bullish trend)
- **Red Candles**: EMA9 < EMA21 (bearish trend)
- **Violet Candles**: EMAs within sensitivity_violet * ATR(14) range (consolidation)
- **Rose Candles**: EMAs within sensitivity_rose * ATR(14) range (tight consolidation)
**Sensitivity-Based Classification:**
Two independent sensitivity parameters allow fine-tuning of consolidation detection:
- **Violet Sensitivity (0.3 default)**: Broader consolidation zones
- **Rose Sensitivity (0.1 default)**: Tighter consolidation zones
**Zero Lag EMA Implementation:**
Uses advanced calculation: `zlema = ema(src + src - src , length)` where lag = floor((length-1)/2). This reduces the inherent lag of traditional EMAs while maintaining smoothness.
**Trend Confirmation Framework:**
The 20/50 EMA system provides trend context with visual cloud fills:
- **Blue Cloud**: 20 EMA > 50 EMA (bullish trend environment)
- **Red Cloud**: 20 EMA < 50 EMA (bearish trend environment)
**Unique Visual Features**
**Multi-Layer Candle System:**
The indicator plots up to four candle layers simultaneously:
1. **Base Candles**: Primary EMA-based trend colors
2. **Violet Consolidation**: ATR-adjusted consolidation detection
3. **Rose Consolidation**: Tighter consolidation identification
4. **Bearish Overlay**: Optional bearish candle highlighting
**Support/Resistance Detection:**
Uses pivot point calculations with 50-bar left and right parameters:
- **Green Lines**: Resistance levels from pivot highs
- **Red Lines**: Support levels from pivot lows
- **Dynamic Updates**: Lines adjust based on price action
**RSI Extreme Markers:**
- **Red Triangles**: First occurrence of RSI > 75 (overbought)
- **Green Triangles**: First occurrence of RSI < 25 (oversold)
**Integrated Dashboard System**
**Trade Management Tables:**
Three independent dashboard tables provide comprehensive trade tracking:
- **Stock Information**: Ticker symbol and trade direction (BUY/SELL)
- **Order Details**: Entry price, stop loss, and take profit levels
- **Position Status**: Real-time trade monitoring with color-coded status
**Dashboard Customization:**
- **Positioning**: Bottom-right, bottom-center, bottom-left placement options
- **Color Coding**: Green for BUY positions, red for SELL positions
- **Manual Entry**: User-customizable fields for trade parameters
**Volume Analysis Integration**
**Volume Oscillator:**
Implements short (5) and long (10) EMA volume comparison:
`osc = 100 * (short_volume_ema - long_volume_ema) / long_volume_ema`
This provides additional confirmation for trend strength and potential reversals.
**Usage Instructions**
**Trend Identification:**
- **Primary Trend**: Monitor 9/21 EMA relationship and candle colors
- **Trend Strength**: Observe Zero Lag EMA color (green=bullish, red=bearish)
- **Trend Context**: Use 20/50 EMA cloud for higher timeframe bias
**Entry Signal Recognition:**
- **Bullish Setup**: Green candles + blue trend cloud + support level test
- **Bearish Setup**: Red candles + red trend cloud + resistance level test
- **Consolidation**: Violet/rose candles indicate ranging conditions
**Risk Management Application:**
- **Support/Resistance**: Use pivot levels for stop placement and targets
- **RSI Extremes**: Monitor overbought/oversold conditions for reversal potential
- **Dashboard Tracking**: Utilize tables for position management
**Advanced Analysis:**
- **Sensitivity Adjustment**: Modify violet/rose parameters for market volatility
- **Multi-Timeframe**: Apply system across different timeframes for confluence
- **Volume Confirmation**: Use volume oscillator for signal validation
**Customization Options**
**EMA Parameters:**
- **Main Flow EMAs**: Adjustable 9/21 period settings
- **Trend EMAs**: Customizable 20/50 period configuration
- **Zero Lag EMA**: Modifiable 144-period length
**Visual Settings:**
- **Candle Display**: Toggle bearish candle overlay
- **Trend Visualization**: Show/hide trend cloud and EMAs
- **Support/Resistance**: Enable/disable pivot level display
- **RSI Markers**: Control overbought/oversold triangle display
**Dashboard Configuration:**
- **Table Display**: Independent control for three dashboard tables
- **Trade Details**: Customizable entry, stop, and target fields
- **Position Status**: Manual BUY/SELL/neutral designation
**Alert System**
Built-in alert conditions for:
- **Bullish Signal**: EMA9 crosses above EMA21
- **Bearish Signal**: EMA9 crosses below EMA21
**Important Considerations**
This system works optimally in trending markets with clear directional bias. During consolidation periods, focus on violet/rose candle identification and range-bound strategies. The multiple EMA layers provide comprehensive trend analysis but may generate conflicting signals during choppy conditions.
The dashboard tables serve as trade management tools but require manual input for position tracking. The system combines established EMA techniques with original sensitivity-based consolidation detection and advanced visual presentation methods.
**Disclaimer**: This indicator is designed for educational and analytical purposes. The dashboard tables are for position tracking only and do not execute trades automatically. Past performance does not guarantee future results. Always implement proper risk management and consider multiple confirmation methods before making trading decisions.
LW Outside Day Flip【SpeculationLab】Applicable Timeframe
⚠️ Note: This indicator is primarily designed for the Daily timeframe.
Larry Williams’ original discussion and statistics were based on daily data. While it can technically be applied to other timeframes, results may vary. It is strongly recommended to use it on daily charts.
Overview
This indicator marks a classic “Outside Day + Extreme Close” price action pattern. The idea comes from Larry Williams’ Long-Term Secrets to Short-Term Trading (2nd edition, Chapter 7).
The indicator does not execute trades or generate alerts — it simply plots visual markers on the chart when the pattern conditions are met, to assist research and review.
Logic
Outside Bar Condition
Current high > previous high
Current low < previous low
Extreme Close Filter
Long signal: Close < previous low
Short signal: Close > previous high
Confirmation
Signals are only confirmed at bar close (barstate.isconfirmed), to avoid repainting during intrabar movement.
Chart Display
When a long signal is triggered, a green downward triangle is plotted above the bar.
When a short signal is triggered, a red upward triangle is plotted below the bar.
Signals are overlaid directly on the price chart (overlay=true) and serve only as visual cues.
Usage Notes
Best used as a filter or secondary confirmation tool, not as a standalone entry trigger.
Consider combining with higher timeframe trend, key support/resistance, or volume analysis.
Entries, stop losses, and profit targets should be defined and tested independently by the trader.
Limitations and Risks
In strong trending markets, these signals may fail.
In low-liquidity or gapping conditions, accuracy may be reduced.
A single candlestick pattern cannot ensure consistent profitability.
Disclaimer
This script is for educational and research purposes only. It is not financial advice. Trading carries risk, and users are solely responsible for their own decisions and results.
===================
指标适用范围
⚠️ 特别提示:本指标主要适用于日线图(Daily Timeframe)。
Larry Williams 的原始讨论与统计均基于日线数据。虽然技术上可以在其它周期应用,但效果可能会不同,建议严格以日线作为主要参考周期。
功能概述
本指标用于在图表上标记一种经典的“外包线 + 极端收盘”的价格行为形态。思路参考 Larry Williams 在《Long-Term Secrets to Short-Term Trading》(第二版,第七章)中对日线“Outside Day”与反向收盘的讨论。指标不包含交易执行或提醒功能,仅在满足条件时绘制信号标记,用于辅助研究。
计算逻辑
外包线(Outside Bar)判定
最高价高于前一根K线的最高价;
最低价低于前一根K线的最低价。
极端收盘过滤
做多信号(Long):收盘价低于前一根K线的最低价;
做空信号(Short):收盘价高于前一根K线的最高价。
确认方式
仅在K线收盘后确认(避免盘中信号反复出现/消失)。
绘图说明
触发做多条件时,在K线 上方 绘制 绿色 向下三角形标记。
触发做空条件时,在K线 下方 绘制 红色 向上三角形标记。
信号直接叠加在价格图上(overlay=true),仅作提示。
使用建议
建议作为筛选条件或二次确认工具,不要单独作为入场依据;
可以配合趋势方向、关键支撑/阻力、成交量等其他因素一起使用;
入场、止损与止盈需由使用者自行定义和验证。
限制与风险
在强趋势行情中,信号可能失效;
在低流动性或跳空行情中,信号准确度下降;
单一形态不能保证稳定盈利。
免责声明
本指标仅用于教育与研究,不构成投资建议。实际交易风险由使用者自行承担。
Custom High and Low (W,D,4,1)Custom High and Low (W,D,4,1)
can choose Weekly Daily 4h 1hr Previous High and Low.
主力资金进出监控器Main Capital Flow Monitor-MEWINSIGHTMain Capital Flow Monitor Indicator
Indicator Description
This indicator utilizes a multi-cycle composite weighting algorithm to accurately capture the movement of main capital in and out of key price zones. The core logic is built upon three dimensions:
Multi-Cycle Pressure/Support System
Using triple timeframes (500-day/250-day/90-day) to calculate:
Long-term resistance lines (VAR1-3): Monitoring historical high resistance zones
Long-term support lines (VAR4-6): Identifying historical low support zones
EMA21 smoothing is applied to eliminate short-term fluctuations
Dynamic Capital Activity Engine
Proprietary VARD volatility algorithm:
VARD = EMA
Automatically amplifies volatility sensitivity by 10x when price approaches the safety margin (VARA×1.35), precisely capturing abnormal main capital movements
Capital Inflow Trigger Mechanism
Capital entry signals require simultaneous fulfillment of:
Price touching 30-day low zone (VARE)
Capital activity breaking recent peaks (VARF)
Weighted capital flow verified through triple EMA:
Capital Entry = EMA / 618
Visualization:
Green histogram: Continuous main capital inflow
Red histogram: Abnormal daily capital movement intensity
Column height intuitively displays capital strength
Application Scenarios:
Consecutive green columns → Main capital accumulation at bottom
Sudden expansion of red columns → Abnormal main capital rush
Continuous fluctuations near zero axis → Main capital washing phase
Core Value:
Provides 1-3 trading days early warning of main capital movements, suitable for:
Medium/long-term investors identifying main capital accumulation zones
Short-term traders capturing abnormal main capital breakouts
Risk control avoiding main capital distribution phases
Parameter Notes: Default parameters are optimized through historical A-share market backtesting. Users can adjust cycle parameters according to different market characteristics (suggest extending cycles by 20% for European/American markets).
Formula Features:
Multi-timeframe weighted synthesis technology
Dynamic sensitivity adjustment mechanism
Main capital activity intensity quantification
Early warning function for capital movements
Suitable Markets:
Stocks, futures, cryptocurrencies and other financial markets with obvious main capital characteristics.
指标名称:主力资金进出监控器
指标描述:
本指标通过多周期复合加权算法,精准捕捉主力资金在关键价格区域的进出动向。核心逻辑基于三大维度构建:
多周期压力/支撑体系
通过500日/250日/90日三重时间框架,分别计算:
长期压力线(VAR1-3):监控历史高位阻力区
长期支撑线(VAR4-6):识别历史低位承接区
采用EMA21平滑处理,消除短期波动干扰
动态资金活跃度引擎
独创VARD波动率算法:
当价格接近安全边际(VARA×1.35)时自动放大波动敏感度10倍,精准捕捉主力异动
资金进场触发机制
资金入场信号需同时满足:
价格触及30日最低区域(VARE)
资金活跃度突破近期峰值(VARF)
通过三重EMA验证的加权资金流:
资金入场 = EMA / 618
可视化呈现:
绿色柱状图:主力资金持续流入
红色柱状图:当日资金异动量级
柱体高度直观显示资金强度
使用场景:
绿色柱体连续出现 → 主力底部吸筹
红色柱体突然放大 → 主力异动抢筹
零轴附近持续波动 → 主力洗盘阶段
核心价值:
提前1-3个交易日预警主力资金动向,适用于:
中长线投资者识别主力建仓区间
短线交易者捕捉主力异动突破
风险控制规避主力出货阶段
参数说明:默认参数经A股历史数据回测优化,用户可根据不同市场特性调整周期参数(建议欧美市场延长周期20%)
Reversión 3 velas grandes lejos de EMA3reversión después de 3 velas grandes alcistas o bajistas en media movil de 3 periodos
OTFThis indicator identifies One Time Framing conditions directly on the chart. One Time Framing occurs when a bar’s high is higher than the previous bar’s high without breaking the previous low (for bullish OTF), or when a bar’s low is lower than the previous bar’s low without breaking the previous high (for bearish OTF).
This tool helps traders to spot continuation moves and trend confirmation within any timeframe. Customizable inputs allow users to select the desired time interval and highlight both bullish and bearish One Time Framing sequences.
How to use:
Apply this indicator on any timeframe to automatically highlight OTF events.
Use the visual markers to identify trend continuations or early reversals.
Adjust the settings panel for color preferences and OTF sensitivity.
No trading signals or strategies are provided; this indicator is strictly for identifying the OTF structure in market price action. Suitable for all levels of traders interested in market structure analysis.
EMA 8/20/50/200 + Factals -Govind It includes all color coded emas and fractals designed to display in a clean way.
No Wick 15m Candles (Anchored Arrows)defined upArrow and downArrow as series values (high or low when conditions are true, otherwise na).
Passed those to plotshape().
This way the arrows are anchored exactly on the candle high/low.
SmartSkull 15 minutes//@version=5
indicator("LegendGPT – First 15m Extremes + Second 15m Breakout FVG + Alerts", overlay=true, max_boxes_count=500)
// SETTINGS
boxColor = input.color(color.new(color.gray, 85), "Opening Box Color")
fvgBullColor = input.color(color.new(color.green, 85), "Bullish FVG Color")
fvgBearColor = input.color(color.new(color.red, 85), "Bearish FVG Color")
sessionTZ = "America/New_York"
nasdaqOpenHour = 9
nasdaqOpenMinute = 30
// 15m data for box
time15_tf = request.security(syminfo.tickerid, "15", time, lookahead=barmerge.lookahead_on)
high15_tf = request.security(syminfo.tickerid, "15", high, lookahead=barmerge.lookahead_on)
low15_tf = request.security(syminfo.tickerid, "15", low, lookahead=barmerge.lookahead_on)
// First 15m candle start
isFirst15mActive = (hour(time15_tf, sessionTZ) == nasdaqOpenHour and minute(time15_tf, sessionTZ) == nasdaqOpenMinute)
isSecond15mActive = (hour(time15_tf, sessionTZ) == nasdaqOpenHour and minute(time15_tf, sessionTZ) == nasdaqOpenMinute + 15)
// STATE VARS
var box openingRangeBox = na
var float session1mHigh = na
var int session1mHighBar = na
var float session1mLow = na
var int session1mLowBar = na
var bool extremesMarked = false
var bool bullBreakout = false
var bool bearBreakout = false
var bool fvgDrawn = false
var box fvgBox = na
var label fvgFilledLabel = na
newDay = time("D", sessionTZ) != time("D", sessionTZ)
// RESET DAILY
if newDay
if not na(openingRangeBox)
box.delete(openingRangeBox)
if not na(fvgBox)
box.delete(fvgBox)
if not na(fvgFilledLabel)
label.delete(fvgFilledLabel)
session1mHigh := na
session1mHighBar := na
session1mLow := na
session1mLowBar := na
extremesMarked := false
bullBreakout := false
bearBreakout := false
fvgDrawn := false
// Only run on 1-minute timeframe
if timeframe.multiplier == 1
// CREATE OPENING RANGE BOX for first 15m
if isFirst15mActive and na(openingRangeBox)
openingRangeBox := box.new(left=bar_index, top=high15_tf, right=bar_index + 15, bottom=low15_tf, bgcolor=boxColor, border_color=color.new(color.black, 90))
// Track highest/lowest 1m candle during first 15m
if isFirst15mActive
if na(session1mHigh)
session1mHigh := high
session1mHighBar := bar_index
session1mLow := low
session1mLowBar := bar_index
else
if high > session1mHigh
session1mHigh := high
session1mHighBar := bar_index
if low < session1mLow
session1mLow := low
session1mLowBar := bar_index
// When first 15m ends, mark extremes
if isFirst15mActive and not isFirst15mActive and not extremesMarked
// Green box for highest 1m candle
box.new(left=session1mHighBar, top=session1mHigh, right=session1mHighBar + 1, bottom=session1mHigh, border_color=color.green, bgcolor=color.new(color.green, 80))
// Red box for lowest 1m candle
box.new(left=session1mLowBar, top=session1mLow, right=session1mLowBar + 1, bottom=session1mLow, border_color=color.red, bgcolor=color.new(color.red, 80))
extremesMarked := true
// SECOND 15m: Check breakout of high/low
if isSecond15mActive
// Bullish breakout
if not bullBreakout and high > session1mHigh
bullBreakout := true
bearBreakout := false
alert("LegendGPT: Bullish Breakout above first 15m high", alert.freq_once_per_bar)
// Bearish breakout
if not bearBreakout and low < session1mLow
bearBreakout := true
bullBreakout := false
alert("LegendGPT: Bearish Breakout below first 15m low", alert.freq_once_per_bar)
// After breakout in second 15m, look for first FVG
if isSecond15mActive and not fvgDrawn
// Bullish FVG condition
if bullBreakout and low > high
fvgBox := box.new(left=bar_index - 1, top=high , right=bar_index, bottom=low, bgcolor=fvgBullColor, border_color=color.green)
fvgDrawn := true
alert("LegendGPT: Bullish FVG formed after breakout", alert.freq_once_per_bar)
// Bearish FVG condition
if bearBreakout and high < low
fvgBox := box.new(left=bar_index - 1, top=high, right=bar_index, bottom=low , bgcolor=fvgBearColor, border_color=color.red)
fvgDrawn := true
alert("LegendGPT: Bearish FVG formed after breakout", alert.freq_once_per_bar)
// PERSISTENT FVG: delete when filled
if not na(fvgBox)
fvgTop = box.get_top(fvgBox)
fvgBottom = box.get_bottom(fvgBox)
if high >= fvgBottom and low <= fvgTop
box.delete(fvgBox)
fvgBox := na
fvgDrawn := false
if not na(fvgFilledLabel)
label.delete(fvgFilledLabel)
fvgFilledLabel := label.new(bar_index, close, text="FVG filled", style=label.style_label_center, color=color.blue, textcolor=color.white, size=size.tiny)
alert("LegendGPT: FVG filled (mitigation)", alert.freq_once_per_bar)
Simple Pivot Zones (Error-free) — v11. Core Idea
The indicator we built is a “pivot-based zone detector with breakout signals.”
It does three things:
1. Finds important swing highs and swing lows in price (pivots).
2. Creates support and resistance zones around those pivots using volatility (ATR).
3. Watches price action to see if those zones get broken, then gives signals.
________________________________________
2. What is a Pivot?
A pivot high happens when the price makes a local peak — a bar is higher than the bars around it.
A pivot low happens when the price makes a local dip — a bar is lower than the bars around it.
These are natural turning points in the market, showing where buyers or sellers had strong control temporarily. Traders often use them to draw support (pivot lows) and resistance (pivot highs).
________________________________________
3. Why Use ATR for Zones?
ATR (Average True Range) measures the average volatility of a market. Instead of drawing just a flat line at the pivot, we create a zone above and below it, sized according to ATR.
Example:
• If ATR is 20 points and zone size is 0.5, then the zone extends 10 points above and below the pivot level.
This turns thin “lines” into thicker areas of interest. Real markets don’t respect razor-thin levels, but zones are more realistic.
________________________________________
4. How Support & Resistance Zones Work
• Resistance zones are created at pivot highs. They mark where sellers were strong before.
• Support zones are created at pivot lows. They mark where buyers were strong before.
Over time, these zones extend forward until the price interacts with them.
________________________________________
5. Breakout Detection
The indicator checks whether the price closes beyond the last pivot high or low:
• If price closes above the last pivot high, it means buyers have broken resistance.
• If price closes below the last pivot low, it means sellers have broken support.
These moments are significant because they often trigger trend continuation.
________________________________________
6. Parameters It Uses
1. Pivot Length – how many bars to look back and forward to confirm a pivot. A higher length makes pivots less frequent but stronger.
2. ATR Length and Multiplier – defines the size of the zones (wider zones in more volatile markets).
3. Max Zones to Keep – avoids clutter by keeping only the most recent zones.
4. Colors & Styling – helps traders visually separate bullish and bearish zones.
________________________________________
7. How It Helps Traders
• Visual clarity: Instead of guessing support and resistance, the chart automatically highlights them.
• Dynamic adjustment: Zones adapt to volatility using ATR, making them useful in both calm and volatile markets.
• Breakout signals: Traders get notified when price actually breaks key levels, instead of reacting late.
• Cleaner charts: Instead of dozens of hand-drawn lines, the tool manages zones for you, deleting old ones.
________________________________________
8. The Logic in One Sentence
It finds important swing highs and lows, turns them into support/resistance zones scaled by volatility, and alerts you when the market breaks through them.
________________________________________
👉 In practice, this helps traders spot where the market is likely to bounce or break, and gives a framework to plan trades — for example, buying on bullish breakouts or selling on bearish breakouts.
________________________________________
Best Indicators for Day Trading//@version=5
indicator("Best Indicators for Day Trading", shorttitle="Day Trading Indicators", overlay= true)
//---------------------------- MA's ----------------------------//
priceSource = input.source(close, title='Price Source For The Moving Averages', group='Moving Average')
IgnoreExtendedHours = input.bool(true, title='Ignore Extended Hours', group='Moving Average')
resolution = timeframe.period
price = request.security(syminfo.tickerid, resolution, priceSource)
shortMAPeriod = input.int(8, title='MA 1', group='Moving Average', inline='short')
shortMAType = input.string(defval='EMA', title='', confirm=false, options= , group='Moving Average', inline='short')
longMAPeriod = input.int(21, title='MA 2', group='Moving Average', inline='long')
longMAType = input.string(defval='EMA', title='', confirm=false, options= , group='Moving Average', inline='long')
i_timeframe_signal = input.timeframe(title='Crossover MAs Timeframe', defval='', group='Moving Average')
useTextLabels = input.bool(true, title='Use Text-Based Crossover Labels?', group='Moving Average')
showBonusMA1 = input.bool(true, title='Bonus MA', group='Moving Average', inline='bma1')
bonusMA1Period = input.int(34, title='',group='Moving Average', inline='bma1')
bonus1MAType = input.string(defval='EMA', title='', confirm=false, options= , group='Moving Average', inline='bma1')
i_timeframe_bma1 = input.timeframe(title='', defval='', group='Moving Average', inline='bma1')
ZLMASmooth = 3
f_security(_sym, _res, _src) =>
request.security(_sym, _res, _src , barmerge.gaps_off, lookahead=barmerge.lookahead_off)
ticker = ticker.new(syminfo.prefix, syminfo.ticker, IgnoreExtendedHours ? session.regular : syminfo.session)
// MA calculation
short = shortMAType == 'SMA' ? f_security(ticker, i_timeframe_signal, ta.sma(price, shortMAPeriod)) : shortMAType == 'EMA' ? f_security(ticker, i_timeframe_signal, ta.ema(price, shortMAPeriod)) : shortMAType == 'WMA' ? f_security(ticker, i_timeframe_signal, ta.wma(price, shortMAPeriod)) : shortMAType == 'HMA' ? f_security(ticker, i_timeframe_signal, ta.hma(price, shortMAPeriod)) : shortMAType == 'ALMA' ? f_security(ticker, i_timeframe_signal, ta.alma(price, shortMAPeriod, 0.85, 6)) : shortMAType == 'LIN' ? f_security(ticker, i_timeframe_signal, ta.linreg(price, shortMAPeriod, 0)) : shortMAType == 'ZLMA' ? f_security(ticker, i_timeframe_signal, 2 * ta.wma(ta.wma(price, shortMAPeriod), ZLMASmooth) - ta.wma(ta.wma(ta.wma(price, shortMAPeriod), ZLMASmooth), shortMAPeriod)) : na
long = longMAType == 'SMA' ? f_security(ticker, i_timeframe_signal, ta.sma(price, longMAPeriod)) : longMAType == 'EMA' ? f_security(ticker, i_timeframe_signal, ta.ema(price, longMAPeriod)) : longMAType == 'WMA' ? f_security(ticker, i_timeframe_signal, ta.wma(price, longMAPeriod)) : longMAType == 'HMA' ? f_security(ticker, i_timeframe_signal, ta.hma(price, longMAPeriod)) : longMAType == 'ALMA' ? f_security(ticker, i_timeframe_signal, ta.alma(price, longMAPeriod, 0.85, 6)) : longMAType == 'LIN' ? f_security(ticker, i_timeframe_signal, ta.linreg(price, longMAPeriod, 0)) : longMAType == 'ZLMA' ? f_security(ticker, i_timeframe_signal, 2 * ta.wma(ta.wma(price, longMAPeriod), ZLMASmooth) - ta.wma(ta.wma(ta.wma(price, longMAPeriod), ZLMASmooth), longMAPeriod)) : na
bonus1 = bonus1MAType == 'SMA' ? f_security(ticker, i_timeframe_bma1, ta.sma(price, bonusMA1Period)) : bonus1MAType == 'EMA' ? f_security(ticker, i_timeframe_bma1, ta.ema(price, bonusMA1Period)) : bonus1MAType == 'WMA' ? f_security(ticker, i_timeframe_bma1, ta.wma(price, bonusMA1Period)) : bonus1MAType == 'HMA' ? f_security(ticker, i_timeframe_bma1, ta.hma(price, bonusMA1Period)) : bonus1MAType == 'ALMA' ? f_security(ticker, i_timeframe_bma1, ta.alma(price, bonusMA1Period, 0.85, 6)) : bonus1MAType == 'LIN' ? f_security(ticker, i_timeframe_bma1, ta.linreg(price, bonusMA1Period, 0)) : bonus1MAType == 'ZLMA' ? f_security(ticker, i_timeframe_bma1, 2 * ta.wma(ta.wma(price, bonusMA1Period), ZLMASmooth) - ta.wma(ta.wma(ta.wma(price, bonusMA1Period), ZLMASmooth), bonusMA1Period)) : na
// trend direction/color
TrendingUp() =>
short > long
TrendingDown() =>
short < long
Uptrend() =>
TrendingUp() and TrendingDown()
Downtrend() =>
TrendingDown() and TrendingUp()
trendColor = TrendingUp() ? color.new(color.green, 85) : TrendingDown() ? color.new(color.red, 85) : color.new(color.blue, 85)
MA1 = plot(short, title='Short Period Moving Average', color=color.fuchsia, linewidth=2, style=plot.style_line)
MA2 = plot(long, title='Long Period Moving Average', color=color.navy, linewidth=1, style=plot.style_line)
fill(MA1, MA2, color=trendColor, title='Short/Long Divergence Fill')
plot(showBonusMA1 ? bonus1 : na, title='MA 3', color=color.white, linewidth=1, style=plot.style_line)
// Short & Long Moving Averages cross alert
MAcrossing = ta.cross(short, long) ? short : na
plot(MAcrossing , title='Calls/Puts Crossing Icon', style=plot.style_cross, linewidth=3, color=trendColor)
// Bull and Bear Alerts
Bull = ta.crossover(short, long)
Bear = ta.crossunder(short, long)
plotshape(Bull, title='Calls Label', color=color.new(color.green, 25), textcolor=useTextLabels ? color.white : color.new(color.white, 100), style=useTextLabels ? shape.labelup : shape.triangleup, text='Calls', location=location.belowbar)
plotshape(Bear, title='Puts Label', color=color.new(color.red, 25), textcolor=useTextLabels ? color.white : color.new(color.white, 100), style=useTextLabels ? shape.labeldown : shape.triangledown, text='Puts', location=location.abovebar)
if Bull
alert('Calls Alert: 8ema crossed over 21ema', alert.freq_once_per_bar_close)
if Bear
alert('Puts Alert: 8ema crossed under 21ema', alert.freq_once_per_bar_close)
//---------------------------- VWAP ----------------------------//
vwapprice = input(defval=hlc3, title="VWAP Source", group='VWAP')
enable_vwap = input(true, title="Enable VWAP", group='VWAP')
vwapResolution = input.timeframe(title = "VWAP Resolution", defval = "", group='VWAP')
vwapFunction = ta.vwap(vwapprice)
vwapSecurity = request.security(syminfo.tickerid, vwapResolution, vwapFunction)
plot(enable_vwap ? vwapSecurity : na, title="VWAP", color=color.yellow, linewidth=2, editable=true)
//---------------------------- FVG ----------------------------//
showFractals = input(false,title="Show Fractals?", group="Fair Value Gap")
showBrekout = input(false,title="Show Market Structure Breakouts?", group="Fair Value Gap")
breakType = input.string("Body",title="Fractal Break Type:",options= , group="Fair Value Gap")
n = input.int(title="Periods", defval=2, minval=2, group="Fair Value Gap")
showImbalance = input(true,title="Show Breakout Imbalances", group="Fair Value Gap")
showOtherImbalance = input(true,title="Show Other Imbalances", group="Fair Value Gap")
imbGreenClr = input.color(color.new(color.green,65),title="Up:",inline="i_1", group="Fair Value Gap")
imbRedClr = input.color(color.new(color.red,65),title="Down:",inline="i_1", group="Fair Value Gap")
imbRestClr = input.color(color.new(color.yellow,65), title="Other:",inline="i_1", group="Fair Value Gap")
showBoxes = input(false,title="Show OrderBlocks?", group="Fair Value Gap")
changeColor = input(false,title="Change OrderBlock Colors?", group="Fair Value Gap")
transGreenClr = input.color(color.new(color.green,80),title="Bg:",inline="a_1", group="Fair Value Gap")
greenClr = input.color(color.new(color.green,0),title="Border:",inline="a_1", group="Fair Value Gap")
transRedClr = input.color(color.new(color.red,80),title="Bg:",inline="b_1", group="Fair Value Gap")
redClr = input.color(color.new(color.red,0),title="Border:",inline="b_1", group="Fair Value Gap")
//Fractals{
// UpFractal
bool upflagDownFrontier = true
bool upflagUpFrontier0 = true
bool upflagUpFrontier1 = true
bool upflagUpFrontier2 = true
bool upflagUpFrontier3 = true
bool upflagUpFrontier4 = true
for i = 1 to n
upflagDownFrontier := upflagDownFrontier and (high < high )
upflagUpFrontier0 := upflagUpFrontier0 and (high < high )
upflagUpFrontier1 := upflagUpFrontier1 and (high <= high and high < high )
upflagUpFrontier2 := upflagUpFrontier2 and (high <= high and high <= high and high < high )
upflagUpFrontier3 := upflagUpFrontier3 and (high <= high and high <= high and high <= high and high < high )
upflagUpFrontier4 := upflagUpFrontier4 and (high <= high and high <= high and high <= high and high <= high and high < high )
flagUpFrontier = upflagUpFrontier0 or upflagUpFrontier1 or upflagUpFrontier2 or upflagUpFrontier3 or upflagUpFrontier4
upFractal = (upflagDownFrontier and flagUpFrontier)
//DownFractal
bool downflagDownFrontier = true
bool downflagUpFrontier0 = true
bool downflagUpFrontier1 = true
bool downflagUpFrontier2 = true
bool downflagUpFrontier3 = true
bool downflagUpFrontier4 = true
for i = 1 to n
downflagDownFrontier := downflagDownFrontier and (low > low )
downflagUpFrontier0 := downflagUpFrontier0 and (low > low )
downflagUpFrontier1 := downflagUpFrontier1 and (low >= low and low > low )
downflagUpFrontier2 := downflagUpFrontier2 and (low >= low and low >= low and low > low )
downflagUpFrontier3 := downflagUpFrontier3 and (low >= low and low >= low and low >= low and low > low )
downflagUpFrontier4 := downflagUpFrontier4 and (low >= low and low >= low and low >= low and low >= low and low > low )
flagDownFrontier = downflagUpFrontier0 or downflagUpFrontier1 or downflagUpFrontier2 or downflagUpFrontier3 or downflagUpFrontier4
downFractal = (downflagDownFrontier and flagDownFrontier)
//}
var float topValue = na, var float bottomValue = na
var int lastRedIndex = na, var float lastRedLow = na, var float lastRedHigh = na
var int lastGreenIndex = na, var float lastGreenLow = na, var float lastGreenHigh = na
var line topLine = na, var line bottomLine = na
var box demandBox = na, var box supplyBox = na
var box imbalanceBox = na
var bool checkUpImbalance = false
var bool checkDownImbalance = false
var topBreakBlock = false, var bottomBreakBlock = false
var isLongBreak = false, var isShortBreak = false
var arrBoxes = array.new_box(0)
topBreakCheckSource = breakType == "Wick+Body" ? high : close
bottomBreakCheckSource = breakType == "Wick+Body" ? low : close
//IMBALANCE
//Data
L1 = low
H3 = high
H1 = high
L3 = low
FVGUp = H3 < L1 ? 1 : 0
plotFVGU = FVGUp ? H3 : na
plotFVGUL = FVGUp ? L1 : na
FVGDown = L3 > H1 ? 1 : 0
plotFVGD = FVGDown ? L3 : na
plotFVGH = FVGDown ? H1 : na
if FVGUp and showOtherImbalance and checkUpImbalance == false
imbalanceBox := box.new(bar_index-2, plotFVGU,bar_index,plotFVGUL, bgcolor=imbRestClr, border_color=imbRestClr)
if FVGDown and showOtherImbalance and checkDownImbalance == false
imbalanceBox := box.new(bar_index-2, plotFVGH,bar_index,plotFVGD, bgcolor=imbRestClr, border_color=imbRestClr)
//Last red check
if close < open
lastRedIndex := bar_index
lastRedLow := low
lastRedHigh := high
//Last green check
if close > open
lastGreenIndex := bar_index
lastGreenLow := low
lastGreenHigh := high
//Check Imbalance
if checkUpImbalance
checkUpImbalance := false
imbTop = low
imbBottom = high
if imbTop > imbBottom and showImbalance
imbalanceBox := box.new(bar_index-2, imbTop,bar_index,imbBottom, bgcolor=imbGreenClr, border_color=imbGreenClr)
if checkDownImbalance
checkDownImbalance := false
imbTop = low
imbBottom = high
if imbTop > imbBottom and showImbalance
imbalanceBox := box.new(bar_index-2, imbTop,bar_index,imbBottom, bgcolor=imbRedClr, border_color=imbRedClr)
//Top break
if ta.crossover(topBreakCheckSource,topValue) and topBreakBlock == false
topBreakBlock := true
isLongBreak := true
checkUpImbalance := true
if showBrekout
line.set_x2(topLine,bar_index)
if showBoxes
demandBox := box.new(lastRedIndex-1, lastRedHigh,lastRedIndex+1,lastRedLow, bgcolor=transGreenClr, border_color=greenClr)
array.push(arrBoxes,demandBox)
//Bottom break
if ta.crossunder(bottomBreakCheckSource,bottomValue) and bottomBreakBlock == false
bottomBreakBlock := true
isShortBreak := true
checkDownImbalance := true
if showBrekout
line.set_x2(bottomLine,bar_index)
if showBoxes
supplyBox := box.new(lastGreenIndex-1, lastGreenHigh,lastGreenIndex+1,lastGreenLow, bgcolor=transRedClr, border_color=redClr)
array.push(arrBoxes,supplyBox)
//New up fractal
if upFractal
topBreakBlock := false
isLongBreak := false
topValue := high
if showBrekout
topLine := line.new(bar_index ,topValue,bar_index,topValue, color=color.teal, style=line.style_dotted, width=2)
if isLongBreak == false
line.delete(topLine )
//New down fractal
if downFractal
bottomBreakBlock := false
isShortBreak := false
bottomValue := low
if showBrekout
bottomLine := line.new(bar_index ,bottomValue,bar_index,bottomValue, color=color.maroon, style=line.style_dotted, width=2)
if isShortBreak == false
line.delete(bottomLine )
//Box state update
//activeBoxes = box.all
activeBoxes = arrBoxes
if array.size(activeBoxes) > 0 and changeColor
for i = 0 to array.size(activeBoxes) - 1
bVal = box.get_bottom(array.get(activeBoxes, i))
tVal = box.get_top(array.get(activeBoxes, i))
if close < bVal
box.set_bgcolor(array.get(activeBoxes, i),transRedClr)
box.set_border_color(array.get(activeBoxes, i),redClr)
if close > tVal
box.set_bgcolor(array.get(activeBoxes, i),transGreenClr)
box.set_border_color(array.get(activeBoxes, i),greenClr)
//PLOTS
plotshape(showFractals ? downFractal : na,style=shape.triangleup, location=location.belowbar, offset=-n, color=color.new(color.gray,80), size = size.tiny)
plotshape(showFractals ? upFractal : na, style=shape.triangledown, location=location.abovebar, offset=-n, color=color.new(color.gray,80), size = size.tiny)
//---------------------------- Bollinger Bands ----------------------------//
bbshow = input.bool(true, "Show Bollinger Bands?", group="Bollinger Bands")
bblength = input.int(20, minval=1, group="Bollinger Bands")
bbsrc = input(close, title="Source", group="Bollinger Bands")
bbmult = input.float(2.0, minval=0.001, maxval=50, title="StdDev", group="Bollinger Bands")
bbbasis = ta.sma(bbsrc, bblength)
bbdev = bbmult * ta.stdev(bbsrc, bblength)
bbupper = bbbasis + bbdev
bblower = bbbasis - bbdev
//Input Checkbox
basis_checkbok = input.bool(title="Basis", defval = true)
bboffset = input.int(0, "Offset", minval = -499, maxval = 500)
//Plot
plot(basis_checkbok ? bbbasis : na, "Basis", color=#872323, offset = bboffset)
p1 = plot(bbshow ? bbupper : na, "Upper", color=color.teal, offset = bboffset)
p2 = plot(bbshow ? bblower : na, color = color.teal)
fill(p1, p2, title = "Background", color=#198787)
//---------------------------- Support and Resistance ----------------------------//
prd = input.int(defval=10, title='Pivot Period', minval=4, maxval=30, group="S&R")
ppsrc = input.string(defval='High/Low', title='Source', options= , group="S&R")
maxnumpp = input.int(defval=20, title=' Maximum Number of Pivot', minval=5, maxval=100, group="S&R")
ChannelW = input.int(defval=10, title='Maximum Channel Width %', minval=1, group="S&R")
maxnumsr = input.int(defval=5, title=' Maximum Number of S/R', minval=1, maxval=10, group="S&R")
min_strength = input.int(defval=2, title=' Minimum Strength', minval=1, maxval=10, group="S&R")
labelloc = input.int(defval=20, title='Label Location', group="S&R", tooltip='Positive numbers reference future bars, negative numbers reference histical bars')
linestyle = input.string(defval='Dashed', title='Line Style', options= , group="S&R")
linewidth = input.int(defval=2, title='Line Width', minval=1, maxval=4, group="S&R")
resistancecolor = input.color(defval=color.red, title='Resistance Color', group="S&R")
supportcolor = input.color(defval=color.lime, title='Support Color', group="S&R")
showpp = input(false, title='Show Point Points')
float src1 = ppsrc == 'High/Low' ? high : math.max(close, open)
float src2 = ppsrc == 'High/Low' ? low : math.min(close, open)
float ph = ta.pivothigh(src1, prd, prd)
float pl = ta.pivotlow(src2, prd, prd)
plotshape(ph and showpp, text='H', style=shape.labeldown, color=na, textcolor=color.new(color.red, 0), location=location.abovebar, offset=-prd)
plotshape(pl and showpp, text='L', style=shape.labelup, color=na, textcolor=color.new(color.lime, 0), location=location.belowbar, offset=-prd)
Lstyle = linestyle == 'Dashed' ? line.style_dashed : linestyle == 'Solid' ? line.style_solid : line.style_dotted
//calculate maximum S/R channel zone width
prdhighest = ta.highest(300)
prdlowest = ta.lowest(300)
cwidth = (prdhighest - prdlowest) * ChannelW / 100
var pivotvals = array.new_float(0)
if ph or pl
array.unshift(pivotvals, ph ? ph : pl)
if array.size(pivotvals) > maxnumpp // limit the array size
array.pop(pivotvals)
get_sr_vals(ind) =>
float lo = array.get(pivotvals, ind)
float hi = lo
int numpp = 0
for y = 0 to array.size(pivotvals) - 1 by 1
float cpp = array.get(pivotvals, y)
float wdth = cpp <= lo ? hi - cpp : cpp - lo
if wdth <= cwidth // fits the max channel width?
lo := cpp <= lo ? cpp : lo
hi := cpp > lo ? cpp : hi
numpp += 1
numpp
var sr_up_level = array.new_float(0)
var sr_dn_level = array.new_float(0)
sr_strength = array.new_float(0)
find_loc(strength) =>
ret = array.size(sr_strength)
for i = ret > 0 ? array.size(sr_strength) - 1 : na to 0 by 1
if strength <= array.get(sr_strength, i)
break
ret := i
ret
ret
check_sr(hi, lo, strength) =>
ret = true
for i = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
//included?
if array.get(sr_up_level, i) >= lo and array.get(sr_up_level, i) <= hi or array.get(sr_dn_level, i) >= lo and array.get(sr_dn_level, i) <= hi
if strength >= array.get(sr_strength, i)
array.remove(sr_strength, i)
array.remove(sr_up_level, i)
array.remove(sr_dn_level, i)
ret
else
ret := false
ret
break
ret
var sr_lines = array.new_line(11, na)
var sr_labels = array.new_label(11, na)
for x = 1 to 10 by 1
rate = 100 * (label.get_y(array.get(sr_labels, x)) - close) / close
label.set_text(array.get(sr_labels, x), text=str.tostring(label.get_y(array.get(sr_labels, x))) + '(' + str.tostring(rate, '#.##') + '%)')
label.set_x(array.get(sr_labels, x), x=bar_index + labelloc)
label.set_color(array.get(sr_labels, x), color=label.get_y(array.get(sr_labels, x)) >= close ? color.red : color.lime)
label.set_textcolor(array.get(sr_labels, x), textcolor=label.get_y(array.get(sr_labels, x)) >= close ? color.white : color.black)
label.set_style(array.get(sr_labels, x), style=label.get_y(array.get(sr_labels, x)) >= close ? label.style_label_down : label.style_label_up)
line.set_color(array.get(sr_lines, x), color=line.get_y1(array.get(sr_lines, x)) >= close ? resistancecolor : supportcolor)
if ph or pl
//because of new calculation, remove old S/R levels
array.clear(sr_up_level)
array.clear(sr_dn_level)
array.clear(sr_strength)
//find S/R zones
for x = 0 to array.size(pivotvals) - 1 by 1
= get_sr_vals(x)
if check_sr(hi, lo, strength)
loc = find_loc(strength)
// if strength is in first maxnumsr sr then insert it to the arrays
if loc < maxnumsr and strength >= min_strength
array.insert(sr_strength, loc, strength)
array.insert(sr_up_level, loc, hi)
array.insert(sr_dn_level, loc, lo)
// keep size of the arrays = 5
if array.size(sr_strength) > maxnumsr
array.pop(sr_strength)
array.pop(sr_up_level)
array.pop(sr_dn_level)
for x = 1 to 10 by 1
line.delete(array.get(sr_lines, x))
label.delete(array.get(sr_labels, x))
for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
rate = 100 * (mid - close) / close
array.set(sr_labels, x + 1, label.new(x=bar_index + labelloc, y=mid, text=str.tostring(mid) + '(' + str.tostring(rate, '#.##') + '%)', color=mid >= close ? color.red : color.lime, textcolor=mid >= close ? color.white : color.black, style=mid >= close ? label.style_label_down : label.style_label_up))
array.set(sr_lines, x + 1, line.new(x1=bar_index, y1=mid, x2=bar_index - 1, y2=mid, extend=extend.both, color=mid >= close ? resistancecolor : supportcolor, style=Lstyle, width=linewidth))
f_crossed_over() =>
ret = false
for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
if close <= mid and close > mid
ret := true
ret
ret
f_crossed_under() =>
ret = false
for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
if close >= mid and close < mid
ret := true
ret
ret
alertcondition(f_crossed_over(), title='Resistance Broken', message='Resistance Broken')
alertcondition(f_crossed_under(), title='Support Broken', message='Support Broken')
SW's Asia/London H/L'sAccurate Asia and London (with other session) High's and Low's. As well as NY Pre-market and opening bell, and end of day vertical lines. Also created 4 slots in UI to be able to set specific vertical lines with custom label options.
Scalping Strategy: FVG + Engulfing
This is a scalping strategy based on the Fair Value Gap (FVG) and Engulfing pattern confirmation. It identifies the high and low of the first 5-minute candle after the 9:30 AM EST market open and waits for a breakout supported by a Fair Value Gap. A trade is only triggered after a retest of the FVG zone followed by an engulfing candle in the direction of the breakout. Trades are entered with a fixed 3:1 risk-to-reward ratio and limited to 2 entries per trading day to avoid overtrading. Ideal for NASDAQ scalping on a 1-minute chart.
Body-Based Inside/Outside Bars (wicks excluded)This indicator shows inside/outside bars EXCLUDING the wicks. The yellow vertical line indicates an inside bar (body only) and the blue vertical line indicates outside bars (candle body only).
First Candle Daily RangeFirst Candle Daily Range, as the name suggests it does just that. Nothing more, nothing special just like everyone else.
Monday's Range Superpowerkyu🔔 Settings
You can customize the colors and toggle ON/OFF in the indicator settings.
Works on daily, hourly, and minute charts.
Easily visualize Monday’s high, low, and mid-line range.
📌 1. Support & Resistance with Monday’s Range
Monday High: Acts as the first resistance of the week.
◽ Example: If price breaks above Monday’s high after Tuesday, it signals potential bullish continuation → long setup.
Monday Low: Acts as the first support of the week.
◽ Example: If price breaks below Monday’s low, it signals bearish continuation → short setup.
📌 2. Mid-Line Trend Confirmation
Monday Mid-Line = average price of Monday.
Price above mid-line → bullish bias.
Price below mid-line → bearish bias.
Use mid-line breaks as entry confirmation for long/short positions.
📌 3. Breakout Strategy
Break of Monday’s High = bullish breakout → long entry.
Break of Monday’s Low = bearish breakout → short entry.
Place stop-loss inside Monday’s range for a conservative approach.
📌 4. False Breakout Strategy
If price breaks Monday’s high/low but then falls back inside Monday’s range, it is a False Breakout.
Strategy: Trade in the opposite direction.
◽ False Breakout at High → short.
◽ False Breakout at Low → long.
Stop-loss at the wick (extreme point) of the failed breakout.
📌 5. Range-Based Scalping
Use Monday’s high and low as a trading range.
Sell near Monday’s High, buy near Monday’s Low, repeat until breakout occurs.
📌 6. Weekly Volatility Forecast
Narrow Monday range → higher chance of strong trend later in the week.
Wide Monday range → lower volatility expected during the week.
📌 7. Pattern & Trend Analysis within Monday Range
Look for candlestick patterns around Monday’s High/Low/Mid-Line.
◽ Example: Double Top near Monday’s High = short setup.
◽ Repeated bounce at Mid-Line = strong long opportunity.
✅ Summary
The Monday’s Range (Superpowerkyu) Indicator helps traders:
Identify weekly support & resistance
Confirm trend direction with Mid-Line
Trade breakouts & false breakouts
Apply range scalping strategies
Forecast weekly volatility
⚡ Especially, the False Breakout strategy is powerful as it captures failed moves and sudden sentiment reversals.