Range Lattice## RangeLattice
RangeLattice constructs a higher-timeframe scaffolding on any intraday chart, locking in structural highs/lows, mid/quarter grids, VWAP confluence, and live acceptance/break analytics. It provides a non-repainting overlay that turns range management into a disciplined process.
HOW IT WORKS
Structure Harvesting – Using request.security() , the script samples highs/lows from a user-selected timeframe (default 240 minutes) over a configurable lookback to establish the dominant range.
Grid Construction – Midpoint and quarter levels are derived mathematically, mirroring how institutional traders map distribution/accumulation zones.
Acceptance Detection – Consecutive closes inside the range flip an acceptance flag and darken the cloud, signaling balanced auction conditions.
Break Confirmation – Multi-bar closes outside the structure raise break labels and alerts, filtering the countless fake-outs that plague breakout traders.
VWAP Fan Overlay – Session VWAP plus ATR-based bands provide a live measure of flow centering relative to the lattice.
HOW TO USE IT
Range Plays : Fade taps of the outer rails only when acceptance is active and VWAP sits inside the grid—this is where mean-reversion works best.
Breakout Plays : Wait for confirmed break labels before entering expansion trades; the dashboard's Width/ATR metric tells you if the expansion has enough fuel.
Market Prep : Carry the same lattice from pre-market into regular trading hours by keeping the structure timeframe fixed; alerts keep you notified even when managing multiple tickers.
VISUAL FEATURES
Range Tap and Mid Pivot markers provide a tape-reading breadcrumb trail for journaling.
Cloud fill opacity tightens when acceptance persists, visually signaling balance compressions ready to break.
Dashboard displays absolute width, ATR-normalized width, and current state (Balanced vs Transitional) so you can glance across charts quickly.
Acceptance Flag toggle: Keep the repeated acceptance squares hidden until you need to audit balance.
PARAMETERS
Structure Timeframe (default: 240): Choose the timeframe whose ranges matter most (4H for indices, Daily for stocks).
Structure Lookback (default: 60): Bars sampled on the structure timeframe.
Acceptance Bars (default: 8): How many consecutive bars inside the range confirm balance.
Break Confirmation Bars (default: 3): Bars required outside the range to validate a breakout.
ATR Reference (default: 14): ATR period for width normalization.
Show Midpoint Grid (default: enabled): Display the midpoint and quarter levels.
Show Adaptive VWAP Fan (default: enabled): Toggle the VWAP channel for assets where volume distribution matters most.
Show Acceptance Flags (default: disabled): Turn the acceptance markers on/off for maximum visual control.
Show Range Dashboard (default: enabled): Disable if screen space is limited, re-enable during prep sessions.
ALERTS
The indicator includes five alert conditions:
Range High Tap: Price interacted with the RangeLattice high
Range Low Tap: Price interacted with the RangeLattice low
Range Mid Tap: Price interacted with the RangeLattice mid
Range Break Up: Confirmed upside breakout
Range Break Down: Confirmed downside breakout
Where it works best
This indicator works best on liquid instruments with clear structural levels. On very low timeframes (1-minute and below), the structure may update too frequently to be useful. The acceptance/break confirmation system requires patience—faster traders may find the multi-bar confirmation too slow for scalping. The VWAP fan is session-based and resets daily, which may not suit all trading styles.
Chart patterns
Momentum Permission + Pivot Entry + Exit (v1.4 FINAL SCAN)plot(permitOut, "PERMIT", display=display.none)
plot(entryOut, "ENTRY", display=display.none)
plot(exitOut, "EXIT", display=display.none)
Confluence Retournement Haussier - Ultimate V1This indicator was originally designed to visualize the right moment to enter a position. I buy stocks when they are falling, at the bottom before they rebound.
The 30‑minute chart with its 100 EMA was used as the baseline, but it can be applied to multiple timeframes. I even used it on a 1‑second chart for a ticker, and when there is volume it works wonderfully.
It’s up to you to check whether it fits the ticker you’re analyzing by testing it on historical data.
Drawback: it takes up screen space. Feel free to improve it.
See a ticker in freefall and wonder whether it’s a good time to buy or if it will keep falling? Switch your chart to 30 minutes and watch for triangles and green circles to start appearing.
You could call it momentum. Your background begins to show color when there is confluence. If it stays black, don’t buy.
Already in the trade and the screen turns black? Sell, and wait for the colors to return before buying back in
📈 Price Crossed Above 50 SMA (One-Time Marker)//@version=5
indicator("📈 Price Above 50 SMA Marker", overlay=true)
// === Calculate 50 SMA ===
sma50 = ta.sma(close, 50)
priceAboveSMA50 = close > sma50
// === Plot the 50 SMA ===
plot(sma50, title="50 SMA", color=color.orange, linewidth=2)
// === Plot Shape When Price Is Above 50 SMA ===
plotshape(
priceAboveSMA50, // condition to trigger
title="Price Above 50 SMA", // tooltip title
location=location.abovebar, // place above candle
color=color.green, // shape color
style=shape.triangleup, // shape style
size=size.small, // size
text="SMA+" // optional label
)
Moving Average Ribbon by AbrarIndicator Description — Moving Average Ribbon (Multi-TF Enhanced)
The Moving Average Ribbon (Enhanced) is a powerful trend-analysis tool that displays up to 7 customizable moving averages along with a Weekly SMA 150 for higher-timeframe confluence. Each MA can be individually configured with length, source, type (SMA/EMA/WMA/SMMA/VWMA), and color.
The script also features automatic labels on the latest bar, allowing traders to instantly identify each moving average on the chart without confusion.
This indicator is designed to help traders:
Visualize trend strength and direction
Spot dynamic support/resistance zones
Identify momentum shifts
Incorporate higher-timeframe confirmation through the Weekly SMA 150
Whether you trade intraday or swing, this ribbon provides a clean and flexible layout to understand market structure at a glance.
自定义时间竖线(北京时间) Custom Time Vertical (Beijing Time)Custom Time Vertical (Beijing Time)
Just use it to find whatever time period you want. HF!
标注出想要的时间段,使对交易时间段敏感的trader复盘更轻松。
Previous 5 Days OHLC + Dates + PricesTitle: Previous 5 Days OHLC Levels (Extended Lines + Labels)
Description:
This indicator automatically plots the Open, High, Low, and Close (OHLC) levels for the previous 5 trading days. Unlike standard daily separators, this tool extends the lines from their historical origin all the way to the current price bar, allowing traders to instantly see how current price action interacts with recent support and resistance levels.
Key Features:
5-Day Lookback: Automatically fetches and plots OHLC data for the last 5 trading sessions.
Extended Lines: Lines extend to the current bar (Right) to visualize immediate Support/Resistance zones.
Smart Labels: Each line is marked with the Day Name, Date, Type (O/H/L/C), and the Exact Price.
Customizable Positioning: Choose to display labels on the Left (start of the day) or the Right (next to current price) to keep your chart clean.
Toggle Visibility: Individually turn on/off Opens, Closes, Highs, or Lows to focus on the data that matters to your strategy.
How to Use:
Trend Analysis: Use previous Highs and Lows to identify potential breakout or breakdown levels.
Range Trading: Identify where price previously opened or closed to find intraday pivots.
Clean Charting: Use the settings to hide labels or specific lines (e.g., hide Opens/Closes to see only the Daily Range).
Settings:
Label Position: Switch between "Left" (historical origin) and "Right" (current price).
Visibility: Checkboxes to show/hide Open, High, Low, Close, and Text Labels.
Style: Fully customizable colors for each level type.
Technical Note: This script is optimized for performance (Pine Script v6). It uses array management and executes drawing logic only on the last bar to minimize resource usage while maintaining real-time accuracy.
Baba-pro EMA Break Sniper This indicator is designed to provide high-precision entries based on the interaction between EMAs, momentum, and clean price breaks.
Instead of relying on traditional EMA crossovers — which are often too slow — this tool focuses on direct EMA breakouts, allowing you to catch moves before most traders even react.
X AVWAP DSOA powerful, non-overlay momentum indicator designed to measure the relationship between current price action and key Volume Weighted Average Price (VWAP) structures. It provides traders with a refined, configurable view of momentum by combining the **magnitude of price separation** with the **trend momentum** of the volume anchor.
---
### Core Calculation and Principle
This oscillator moves beyond simple price-vs-average separation by integrating the momentum (slope) of the volume average itself. The indicator is built around two primary components:
1. **Distance (D):** This is the magnitude of separation, calculated as the difference between the **closing price** and the selected **AVWAP Anchor Source** ($D = \text{Close} - \text{AVWAP}$).
2. **Slope (S):** This represents the **trend momentum** of the VWAP, calculated as the change in the smoothed AVWAP over a defined lookback period.
The final oscillator value is determined by the selected **Combination Method**, giving the user control over how these two factors interact:
* **Addition (Baseline):** The oscillator value is $D + S$. This provides a balanced view where the price separation is slightly adjusted by the VWAP's momentum.
* **Weighted Addition:** The oscillator value is $D + (S \times \text{Weight})$. This is a powerful feature that **allows the user to prioritize the impact of the Slope (trend momentum) over the Distance (magnitude)** using a customizable multiplier called the **Slope Weight**.
---
### Customization and Flexibility
The indicator's value lies in its deep configurability, allowing it to adapt to different trading strategies and timeframes:
* **AVWAP Anchor Source:** You can toggle between two critical VWAP reset structures for context:
* **4H Session VWAP:** Uses fixed, sequential 4-hour VWAP segments (e.g., 18:00, 22:00 NY Time) for tracking short-term structural shifts.
* **Daily AVWAP (ETH 18:00):** Uses a single, continuous VWAP anchored from the Electronic Trading Hours (ETH) open at 18:00 NY Time, providing a broader, sustained volume-weighted average context.
* **VWAP Price Source:** The underlying price used to calculate the VWAP itself is selectable (options include Close, OHLC4, HLC3, Open, High, and Low).
* **Plot Style:** Toggle between a continuous **Line** plot (for tracking fine movements) and a color-coded **Histogram** (for clear magnitude and directional reading, with Blue for positive and Red for negative).
### Trading Application
The AVWAP Distance & Slope Oscillator is a sophisticated tool best used to identify:
* **Zero-Line Crosses:** Signifying price crossing the underlying volume anchor while accounting for the anchor's own momentum.
* **Momentum Confirmation:** A high positive reading indicates price is strongly above the VWAP, and the VWAP itself is actively rising (strong bullish momentum).
* **Filtered Signals:** By adjusting the **Slope Weight** (in the Weighted Addition method), traders can amplify signals when the structural trend (VWAP slope) is strong, helping to filter out minor price fluctuations that occur when the VWAP is relatively flat.
CharisTrend Indicatorthis trading indicator uses the following parameters EMA LOW (25 34 89 110 355 and 480) SMA(14 and 28) and Supertrend(14 3) for trading analysis and BUY/SELL Signals when the trade aligns.
Hull Moving Averages x 4Default Hull Lengths Included
The defaults are:
HMA 14
HMA 35
HMA 55
HMA 89
These are classic Fibonacci-style progression lengths, which work well for trend structure.
SDFADE nuvolébasic script to signal mean reversions and alert fades when stretched to +/-2.5VWAP Standard Deviation
FluxPulse Beacon## FluxPulse Beacon
FluxPulse Beacon applies a microstructure lens to every bar, combining directional thrust, realized volatility, and multi-timeframe liquidity checks to decide whether the tape is being pushed by real sponsorship or just noise. The oscillator's color-coded columns and adaptive burst thresholds transform complex flow dynamics into a single actionable flux score for futures and equities traders.
HOW IT WORKS
Momentum Extraction – Price differentials over a configurable pulse distance are smoothed using exponential moving averages to isolate directional thrust without reacting to single prints.
Volatility + Liquidity Normalization – The momentum stream is divided by realized volatility and multiplied by both local and higher-timeframe EMA volume ratios, ensuring pulses only appear when volatility and liquidity align.
Adaptive Thresholding – A volatility-derived standard deviation of flux is blended with the base threshold so bursts scale automatically between low-volatility and high-volatility market conditions.
Divergence Engine – Linear regression slopes compare price vs. flux to tag bullish/bearish divergences, highlighting stealth accumulation or distribution zones.
HOW TO USE IT
Continuation Entries : Go with the trend when histogram bars stay above the adaptive threshold, the signal line confirms, and trend bias agrees—this is where liquidity-backed follow-through lives.
Fade Plays : Watch for divergence alerts and shrinking compression values; when flux prints below zero yet price grinds higher, hidden selling pressure often precedes rollovers.
Session Filter : Compression percentage in the diagnostics table instantly tells you whether to trade thin overnight sessions—low compression means stand down.
VISUAL FEATURES
Dynamic background heat maps flux magnitude, while threshold lines provide a quick read on whether a pulse is statistically significant.
Diagnostics table displays live flux, signal, adaptive threshold, and compression for quick reference.
Alert-first workflow: The surface is intentionally clean—bursts and divergences are delivered via alerts instead of on-chart clutter.
PARAMETERS
Trend EMA Length (default: 34): Defines the macro bias anchor; increase for higher-timeframe confirmation.
Pulse Distance (default: 8): Controls how sensitive momentum extraction becomes.
Volatility Window (default: 21): Sample window for realized volatility normalization.
Liquidity Window (default: 55): Volume smoothing window that proxies liquidity expansion.
Liquidity Reference TF (default: 60): Select a higher timeframe to cross-check whether current volume matches institutional flows.
Adaptive Threshold (default: enabled): Disable for fixed thresholds on slower markets; enable for high-volatility assets.
Base Burst Threshold (default: 1.25): Minimum flux magnitude that qualifies as an actionable pulse.
ALERTS
The indicator includes four alert conditions:
Bull Burst: Detects upside liquidity pulses
Bear Burst: Detects downside liquidity pulses
Bull Divergence: Flags bullish delta divergence
Bear Divergence: Flags bearish delta divergence
LIMITATIONS
This indicator is designed for liquid futures and equity markets. Performance may degrade in low-volume or highly illiquid instruments. The adaptive threshold system works best on timeframes where sufficient volatility history exists (typically 15-minute charts and above). Divergence signals are probabilistic and should be confirmed with price action.
INSERT_CHART_SNAPSHOT_URL_HERE
---
## RangeLattice Mapper
RangeLattice Mapper constructs a higher-timeframe scaffolding on any intraday chart, locking in structural highs/lows, mid/quarter grids, VWAP confluence, and live acceptance/break analytics. It provides a non-repainting overlay that turns range management into a disciplined process.
HOW IT WORKS
Structure Harvesting – Using request.security() , the script samples highs/lows from a user-selected timeframe (default 240 minutes) over a configurable lookback to establish the dominant range.
Grid Construction – Midpoint and quarter levels are derived mathematically, mirroring how institutional traders map distribution/accumulation zones.
Acceptance Detection – Consecutive closes inside the range flip an acceptance flag and darken the cloud, signaling balanced auction conditions.
Break Confirmation – Multi-bar closes outside the structure raise break labels and alerts, filtering the countless fake-outs that plague breakout traders.
VWAP Fan Overlay – Session VWAP plus ATR-based bands provide a live measure of flow centering relative to the lattice.
HOW TO USE IT
Range Plays : Fade taps of the outer rails only when acceptance is active and VWAP sits inside the grid—this is where mean-reversion works best.
Breakout Plays : Wait for confirmed break labels before entering expansion trades; the dashboard's Width/ATR metric tells you if the expansion has enough fuel.
Market Prep : Carry the same lattice from pre-market into regular trading hours by keeping the structure timeframe fixed; alerts keep you notified even when managing multiple tickers.
VISUAL FEATURES
Range Tap and Mid Pivot markers provide a tape-reading breadcrumb trail for journaling.
Cloud fill opacity tightens when acceptance persists, visually signaling balance compressions ready to break.
Dashboard displays absolute width, ATR-normalized width, and current state (Balanced vs Transitional) so you can glance across charts quickly.
Acceptance Flag toggle: Keep the repeated acceptance squares hidden until you need to audit balance.
PARAMETERS
Structure Timeframe (default: 240): Choose the timeframe whose ranges matter most (4H for indices, Daily for stocks).
Structure Lookback (default: 60): Bars sampled on the structure timeframe.
Acceptance Bars (default: 8): How many consecutive bars inside the range confirm balance.
Break Confirmation Bars (default: 3): Bars required outside the range to validate a breakout.
ATR Reference (default: 14): ATR period for width normalization.
Show Midpoint Grid (default: enabled): Display the midpoint and quarter levels.
Show Adaptive VWAP Fan (default: enabled): Toggle the VWAP channel for assets where volume distribution matters most.
Show Acceptance Flags (default: disabled): Turn the acceptance markers on/off for maximum visual control.
Show Range Dashboard (default: enabled): Disable if screen space is limited, re-enable during prep sessions.
ALERTS
The indicator includes five alert conditions:
Range High Tap: Price interacted with the RangeLattice high
Range Low Tap: Price interacted with the RangeLattice low
Range Mid Tap: Price interacted with the RangeLattice mid
Range Break Up: Confirmed upside breakout
Range Break Down: Confirmed downside breakout
LIMITATIONS
This indicator works best on liquid instruments with clear structural levels. On very low timeframes (1-minute and below), the structure may update too frequently to be useful. The acceptance/break confirmation system requires patience—faster traders may find the multi-bar confirmation too slow for scalping. The VWAP fan is session-based and resets daily, which may not suit all trading styles.
---
Evergito HH/LL 3 Señales + ATR SLHow to trade with the Evergito HH/LL 3 Signals + ATR SL indicator? Brief and direct explanation: General system logic: The indicator looks for actual breakouts of the high/low of the last 20 bars (HH/LL) and combines them with the position relative to the 200 SMA to filter the underlying trend. You have 3 types of signals that you can activate/deactivate separately: Signal
When it appears
What it means in practice
Entry type
V1
HH breakout + the close crosses above the 200 SMA (or the opposite in a short position)
Very safe entry confirmed. The price has just validated the long/flat trend → safer and with a better ratio
The most reliable (the original)
V2
HH breakout but the price was already above the 200 SMA (or already below in a short position)
Entry in an already established trend. Fewer “surprises”, more continuity
Ideal for strong trends
V3
Only the breakout of the HH or LL, without looking at the 200 SMA
Aggressive entry/scalping on explosive breakouts. More signals, more noise.
For times of high volatility.
How to enter the market (simple rule): Wait for any of the 3 labels (V1, V2, or V3) to appear, depending on which ones you have activated.
Enter at the close of that candle (or at the open of the next one if you are conservative).
Automatic Stop Loss → the blue (long) or yellow (short) line that represents the ATR x2.
Take Profit → you decide, but the indicator already gives you the visual reference for the risk (ATR x2), so 1:2 or 1:3 is usually very convenient.
Practical example: You see a large green label “HH LONG V1” → you go long at the close of that candle. Stop right at the blue line (ATR x2 below the price).
Typical target: 2x or 3x the risk (very common to reach it in a trend).
Recommended use: Most traders leave only V1 activated → fewer signals but very high quality.
Those who trade intraday or crypto usually combine V1 + V2.
V3 only for news events or very volatile openings.
In summary:
Label = immediate entry
Blue/yellow line = automatic stop
And enjoy the move.
RSI + MACD Day Trading Toolkit//@version=6
indicator("RSI + MACD Day Trading Toolkit", overlay = true)
//──────────────────────────────────────────────────────────────────────────────
// 1. INPUTS
//──────────────────────────────────────────────────────────────────────────────
// RSI settings
rsiLength = input.int(14, "RSI Length")
rsiOverbought = input.float(70, "RSI Overbought Level", minval = 50, maxval = 100)
rsiOversold = input.float(30, "RSI Oversold Level", minval = 0, maxval = 50)
// MACD settings (classic 12 / 26 / 9)
macdFastLength = input.int(12, "MACD Fast Length")
macdSlowLength = input.int(26, "MACD Slow Length")
macdSignalLength = input.int(9, "MACD Signal Length")
// Risk model selection
riskModel = input.string("ATR", "Risk Model", options = )
// ATR-based SL/TP
atrLength = input.int(14, "ATR Length")
atrSLMult = input.float(1.5, "SL ATR Multiplier", minval = 0.1, step = 0.1)
atrTPMult = input.float(2.5, "TP ATR Multiplier", minval = 0.1, step = 0.1)
// Percent-based SL/TP (for scalping on very tight spreads)
slPercent = input.float(0.5, "SL % (when Risk Model = Percent)", minval = 0.05, step = 0.05)
tpPercent = input.float(1.0, "TP % (when Risk Model = Percent)", minval = 0.05, step = 0.05)
// Visual / styling
showSLTPLines = input.bool(true, "Plot Stop Loss / Take Profit Lines")
//──────────────────────────────────────────────────────────────────────────────
// 2. CORE INDICATORS: RSI & MACD
//──────────────────────────────────────────────────────────────────────────────
rsiValue = ta.rsi(close, rsiLength)
// Manual MACD calculation (avoids tuple unpacking issues)
macdFastEMA = ta.ema(close, macdFastLength)
macdSlowEMA = ta.ema(close, macdSlowLength)
macdValue = macdFastEMA - macdSlowEMA
macdSignal = ta.ema(macdValue, macdSignalLength)
macdHist = macdValue - macdSignal
atrValue = ta.atr(atrLength)
// Hide internal plots from price scale (still accessible if you change display)
plot(rsiValue, "RSI", display = display.none)
plot(macdValue, "MACD", display = display.none)
plot(macdSignal, "MACD Sig", display = display.none)
plot(macdHist, "MACD Hist", display = display.none)
//──────────────────────────────────────────────────────────────────────────────
// 3. SIGNAL LOGIC (ENTRY CONDITIONS)
//──────────────────────────────────────────────────────────────────────────────
//
// Idea:
// - LONG bias: RSI emerges from oversold AND MACD crosses above signal below zero
// - SHORT bias: RSI falls from overbought AND MACD crosses below signal above zero
//
// Combines momentum (RSI) with trend confirmation (MACD).
//──────────────────────────────────────────────────────────────────────────────
// RSI events
rsiBullCross = ta.crossover(rsiValue, rsiOversold) // RSI crosses UP out of oversold
rsiBearCross = ta.crossunder(rsiValue, rsiOverbought) // RSI crosses DOWN from overbought
// MACD crossover with trend filter
macdBullCross = ta.crossover(macdValue, macdSignal) and macdValue < 0 // Bullish cross below zero-line
macdBearCross = ta.crossunder(macdValue, macdSignal) and macdValue > 0 // Bearish cross above zero-line
// Raw (ungated) entry signals
rawLongSignal = rsiBullCross and macdBullCross
rawShortSignal = rsiBearCross and macdBearCross
//──────────────────────────────────────────────────────────────────────────────
// 4. STATE MANAGEMENT (SIMULATED POSITION TRACKING)
//──────────────────────────────────────────────────────────────────────────────
//
// position: 1 = long
// -1 = short
// 0 = flat
//
// We track entry price and SL/TP levels as if this were a strategy.
// This is still an indicator – it just computes and plots the logic.
//──────────────────────────────────────────────────────────────────────────────
var int position = 0
var float longEntryPrice = na
var float shortEntryPrice = na
var float longSL = na
var float longTP = na
var float shortSL = na
var float shortTP = na
// Per-bar flags (for plotting / alerts)
var bool longEntrySignal = false
var bool shortEntrySignal = false
var bool longExitSignal = false
var bool shortExitSignal = false
// Reset per-bar flags each bar
longEntrySignal := false
shortEntrySignal := false
longExitSignal := false
shortExitSignal := false
//──────────────────────────────────────────────────────────────────────────────
// 5. EXIT LOGIC (STOP LOSS / TAKE PROFIT / OPPOSITE SIGNAL)
//──────────────────────────────────────────────────────────────────────────────
//
// Exits are evaluated BEFORE new entries on each bar.
//──────────────────────────────────────────────────────────────────────────────
// Stop-loss / take-profit hits for existing positions
longStopHit = position == 1 and not na(longSL) and low <= longSL
longTakeHit = position == 1 and not na(longTP) and high >= longTP
shortStopHit = position == -1 and not na(shortSL) and high >= shortSL
shortTakeHit = position == -1 and not na(shortTP) and low <= shortTP
// Opposite signals can also close positions
reverseToShort = position == 1 and rawShortSignal
reverseToLong = position == -1 and rawLongSignal
// Combine exit conditions
longExitNow = longStopHit or longTakeHit or reverseToShort
shortExitNow = shortStopHit or shortTakeHit or reverseToLong
// Register exits and flatten position
if longExitNow and position == 1
longExitSignal := true
position := 0
longEntryPrice := na
longSL := na
longTP := na
if shortExitNow and position == -1
shortExitSignal := true
position := 0
shortEntryPrice := na
shortSL := na
shortTP := na
//──────────────────────────────────────────────────────────────────────────────
// 6. ENTRY LOGIC WITH RISK MODEL (SL/TP CALCULATION)
//──────────────────────────────────────────────────────────────────────────────
//
// Only take a new trade when flat.
// SL/TP are calculated relative to entry price using either ATR or Percent.
//──────────────────────────────────────────────────────────────────────────────
if position == 0
// Long entry
if rawLongSignal
position := 1
longEntryPrice := close
if riskModel == "ATR"
longSL := longEntryPrice - atrValue * atrSLMult
longTP := longEntryPrice + atrValue * atrTPMult
else // Percent model
longSL := longEntryPrice * (1.0 - slPercent / 100.0)
longTP := longEntryPrice * (1.0 + tpPercent / 100.0)
longEntrySignal := true
// Short entry
else if rawShortSignal
position := -1
shortEntryPrice := close
if riskModel == "ATR"
shortSL := shortEntryPrice + atrValue * atrSLMult
shortTP := shortEntryPrice - atrValue * atrTPMult
else // Percent model
shortSL := shortEntryPrice * (1.0 + slPercent / 100.0)
shortTP := shortEntryPrice * (1.0 - tpPercent / 100.0)
shortEntrySignal := true
//──────────────────────────────────────────────────────────────────────────────
// 7. PLOTTING: ENTRIES, EXITS, STOPS & TARGETS
//──────────────────────────────────────────────────────────────────────────────
// Entry markers
plotshape(longEntrySignal, title = "Long Entry", style = shape.triangleup, location = location.belowbar, color = color.new(color.lime, 0), size = size.small, text = "LONG")
plotshape(shortEntrySignal, title = "Short Entry", style = shape.triangledown, location = location.abovebar, color = color.new(color.red, 0), size = size.small, text = "SHORT")
// Exit markers (generic exits: SL, TP or reversal)
plotshape(longExitSignal, title = "Long Exit", style = shape.xcross, location = location.abovebar, color = color.new(color.orange, 0), size = size.tiny, text = "LX")
plotshape(shortExitSignal, title = "Short Exit", style = shape.xcross, location = location.belowbar, color = color.new(color.orange, 0), size = size.tiny, text = "SX")
// Optional: show SL/TP levels on chart while in position
plot(showSLTPLines and position == 1 ? longSL : na, title = "Long Stop Loss", style = plot.style_linebr, color = color.new(color.red, 0), linewidth = 1)
plot(showSLTPLines and position == 1 ? longTP : na, title = "Long Take Profit", style = plot.style_linebr, color = color.new(color.lime, 0), linewidth = 1)
plot(showSLTPLines and position == -1 ? shortSL : na, title = "Short Stop Loss", style = plot.style_linebr, color = color.new(color.red, 0), linewidth = 1)
plot(showSLTPLines and position == -1 ? shortTP : na, title = "Short Take Profit", style = plot.style_linebr, color = color.new(color.lime, 0), linewidth = 1)
//──────────────────────────────────────────────────────────────────────────────
// 8. ALERT CONDITIONS
//──────────────────────────────────────────────────────────────────────────────
//
// Configure TradingView alerts using these conditions.
//──────────────────────────────────────────────────────────────────────────────
// Entry alerts
alertcondition(longEntrySignal, title = "Long Entry (RSI+MACD)", message = "RSI+MACD: Long entry signal")
alertcondition(shortEntrySignal, title = "Short Entry (RSI+MACD)", message = "RSI+MACD: Short entry signal")
// Exit alerts (by type: SL vs TP vs reversal)
alertcondition(longStopHit, title = "Long Stop Loss Hit", message = "RSI+MACD: Long STOP LOSS hit")
alertcondition(longTakeHit, title = "Long Take Profit Hit", message = "RSI+MACD: Long TAKE PROFIT hit")
alertcondition(shortStopHit, title = "Short Stop Loss Hit", message = "RSI+MACD: Short STOP LOSS hit")
alertcondition(shortTakeHit, title = "Short Take Profit Hit", message = "RSI+MACD: Short TAKE PROFIT hit")
alertcondition(reverseToShort, title = "Long Exit by Reverse Signal", message = "RSI+MACD: Long exit by SHORT reverse signal")
alertcondition(reverseToLong, title = "Short Exit by Reverse Signal", message = "RSI+MACD: Short exit by LONG reverse signal")
//──────────────────────────────────────────────────────────────────────────────
// 9. QUICK USAGE NOTES
//──────────────────────────────────────────────────────────────────────────────
//
// - Indicador, não estratégia: ele simula posição, SL/TP e sinais de saída.
// - Para backtest/auto, basta portar a mesma lógica para um script `strategy()`
// usando `strategy.entry` e `strategy.exit`.
// - Em day trade, teste ATR vs Percent e ajuste os multiplicadores ao ativo.
//──────────────────────────────────────────────────────────────────────────────
MACD Zero-Line Dominance (no ta.sum)Description Option 1 (Simple & Clear)
“This indicator compares how many recent bars have the MACD line above the zero line versus below it.
It plots the resulting strength as a green/red histogram showing whether bullish or bearish momentum is dominating.”
“MACD Zero-Line Dominance measures the strength balance between bullish and bearish momentum by counting how many candles in a lookback period have MACD above or below the zero line.
The histogram turns green when bullish pressure dominates and red when bearish momentum takes control.
Useful for trend confirmation, regime detection, and higher-timeframe alignment.”
Day Range with OHLC LabelsThis indicator creates a synthetic daily candlestick that appears to the right of the chart, visually separated from real price bars.
It helps traders quickly view each day’s High, Low, Open, and Close without zooming, scrolling, or switching to higher timeframes.
What This Tool Does
✔ Draws a floating daily candle to the right of the current chart
✔ Displays the true Daily Open, High, Low, and Close
✔ Shows a center-aligned wick representing the full high-low range
✔ Shows a box-style candle body positioned using real OHLC values
✔ Labels the values (O, H, L, C) with large, clear fonts
✔ Automatically updates at each new day
✔ Works on any timeframe
✔ Helps intraday traders track daily structure visually
Why This Indicator Is Useful
This script is ideal for intraday traders who want instant awareness of the current day’s range.
Instead of guessing or drawing manual lines, you get a clean daily candlestick rendered off to the right side, avoiding chart clutter.
Great for:
Range traders
Breakout traders
Liquidity zone analysis
High/Low reference tracking
Traders who prefer non-intrusive visuals
Customization
Adjustable offset: position the candle further right
Configurable colors for wick + body
Large-font labels for easy reading
Automatically clears and redraws cleanly each day
Summary
This tool creates a clear, minimalistic, right-side daily candlestick complete with OHLC labels and centralized wick.
It’s designed to improve chart clarity and support quick decision-making without blocking price candles.
EXPLOSION Scanner v1 - Sudden Spike Hunter//@version=5
indicator("EXPLOSION ENTRY v1 - 5Day Swing Breakout Scanner", overlay=true)
// ===============================
// 입력값
// ===============================
lenBB = input.int(20, "BB Length")
multBB = input.float(2.0, "BB StdDev")
lenVolMA = input.int(20, "Volume MA Length")
volMult = input.float(1.8, "Volume Explosion Mult")
lenATR = input.int(14, "ATR Length")
atrThresh= input.float(3.0, "ATR % Threshold")
needBull = input.int(4, "최근 5봉 중 최소 양봉 개수", minval=1, maxval=5)
// ===============================
// Bollinger Band
// ===============================
basis = ta.sma(close, lenBB)
dev = ta.stdev(close, lenBB)
upper = basis + dev * multBB
lower = basis - dev * multBB
plot(upper, "BB Upper", display=display.none)
plot(basis, "BB Basis", display=display.none)
plot(lower, "BB Lower", display=display.none)
// ===============================
// Volume Explosion
// ===============================
volMA = ta.sma(volume, lenVolMA)
volCond = volume > volMA * volMult
// ===============================
// 5-Day Candle Strength (최근 5봉 양봉 개수)
// ===============================
bullCount = (close > open ? 1 : 0) +
(close > open ? 1 : 0) +
(close > open ? 1 : 0) +
(close > open ? 1 : 0) +
(close > open ? 1 : 0)
candleCond = bullCount >= needBull
// ===============================
// ATR Volatility Filter
// ===============================
atrValue = ta.atr(lenATR)
atrRate = atrValue / close * 100.0
volatilityCond = atrRate > atrThresh
// ===============================
// Trend Filter (기본 추세)
// ===============================
trendCond = close > basis
// ===============================
// 최종 매수 조건
// ===============================
buyCond = trendCond and volCond and candleCond and volatilityCond
// ===============================
// BUY 신호 표시
// ===============================
plotshape(
buyCond,
title = "BUY Signal",
style = shape.triangleup,
location = location.belowbar,
size = size.small,
text = "BUY",
textcolor = color.white
)
// ===============================
// 알림(Alert)
// ===============================
alertcondition(
buyCond,
title = "EXPLOSION BUY",
message = "EXPLOSION ENTRY v1 : BUY SIGNAL 발생"
)






















