インジケーター

インジケーター

Penny stocks Pro Execution (15m & 1H HTF)🚀 Penny Stock Pro Execution (15m & 1H HTF Confluence)
📌 Overview
Penny stocks and low-float momentum plays rarely follow classic macro trends. Instead, they operate on violent spikes followed by rapid decay. Traditional trend-following strategies fail on these assets because by the time a higher timeframe trend is "confirmed," the move is already over and smart money is dumping into late buyers.
Penny Stock Pro Execution is purpose-built for intraday momentum execution (ideal on 5m to 15m charts while pulling non-repainting multi-timeframe data from 15m and 1H). It pinpoints precision entries at the exact micro-inflection point right as volume pours in, then equips you with automatic ATR risk structures to lock in profits before the spike dies.
⚡ The Penny Stock Dilemma: "Spike & Die" Dynamics
Unlike large-cap stocks that trend smoothly, penny stocks are driven by short squeezes, news catalysts, and liquidity grabs. They follow a distinct lifecycle:
* Accumulation / Compression: Low-volume consolidation near dynamic support.
* The Liquidity Spike: A sudden burst of volume causing an explosive move across 1–3 candles.
* The Distribution Decay: High-volume rejection, micro-structure break, and rapid dump back to baseline.
This script solves two crucial problems when trading these patterns:
* Prevents Chasing Top-of-Spike Moves: Uses strict HTF Extension Filters to block long signals when price is already stretched too far above the baseline.
* Captures Early Inflections: Combines Volume-Backed Pinbar Rejections and Micro Market Structure Shifts (MSS/CHoCH) on the lower timeframe to fire entries before the main move unfolds.
🔑 Key Features & Logic Breakdown
1. Non-Repainting Multi-Timeframe HUD (15m & 1H)
* Tracks higher timeframe EMA alignment, RSI momentum, ADX strength, and the last 6 candles using barmerge.gaps_on and lookahead_off to guarantee zero repainting.
2. Multi-Factor Confluence Scoring (1–6 Scale)
Signals are evaluated through a 6-point checklist. A setup must achieve a minimum confluence score of 4/6 to trigger an entry:
* HTF Trend Stack Alignment (1H alignment)
* HTF Mean-Reversion / Pullback Check (Ensures you aren't buying the absolute peak)
* 15m Trend Support
* 1H RSI Safety Gate (Filters out exhausted setups)
* Relative Volume Spike (\eg 1.2\times average volume)
* 5m RSI In-Zone Check
3. Dynamic Micro-Structure Trigger Logic
The script looks for one of two localized entry triggers:
* Volume-Backed Pinbar Rejections: Identifies high-wick candle rejections (\ge 40\% total range and 2\times body size) occurring at recent 8-candle extremes.
* Micro Market Structure Shifts (MSS): Confirms structural break of recent swing highs/lows on close basis.
4. Automated Risk Management Projection
Upon signal execution, the indicator dynamically projects horizontal level markers directly on the chart:
* Entry Line (White)
* Stop Loss (SL): ATR-based dynamic risk placement (Default: 1.5\times \text{ATR})
* Take Profit 1 & 2 (TP1 / TP2): 1.0\times and 2.0\times \text{ATR} targets to secure gains before the inevitable decay.
🛠️ How to Trade This Script
│
▼
───► 🚀 ENTRY SIGNAL FIRED (Score >= 4)
│
├──────► Take Profit 1 (1.0x ATR) ──► Scale out 50% & set SL to Entry
│
└──────► Take Profit 2 (2.0x ATR) ──► Fully exit before "Die" phase
* Chart Setup: Apply script to a 5-minute chart (or 3-minute for fast momentum plays).
* Wait for Signal: Look for a green LONG or red SHORT triangle supported by a score label on the TP2 line.
* Execution Rules:
* TP1 (1.0\times \text{ATR}): Sell 50% of position immediately. Move Stop Loss to breakeven.
* TP2 (2.0\times \text{ATR}): Clear out the remaining position. Do not hold penny stocks hoping for a overnight hold unless HTF is breaking out with unprecedented volume.
⚙️ Recommended Inputs
* Medium Timeframe: 15
* Higher Timeframe: 60 (1H)
* HTF Extension Threshold: 1.5% (Adjust higher for extreme low-float runners)
* Relative Vol Multiplier: 1.2x - 1.5x
Disclaimer: Penny stocks carry high volatility and slippage risk. This script is designed for momentum scalping and active intraday risk management. Always trade with strict stop losses. インジケーター

インジケーター

インジケーター

Combined Breaker Blocks with Imbalance Filter//@version=6
indicator("Combined Breaker Blocks with Imbalance Filter", shorttitle = "Combined Breakers + Imbalance", overlay = true, behind_chart = false, max_boxes_count = 500, max_lines_count = 500, max_labels_count = 500, max_bars_back = 5000)
import TradingView/ta/12
// ============================================================================
// BỘ LỌC IMBALANCE (FVG)
// ============================================================================
grp_imb = "Bộ Lọc Imbalance (FVG)"
useImbalanceFilter = input.bool(true, title = "Chỉ giữ OB có Imbalance (FVG)", group = grp_imb, tooltip = "Lọc bỏ những vùng OB/Breaker không có khoảng trống giá Imbalance xung quanh.")
// Hàm kiểm tra Imbalance
f_has_imbalance_bull() =>
// Bullish Imbalance (FVG Tăng): Giá cao nhất cây 2 thanh trước thấp hơn giá thấp nhất cây hiện tại
(high < low) or (high < low ) or (high < low)
f_has_imbalance_bear() =>
// Bearish Imbalance (FVG Giảm): Giá thấp nhất cây 2 thanh trước cao hơn giá cao nhất cây hiện tại
(low > high) or (low > high ) or (low > high)
// ============================================================================
// SECTION 1: ALGOALPHA BREAKER BLOCKS
// ============================================================================
// --- Inputs (AlgoAlpha) ---
preventOverlap = input.bool(true, title = "Prevent Overlap", group = "AlgoAlpha - Calculation", tooltip = "When enabled, new orderblocks will not be created if their price range overlaps any existing active orderblock.")
zLen = input.int(100, title = "Z-Score Window (bars)", minval = 1, group = "AlgoAlpha - Calculation", tooltip = "Lookback window used to normalize the impulse distance into a z-score.")
maxAge = input.int(500, title = "Max Box Age (bars)", minval = 1, group = "AlgoAlpha - Calculation", tooltip = "Maximum lifetime (in bars) of an orderblock that has not been mitigated.")
bullCol = input.color(#00ffbb, title = "Bullish Colour", group = "AlgoAlpha - Appearance", tooltip = "Color used for bullish breaker zones and bullish signals.")
bearCol = input.color(#ff1100, title = "Bearish Colour", group = "AlgoAlpha - Appearance", tooltip = "Color used for bearish breaker zones and bearish signals.")
// --- Calculations (AlgoAlpha) ---
var updist = 0.0
var downdist = 0.0
updist := close > open ? nz(updist ) + (close - open) : 0.0
downdist := close < open ? nz(downdist ) + (open - close) : 0.0
upMean = ta.sma(updist, zLen)
upStdev = ta.stdev(updist, zLen)
dnMean = ta.sma(downdist, zLen)
dnStdev = ta.stdev(downdist, zLen)
zUp = (updist - upMean) / (upStdev == 0.0 ? na : upStdev)
zDn = (downdist - dnMean) / (dnStdev == 0.0 ? na : dnStdev)
// Bổ sung lọc Imbalance cho tín hiệu AlgoAlpha
bullish = ta.crossover(zUp, 4) and nz(zUp ) != 0 and (not useImbalanceFilter or f_has_imbalance_bull())
bearish = ta.crossunder(-zDn, -4) and nz((-zDn) ) != 0 and (not useImbalanceFilter or f_has_imbalance_bear())
var box bullBoxes = array.new()
var box bearBoxes = array.new()
var int bullStarts = array.new_int()
var int bearStarts = array.new_int()
var line bullMidLines = array.new()
var line bearMidLines = array.new()
var box breakerBullBoxes = array.new()
var box breakerBearBoxes = array.new()
var int breakerBullStarts = array.new_int()
var int breakerBearStarts = array.new_int()
var line breakerBullMidLines = array.new()
var line breakerBearMidLines = array.new()
breakerBullPlot = float(na)
breakerBearPlot = float(na)
rejectBullPlot = float(na)
rejectBearPlot = float(na)
f_can_create(float tNew, float bNew) =>
bool ok = true
if bullBoxes.size() > 0
for j = 0 to array.size(bullBoxes) - 1
exB = array.get(bullBoxes, j)
float exTop = box.get_top(exB)
float exBot = box.get_bottom(exB)
if (tNew > exBot) and (bNew < exTop)
ok := false
break
if ok and bearBoxes.size() > 0
for j = 0 to array.size(bearBoxes) - 1
exS = array.get(bearBoxes, j)
float exTop2 = box.get_top(exS)
float exBot2 = box.get_bottom(exS)
if (tNew > exBot2) and (bNew < exTop2)
ok := false
break
if ok and breakerBullBoxes.size() > 0
for j = 0 to array.size(breakerBullBoxes) - 1
exB = array.get(breakerBullBoxes, j)
float exTop = box.get_top(exB)
float exBot = box.get_bottom(exB)
if (tNew > exBot) and (bNew < exTop)
ok := false
break
if ok and breakerBearBoxes.size() > 0
for j = 0 to array.size(breakerBearBoxes) - 1
exS = array.get(breakerBearBoxes, j)
float exTop2 = box.get_top(exS)
float exBot2 = box.get_bottom(exS)
if (tNew > exBot2) and (bNew < exTop2)
ok := false
break
ok
f_can_create_breaker(float tNew, float bNew) =>
f_can_create(tNew, bNew)
lastDownIdx = ta.valuewhen(close < open, bar_index, 0)
lastDownHigh = ta.valuewhen(close < open, high, 0)
lastDownLow = ta.valuewhen(close < open, low, 0)
breakerBullPlot := na
breakerBearPlot := na
rejectBullPlot := na
rejectBearPlot := na
if bullish and not na(lastDownIdx) and not na(lastDownHigh) and not na(lastDownLow)
if not preventOverlap or f_can_create(lastDownHigh, lastDownLow)
float midYB = (lastDownHigh + lastDownLow) / 2.0
bx = box.new(lastDownIdx, lastDownHigh, lastDownIdx + 1, lastDownLow, border_color = color.new(color.gray, 40), bgcolor = color.new(color.gray, 85))
ln = line.new(x1 = lastDownIdx, y1 = midYB, x2 = lastDownIdx + 1, y2 = midYB, xloc = xloc.bar_index, extend = extend.none, color = color.new(color.gray, 40), style = line.style_dashed, width = 1)
array.unshift(bullBoxes, bx)
array.unshift(bullStarts, lastDownIdx)
array.unshift(bullMidLines, ln)
lastUpIdx = ta.valuewhen(close > open, bar_index, 0)
lastUpHigh = ta.valuewhen(close > open, high, 0)
lastUpLow = ta.valuewhen(close > open, low, 0)
if bearish and not na(lastUpIdx) and not na(lastUpHigh) and not na(lastUpLow)
if not preventOverlap or f_can_create(lastUpHigh, lastUpLow)
float midYS = (lastUpHigh + lastUpLow) / 2.0
bx2 = box.new(lastUpIdx, lastUpHigh, lastUpIdx + 1, lastUpLow, border_color = color.new(color.gray, 40), bgcolor = color.new(color.gray, 85))
ln2 = line.new(x1 = lastUpIdx, y1 = midYS, x2 = lastUpIdx + 1, y2 = midYS, xloc = xloc.bar_index, extend = extend.none, color = color.new(color.gray, 40), style = line.style_dashed, width = 1)
array.unshift(bearBoxes, bx2)
array.unshift(bearStarts, lastUpIdx)
array.unshift(bearMidLines, ln2)
if bullBoxes.size() > 0
for i = array.size(bullBoxes) - 1 to 0
if array.size(bullBoxes) <= i or array.size(bullStarts) <= i
continue
b = array.get(bullBoxes, i)
box.set_right(b, bar_index)
if array.size(bullMidLines) > i
ln = array.get(bullMidLines, i)
float topB = box.get_top(b)
float botB = box.get_bottom(b)
float midY = (topB + botB) / 2.0
int leftX = box.get_left(b)
line.set_x1(ln, leftX)
line.set_x2(ln, bar_index)
line.set_y1(ln, midY)
line.set_y2(ln, midY)
float topB = box.get_top(b)
float botB = box.get_bottom(b)
bool mitigatedB = close < botB and close < botB
int startB = array.get(bullStarts, i)
bool expiredB = (bar_index - startB) >= maxAge
if mitigatedB or expiredB
bool makeBreaker = mitigatedB
array.remove(bullBoxes, i)
array.remove(bullStarts, i)
if array.size(bullMidLines) > i
array.remove(bullMidLines, i)
if makeBreaker and (not preventOverlap or f_can_create_breaker(topB, botB))
float midYB = (topB + botB) / 2.0
int leftX = bar_index
bxBr = box.new(leftX, topB, leftX + 1, botB, border_color = color.new(bearCol, 40), bgcolor = color.new(bearCol, 85))
lnBr = line.new(x1 = leftX, y1 = midYB, x2 = leftX + 1, y2 = midYB, xloc = xloc.bar_index, extend = extend.none, color = color.new(bearCol, 40), style = line.style_dashed, width = 1)
array.unshift(breakerBearBoxes, bxBr)
array.unshift(breakerBearStarts, leftX)
array.unshift(breakerBearMidLines, lnBr)
breakerBearPlot := topB
if bearBoxes.size() > 0
for i = array.size(bearBoxes) - 1 to 0
if array.size(bearBoxes) <= i or array.size(bearStarts) <= i
continue
b = array.get(bearBoxes, i)
box.set_right(b, bar_index)
if array.size(bearMidLines) > i
ln = array.get(bearMidLines, i)
float topS = box.get_top(b)
float botS = box.get_bottom(b)
float midY = (topS + botS) / 2.0
int leftX = box.get_left(b)
line.set_x1(ln, leftX)
line.set_x2(ln, bar_index)
line.set_y1(ln, midY)
line.set_y2(ln, midY)
float topS = box.get_top(b)
float botS = box.get_bottom(b)
bool mitigatedS = close > topS and close > topS
int startS = array.get(bearStarts, i)
bool expiredS = (bar_index - startS) >= maxAge
if mitigatedS or expiredS
bool makeBreaker = mitigatedS
array.remove(bearBoxes, i)
array.remove(bearStarts, i)
if array.size(bearMidLines) > i
array.remove(bearMidLines, i)
if makeBreaker and (not preventOverlap or f_can_create_breaker(topS, botS))
float midYS = (topS + botS) / 2.0
int leftX = bar_index
bxBr = box.new(leftX, topS, leftX + 1, botS, border_color = color.new(bullCol, 40), bgcolor = color.new(bullCol, 85))
lnBr = line.new(x1 = leftX, y1 = midYS, x2 = leftX + 1, y2 = midYS, xloc = xloc.bar_index, extend = extend.none, color = color.new(bullCol, 40), style = line.style_dashed, width = 1)
array.unshift(breakerBullBoxes, bxBr)
array.unshift(breakerBullStarts, leftX)
array.unshift(breakerBullMidLines, lnBr)
breakerBullPlot := botS
if breakerBullBoxes.size() > 0
for i = array.size(breakerBullBoxes) - 1 to 0
if array.size(breakerBullBoxes) <= i or array.size(breakerBullStarts) <= i
continue
b = array.get(breakerBullBoxes, i)
box.set_right(b, bar_index)
if array.size(breakerBullMidLines) > i
ln = array.get(breakerBullMidLines, i)
float topB = box.get_top(b)
float botB = box.get_bottom(b)
float midY = (topB + botB) / 2.0
int leftX = box.get_left(b)
line.set_x1(ln, leftX)
line.set_x2(ln, bar_index)
line.set_y1(ln, midY)
line.set_y2(ln, midY)
float topB = box.get_top(b)
float botB = box.get_bottom(b)
bool mitigatedB = close < botB and close < botB
int startB = array.get(breakerBullStarts, i)
bool expiredB = (bar_index - startB) >= maxAge
if not mitigatedB and not expiredB and high > botB and low < topB and close > topB
float pad = math.max(math.abs(topB - botB) * 0.1, syminfo.mintick * 2)
rejectBullPlot := botB - pad
if mitigatedB or expiredB
array.remove(breakerBullBoxes, i)
array.remove(breakerBullStarts, i)
if array.size(breakerBullMidLines) > i
array.remove(breakerBullMidLines, i)
if breakerBearBoxes.size() > 0
for i = array.size(breakerBearBoxes) - 1 to 0
if array.size(breakerBearBoxes) <= i or array.size(breakerBearStarts) <= i
continue
b = array.get(breakerBearBoxes, i)
box.set_right(b, bar_index)
if array.size(breakerBearMidLines) > i
ln = array.get(breakerBearMidLines, i)
float topS = box.get_top(b)
float botS = box.get_bottom(b)
float midY = (topS + botS) / 2.0
int leftX = box.get_left(b)
line.set_x1(ln, leftX)
line.set_x2(ln, bar_index)
line.set_y1(ln, midY)
line.set_y2(ln, midY)
float topS = box.get_top(b)
float botS = box.get_bottom(b)
bool mitigatedS = close > topS and close > topS
int startS = array.get(breakerBearStarts, i)
bool expiredS = (bar_index - startS) >= maxAge
if not mitigatedS and not expiredS and high > botS and low < topS and close < botS
float pad = math.max(math.abs(topS - botS) * 0.1, syminfo.mintick * 2)
rejectBearPlot := topS + pad
if mitigatedS or expiredS
array.remove(breakerBearBoxes, i)
array.remove(breakerBearStarts, i)
if array.size(breakerBearMidLines) > i
array.remove(breakerBearMidLines, i)
// --- Plots (AlgoAlpha) ---
breakerBullFormed = not na(breakerBullPlot)
breakerBearFormed = not na(breakerBearPlot)
rejectBull = not na(rejectBullPlot)
rejectBear = not na(rejectBearPlot)
plotshape(breakerBullPlot, "Bullish Breaker ", shape.labelup, location.absolute, bullCol, size = size.tiny, text = "▲", textcolor = chart.fg_color)
plotshape(breakerBearPlot, "Bearish Breaker ", shape.labeldown, location.absolute, bearCol, size = size.tiny, text = "▼", textcolor = chart.fg_color)
plotchar(rejectBullPlot, title = "Bullish Rejection ", char = "▲", location = location.absolute, color = bullCol, size = size.tiny)
plotchar(rejectBearPlot, title = "Bearish Rejection ", char = "▼", location = location.absolute, color = bearCol, size = size.tiny)
// ============================================================================
// SECTION 2: VOLUMIZED BREAKER BLOCKS
// ============================================================================
const bool DEBUG = false
const int maxBoxesCount = 500
const float overlapThresholdPercentage = 0
const int maxDistanceToLastBar = 1750
const int maxOrderBlocks = 60
var bool initRun = true
// --- Inputs (Flux Charts) ---
showInvalidated = input.bool(true, "Show Historic Zones", group = "Flux Charts - Configuration", display = display.none)
OBsEnabled = true
breakBlockVolumetricInfo = input.bool(false, "Volumetric Info", group = "Flux Charts - Configuration", inline="EV", display = display.none)
obEndMethod = input.string("Close", "Order Block Invalidation", options = , group = "Flux Charts - Configuration", display = display.none)
bbEndMethod = input.string("Close", "Breaker Block Invalidation", options = , group = "Flux Charts - Configuration", display = display.none)
combineOBs = DEBUG ? input.bool(true, "Combine Zones", group = "Flux Charts - Configuration", display = display.none) : true
maxATRMult = DEBUG ? input.float(3.5,"Max Atr Multiplier", group = "Flux Charts - Configuration") : 3.5
swingLength = input.int(10, 'Swing Length', minval = 3, tooltip="Swing length is used when finding breaker block formations.", group = "Flux Charts - Configuration", display = display.none)
zoneCount = input.string("Low", 'Zone Count', options = , tooltip = "Number of Breaker Block Zones to be rendered.", group = "Flux Charts - Configuration", display = display.none)
bullishBreakerBlockColor = input(color.new(#2962ff, 75), "Bullish Breaker", inline = 'breakerColor', group = 'Flux Charts - Configuration', display = display.none)
bearishBreakerBlockColor = input(color.new(#ffeb3b, 75), "Bearish Breaker", inline = 'breakerColor', group = 'Flux Charts - Configuration', display = display.none)
bullishBreakerBlocks = zoneCount == "Low" ? 3 : zoneCount == "Medium" ? 5 : 10
bearishBreakerBlocks = zoneCount == "Low" ? 3 : zoneCount == "Medium" ? 5 : 10
bullishOrderBlocks = zoneCount == "Low" ? 15 : zoneCount == "Medium" ? 30 : 60
bearishOrderBlocks = zoneCount == "Low" ? 15 : zoneCount == "Medium" ? 30 : 60
BBsEnabled = true
timeframe1Enabled = true
timeframe1 = ""
breakersFull = DEBUG ? input.bool(true, "Breakers Full", group = "Flux Charts - Style", display = display.none) : true
textColor = input.color(#ffffff80, "Text Color", group = "Flux Charts - Style")
combinedText = DEBUG ? input.bool(false, "Combined Text", group = "Flux Charts - Style", inline = "CombinedColor") : false
atr = ta.atr(10)
// --- Types (Flux Charts) ---
type orderBlockInfo
float top
float bottom
float obVolume
string obType
int startTime
float bbVolume
float obLowVolume
float obHighVolume
bool breaker
int breakTime
string timeframeStr
bool disabled = false
string combinedTimeframesStr = na
bool combined = false
type orderBlock
orderBlockInfo info
bool isRendered = false
box orderBox = na
box breakerBox = na
line orderBoxLineTop = na
line orderBoxLineBottom = na
line breakerBoxLineTop = na
line breakerBoxLineBottom = na
box orderBoxText = na
box orderBoxPositive = na
box orderBoxNegative = na
line orderSeperator = na
line orderTextSeperator = na
createOrderBlock(orderBlockInfo orderBlockInfoF) =>
orderBlock newOrderBlock = orderBlock.new(orderBlockInfoF)
newOrderBlock
safeDeleteOrderBlock(orderBlock orderBlockF) =>
orderBlockF.isRendered := false
box.delete(orderBlockF.orderBox)
box.delete(orderBlockF.breakerBox)
box.delete(orderBlockF.orderBoxText)
box.delete(orderBlockF.orderBoxPositive)
box.delete(orderBlockF.orderBoxNegative)
line.delete(orderBlockF.orderBoxLineTop)
line.delete(orderBlockF.orderBoxLineBottom)
line.delete(orderBlockF.breakerBoxLineTop)
line.delete(orderBlockF.breakerBoxLineBottom)
line.delete(orderBlockF.orderSeperator)
line.delete(orderBlockF.orderTextSeperator)
type timeframeInfo
int index = na
string timeframeStr = na
bool isEnabled = false
orderBlockInfo bullishOrderBlocksList = na
orderBlockInfo bearishOrderBlocksList = na
newTimeframeInfo(index, timeframeStr, isEnabled) =>
newTFInfo = timeframeInfo.new()
newTFInfo.index := index
newTFInfo.isEnabled := isEnabled
newTFInfo.timeframeStr := timeframeStr
newTFInfo
type obSwing
int x = na
float y = na
float swingVolume = na
bool crossed = false
var timeframeInfo timeframeInfos = array.from(newTimeframeInfo(1, timeframe1, timeframe1Enabled))
var bullishOrderBlocksList = array.new(0)
var bearishOrderBlocksList = array.new(0)
var allOrderBlocksList = array.new(0)
// --- Helper Functions (Flux Charts) ---
renderOrderBlock(orderBlock ob) =>
orderBlockInfo info = ob.info
ob.isRendered := true
breakerBlockColor = ob.info.obType == "Bull" ? bearishBreakerBlockColor : bullishBreakerBlockColor
if info.breaker and BBsEnabled
startTime = (OBsEnabled and not breakersFull) ? info.breakTime : info.startTime
ob.breakerBox := box.new(startTime, info.top, time + 1, info.bottom, na, bgcolor = breakerBlockColor, extend = extend.none, xloc = xloc.bar_time, text_color = textColor, text_size = size.normal)
BBText = (na(ob.info.combinedTimeframesStr) ? (ob.info.timeframeStr == "" ? timeframe.period : ob.info.timeframeStr) : ob.info.combinedTimeframesStr) + " BB"
box.set_text(ob.breakerBox, (breakBlockVolumetricInfo ? str.tostring(ob.info.bbVolume, format.volume) + " " : "") + (combinedText and ob.info.combined ? " " : "") + BBText)
ob.breakerBoxLineTop := line.new(startTime, info.top, time + 1, info.top, xloc.bar_time, extend.none, color.new(breakerBlockColor, 0), line.style_dashed)
ob.breakerBoxLineBottom := line.new(startTime, info.bottom, time + 1, info.bottom, xloc.bar_time, extend.none, color.new(breakerBlockColor, 0), line.style_dashed)
findOBSwings(len) =>
var swingType = 0
var obSwing top = obSwing.new(na, na)
var obSwing bottom = obSwing.new(na, na)
upper = ta.highest(len)
lower = ta.lowest(len)
swingType := high > upper ? 0 : low < lower ? 1 : swingType
if swingType == 0 and swingType != 0
top := obSwing.new(bar_index , high , volume )
if swingType == 1 and swingType != 1
bottom := obSwing.new(bar_index , low , volume )
findOrderBlocks() =>
if bar_index > last_bar_index - maxDistanceToLastBar
= findOBSwings(swingLength)
useBody = false
max = useBody ? math.max(close, open) : high
min = useBody ? math.min(close, open) : low
// Bullish Order Block (có bổ sung kiểm tra Imbalance)
if bullishOrderBlocksList.size() > 0
for i = bullishOrderBlocksList.size() - 1 to 0
currentOB = bullishOrderBlocksList.get(i)
if not currentOB.breaker
if ((obEndMethod == "Wick" ? low : close) < currentOB.bottom)
currentOB.breaker := true
currentOB.breakTime := time
currentOB.bbVolume := volume
else
if (bbEndMethod == "Wick" ? high : close) > currentOB.top
bullishOrderBlocksList.remove(i)
if close > top.y and not top.crossed and (not useImbalanceFilter or f_has_imbalance_bull())
top.crossed := true
boxBtm = max
boxTop = min
boxLoc = time
for i = 1 to (bar_index - top.x) - 1
boxBtm := math.min(min , boxBtm)
boxTop := boxBtm == min ? max : boxTop
boxLoc := boxBtm == min ? time : boxLoc
newOrderBlockInfo = orderBlockInfo.new(boxTop, boxBtm, volume + volume + volume , "Bull", boxLoc)
newOrderBlockInfo.obLowVolume := volume
newOrderBlockInfo.obHighVolume := volume + volume
obSize = math.abs(newOrderBlockInfo.top - newOrderBlockInfo.bottom)
if obSize <= atr * maxATRMult
bullishOrderBlocksList.unshift(newOrderBlockInfo)
if bullishOrderBlocksList.size() > maxOrderBlocks
bullishOrderBlocksList.pop()
// Bearish Order Block (có bổ sung kiểm tra Imbalance)
if bearishOrderBlocksList.size() > 0
for i = bearishOrderBlocksList.size() - 1 to 0
currentOB = bearishOrderBlocksList.get(i)
if not currentOB.breaker
if (obEndMethod == "Wick" ? high : close) > currentOB.top
currentOB.breaker := true
currentOB.breakTime := time
currentOB.bbVolume := volume
else
if (bbEndMethod == "Wick" ? low : close) < currentOB.bottom
bearishOrderBlocksList.remove(i)
if close < btm.y and not btm.crossed and (not useImbalanceFilter or f_has_imbalance_bear())
btm.crossed := true
boxBtm = min
boxTop = max
boxLoc = time
for i = 1 to (bar_index - btm.x) - 1
boxTop := math.max(max , boxTop)
boxBtm := boxTop == max ? min : boxBtm
boxLoc := boxTop == max ? time : boxLoc
newOrderBlockInfo = orderBlockInfo.new(boxTop, boxBtm, volume + volume + volume , "Bear", boxLoc)
newOrderBlockInfo.obLowVolume := volume + volume
newOrderBlockInfo.obHighVolume := volume
obSize = math.abs(newOrderBlockInfo.top - newOrderBlockInfo.bottom)
if obSize <= atr * maxATRMult
bearishOrderBlocksList.unshift(newOrderBlockInfo)
if bearishOrderBlocksList.size() > maxOrderBlocks
bearishOrderBlocksList.pop()
true
areaOfOB(orderBlockInfo OBInfoF) =>
float XA1 = OBInfoF.startTime
float XA2 = na(OBInfoF.breakTime) ? time + 1 : OBInfoF.breakTime
float YA1 = OBInfoF.top
float YA2 = OBInfoF.bottom
float edge1 = math.sqrt((XA2 - XA1) * (XA2 - XA1) + (YA2 - YA2) * (YA2 - YA2))
float edge2 = math.sqrt((XA2 - XA2) * (XA2 - XA2) + (YA2 - YA1) * (YA2 - YA1))
edge1 * edge2
doOBsTouch(orderBlockInfo OBInfo1, orderBlockInfo OBInfo2) =>
float XA1 = OBInfo1.startTime
float XA2 = na(OBInfo1.breakTime) ? time + 1 : OBInfo1.breakTime
float YA1 = OBInfo1.top
float YA2 = OBInfo1.bottom
float XB1 = OBInfo2.startTime
float XB2 = na(OBInfo2.breakTime) ? time + 1 : OBInfo2.breakTime
float YB1 = OBInfo2.top
float YB2 = OBInfo2.bottom
float intersectionArea = math.max(0, math.min(XA2, XB2) - math.max(XA1, XB1)) * math.max(0, math.min(YA1, YB1) - math.max(YA2, YB2))
float unionArea = areaOfOB(OBInfo1) + areaOfOB(OBInfo2) - intersectionArea
float overlapPercentage = (intersectionArea / unionArea) * 100.0
overlapPercentage > overlapThresholdPercentage
isOBValid(orderBlockInfo OBInfo) =>
not OBInfo.disabled
combineOBsFunc() =>
if allOrderBlocksList.size() > 0
lastCombinations = 999
while lastCombinations > 0
lastCombinations := 0
for i = 0 to allOrderBlocksList.size() - 1
curOB1 = allOrderBlocksList.get(i)
for j = 0 to allOrderBlocksList.size() - 1
curOB2 = allOrderBlocksList.get(j)
if i == j or not isOBValid(curOB1.info) or not isOBValid(curOB2.info) or curOB1.info.obType != curOB2.info.obType
continue
if doOBsTouch(curOB1.info, curOB2.info)
curOB1.info.disabled := true
curOB2.info.disabled := true
orderBlock newOB = createOrderBlock(orderBlockInfo.new(math.max(curOB1.info.top, curOB2.info.top), math.min(curOB1.info.bottom, curOB2.info.bottom), curOB1.info.obVolume + curOB2.info.obVolume, curOB1.info.obType))
newOB.info.startTime := math.min(curOB1.info.startTime, curOB2.info.startTime)
newOB.info.breakTime := math.max(nz(curOB1.info.breakTime), nz(curOB2.info.breakTime))
newOB.info.breakTime := newOB.info.breakTime == 0 ? na : newOB.info.breakTime
newOB.info.timeframeStr := curOB1.info.timeframeStr
newOB.info.obVolume := curOB1.info.obVolume + curOB2.info.obVolume
newOB.info.obLowVolume := curOB1.info.obLowVolume + curOB2.info.obLowVolume
newOB.info.obHighVolume := curOB1.info.obHighVolume + curOB2.info.obHighVolume
newOB.info.bbVolume := nz(curOB1.info.bbVolume, 0) + nz(curOB2.info.bbVolume, 0)
newOB.info.breaker := curOB1.info.breaker or curOB2.info.breaker
newOB.info.combined := true
allOrderBlocksList.unshift(newOB)
lastCombinations += 1
reqSeq(timeframeStr) =>
request.security(syminfo.tickerid, timeframeStr, )
getTFData(timeframeInfo timeframeInfoF, timeframeStr) =>
if timeframeInfoF.isEnabled
reqSeq(timeframeStr)
else
handleTimeframeInfo(timeframeInfo timeframeInfoF, bullishOrderBlocksListF, bearishOrderBlocksListF) =>
if timeframeInfoF.isEnabled
timeframeInfoF.bullishOrderBlocksList := bullishOrderBlocksListF
timeframeInfoF.bearishOrderBlocksList := bearishOrderBlocksListF
arrHasOB(orderBlock arr, orderBlock obF) =>
hasOB = false
if arr.size() > 0
for i = 0 to arr.size() - 1
orderBlock ob1 = arr.get(i)
if isOBValid(ob1.info) and isOBValid(obF.info) and (ob1.info.breaker == obF.info.breaker) and doOBsTouch(ob1.info, obF.info)
hasOB := true
break
hasOB
bool newBullishBBTick = false
bool newBearishBBTick = false
handleOrderBlocksFinal() =>
newBullishOBAlert = false
newBearishOBAlert = false
newBullishBBAlert = false
newBearishBBAlert = false
alertTimeOB = ""
alertTimeBB = ""
orderBlock orderBlocksToAdd = array.new(0)
for i = 0 to timeframeInfos.size() - 1
curTimeframe = timeframeInfos.get(i)
if not curTimeframe.isEnabled
continue
if not na(curTimeframe.bullishOrderBlocksList)
if curTimeframe.bullishOrderBlocksList.size() > 0
for j = 0 to math.min(curTimeframe.bullishOrderBlocksList.size() - 1, bullishOrderBlocks - 1)
orderBlockInfoF = curTimeframe.bullishOrderBlocksList.get(j)
orderBlockInfoF.timeframeStr := curTimeframe.timeframeStr
orderBlocksToAdd.unshift(createOrderBlock(orderBlockInfo.copy(orderBlockInfoF)))
if not na(curTimeframe.bearishOrderBlocksList)
if curTimeframe.bearishOrderBlocksList.size() > 0
for j = 0 to math.min(curTimeframe.bearishOrderBlocksList.size() - 1, bearishOrderBlocks - 1)
orderBlockInfoF = curTimeframe.bearishOrderBlocksList.get(j)
orderBlockInfoF.timeframeStr := curTimeframe.timeframeStr
orderBlocksToAdd.unshift(createOrderBlock(orderBlockInfo.copy(orderBlockInfoF)))
if orderBlocksToAdd.size() > 0
for i = 0 to orderBlocksToAdd.size() - 1
obToTest = orderBlocksToAdd.get(i)
if obToTest.info.breaker == false
if not arrHasOB(allOrderBlocksList, obToTest)
alertTimeOB := obToTest.info.timeframeStr
if obToTest.info.obType == "Bull"
newBullishOBAlert := true
else
newBearishOBAlert := true
else
if not arrHasOB(allOrderBlocksList, obToTest)
alertTimeBB := obToTest.info.timeframeStr
if obToTest.info.obType == "Bull"
newBearishBBAlert := true
else
newBullishBBAlert := true
if allOrderBlocksList.size() > 0
for i = 0 to allOrderBlocksList.size() - 1
safeDeleteOrderBlock(allOrderBlocksList.get(i))
allOrderBlocksList.clear()
if orderBlocksToAdd.size() > 0
for i = 0 to orderBlocksToAdd.size() - 1
allOrderBlocksList.unshift(orderBlocksToAdd.get(i))
if combineOBs
combineOBsFunc()
if allOrderBlocksList.size() > 0
for i = 0 to allOrderBlocksList.size() - 1
curOB = allOrderBlocksList.get(i)
if isOBValid(curOB.info)
renderOrderBlock(curOB)
findOrderBlocks()
= getTFData(timeframeInfos.get(0), timeframe1)
if barstate.isconfirmed and (bar_index > last_bar_index - maxDistanceToLastBar)
handleTimeframeInfo(timeframeInfos.get(0), bullishOrderBlocksListTimeframe1, bearishOrderBlocksListTimeframe1)
= handleOrderBlocksFinal()
if newBullishBBAlert
newBullishBBTick := true
if newBearishBBAlert
newBearishBBTick := true
// --- Alerts (Flux Charts) ---
alertcondition((newBullishBBTick or newBearishBBTick) and not initRun, "Breaker Block Formation ", "A new Breaker Block has formed.")
alertcondition(newBullishBBTick and not initRun, "Bullish Breaker Block Formation ", "A new Bullish Breaker Block has formed.")
alertcondition(newBearishBBTick and not initRun, "Bearish Breaker Block Formation ", "A new Bearish Breaker Block has formed.")
if barstate.isconfirmed
initRun := false インジケーター

インジケーター

Fair Value Gaps Standalone [Rivasjr]English
Fair Value Gaps Standalone is a Pine Script® v6 indicator designed to identify and display bullish and bearish Fair Value Gaps directly on the chart.
A Fair Value Gap is a three-candle price imbalance that appears when part of the price range between the first and third candles is not traded. These areas can help traders visualize zones where price moved with displacement and where future interaction may occur.
Main features
Detects bullish and bearish Fair Value Gaps.
Displays each imbalance as a two-part shaded zone.
Supports the chart timeframe or a user-selected detection timeframe.
Includes an automatic threshold to filter less significant imbalances.
Allows users to control the horizontal extension of each FVG.
Can automatically remove fully mitigated Fair Value Gaps.
Provides independent colors for bullish and bearish zones.
How the indicator works
A bullish Fair Value Gap is identified when the low of the third candle remains above the high of the first candle and the displacement conditions are satisfied.
A bearish Fair Value Gap is identified when the high of the third candle remains below the low of the first candle and the displacement conditions are satisfied.
Each detected imbalance is divided at its midpoint and displayed using two boxes. Both boxes belong to the same Fair Value Gap and are removed together when full mitigation is enabled and price completely crosses the corresponding invalidation boundary.
Settings translation
Fair Value Gaps: Shows or hides detected Fair Value Gaps.
Auto Threshold: Automatically filters less significant gaps.
Intervalo de tiempo / Timeframe: Selects the timeframe used for FVG detection. Selecting “Chart” uses the current chart timeframe.
Bullish FVG: Sets the color of bullish Fair Value Gaps.
Bearish FVG: Sets the color of bearish Fair Value Gaps.
Extend FVG: Sets the number of additional bars used to extend each zone.
Eliminar FVG mitigados / Delete mitigated FVGs: Removes a zone after price completely crosses its mitigation boundary.
Important information
This indicator identifies price imbalances only. It does not generate entries, exits, profit targets, stop-loss levels, or trading recommendations. Fair Value Gaps should be evaluated together with market structure, liquidity, volume, trend, session context, and appropriate risk management.
Historical and real-time behavior can differ while a higher-timeframe candle is still developing. Users should understand the selected detection timeframe before using the indicator in their analysis.
Credits
Original Fair Value Gap concept and logic: © LuxAlgo.
Standalone Pine Script® v6 adaptation, structural organization, configurable visualization, mitigation management, timeframe selection, and user-interface implementation: © Rivasjr.
This work is distributed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
────────────────────────────────────
Español
Fair Value Gaps Standalone es un indicador desarrollado en Pine Script® v6 para identificar y mostrar Fair Value Gaps alcistas y bajistas directamente sobre el gráfico.
Un Fair Value Gap es un desequilibrio de precio formado por una estructura de tres velas, en la cual una parte del rango comprendido entre la primera y la tercera vela no fue negociada. Estas zonas permiten visualizar áreas donde el precio se desplazó con fuerza y donde podría producirse una interacción posterior.
Funciones principales
Detecta Fair Value Gaps alcistas y bajistas.
Representa cada desequilibrio mediante una zona dividida en dos secciones.
Permite utilizar el intervalo del gráfico o un intervalo de detección diferente.
Incluye un umbral automático para filtrar desequilibrios menos significativos.
Permite controlar la extensión horizontal de las zonas.
Puede eliminar automáticamente los FVG completamente mitigados.
Ofrece colores independientes para zonas alcistas y bajistas.
Funcionamiento
Un Fair Value Gap alcista se identifica cuando el mínimo de la tercera vela permanece por encima del máximo de la primera vela y se cumplen las condiciones de desplazamiento.
Un Fair Value Gap bajista se identifica cuando el máximo de la tercera vela permanece por debajo del mínimo de la primera vela y se cumplen las condiciones de desplazamiento.
Cada desequilibrio se divide en su punto medio y se representa mediante dos cajas. Ambas cajas forman parte del mismo Fair Value Gap y se eliminan conjuntamente cuando está activada la eliminación de zonas mitigadas y el precio atraviesa completamente su límite correspondiente.
Información importante
Este indicador identifica desequilibrios de precio. No proporciona entradas, salidas, objetivos, niveles de stop-loss ni recomendaciones de inversión. Los Fair Value Gaps deben analizarse junto con la estructura del mercado, liquidez, volumen, tendencia, contexto de sesión y una gestión de riesgo adecuada.
El comportamiento histórico y en tiempo real puede variar mientras una vela de temporalidad superior continúa en formación.
インジケーター

Price Reaction ZonesPrice Reaction Zones identifies price levels created when a confirmed candle changes direction from bearish to bullish or from bullish to bearish.
Each level is drawn from the opening price of the candle that confirms the color change. Active levels remain solid. A level becomes dashed only when a later candle opens on one side of the level and closes on the opposite side. Wick-only touches do not invalidate the level.
Users can select the calculation timeframe, trading-day lookback, maximum number of levels, line extension, colors, width, and whether broken levels remain visible.
Optional reference levels include the previous day, week, and month highs and lows. These are calculated from the regular New York trading session between 9:30 AM and 4:00 PM.
This indicator is designed to highlight areas where price may react, reject, consolidate, or change direction. It is intended as a market-context tool and should not be used as a standalone entry or exit signal.
インジケーター

TQQQ 5-Minute RSI EMA Scalping SystemOVERVIEW
This indicator is designed specifically for TQQQ on the 5-minute chart. It combines RSI, EMA trend confirmation, long-term trend filtering, and regime-aware trade management to identify potential long entries while reducing whipsaw trades.
Unlike a basic EMA crossover indicator, this system uses an RSI arming process. RSI first prepares — or "arms" — a possible trade during a pullback, and the indicator then waits for additional bullish confirmation before generating a BUY signal.
ENTRY LOGIC
A BUY requires several conditions to align:
- RSI crosses below the configurable ARM level
- The 3 EMA becomes bullish relative to the 13 EMA
- Price is above the long-term Trend SMA
- The optional BUY Slope SMA condition is satisfied
- RSI is below the configurable maximum BUY RSI
The indicator can remember bullish EMA alignment while price is still below the Trend SMA. This means the 3 EMA does not need to make a new crossover after price moves above the Trend SMA.
OPENING RSI LOGIC
The indicator includes optional opening-session ARM protection.
- When enabled, an opening RSI reading already at or below the ARM threshold can place the system into a BLOCKED state.
- The system then waits for RSI to cross back above the ARM threshold before permitting a new ARM.
- An existing ARM can optionally be preserved through an oversold market open.
EXIT LOGIC
The indicator supports several exit conditions:
- Standard EMA-based SELL signals
- Regime-aware entry-price protection
- Gap-up RSI TAKE PROFIT signals
While the bullish regime remains intact, the indicator can ignore ordinary bearish 3/13 EMA signals and instead protect the trade using a configurable exit level based on the entry price.
- The default regime exit is breakeven, but the user may configure the exit above or below the entry price.
- Normal EMA exits and regime-protection exits use the same SELL alert.
- TAKE PROFIT remains a separate alert.
RE-ENTRY LOGIC
After a SELL, the indicator can monitor for a re-entry opportunity without requiring a new RSI ARM.
A re-entry may require:
- Bullish 3/13 EMA alignment
- Price above the Trend SMA
- BUY Slope SMA confirmation
- RSI below the configurable re-entry limit
The number of bullish EMA confirmation candles can also be adjusted.
MAIN FEATURES
- Designed specifically for TQQQ
- Restricted to the 5-minute chart
- RSI ARM state machine
- Opening RSI BLOCKED state
- Configurable RSI ARM threshold
- Configurable maximum BUY RSI
- 3 EMA and 13 EMA confirmation
- Configurable long-term Trend SMA
- Configurable BUY Slope SMA
- Adjustable minimum BUY Slope SMA rise
- Regime-aware entry-price protection
- Configurable exit offset above or below entry
- Re-entry monitoring after SELL signals
- Separate TAKE PROFIT alerts
- Combined normal and regime-protection SELL alert
- Individual label and plot controls
- Configurable colors and visual settings
DEFAULT CONFIGURATION
The default settings are intended for use with TQQQ on a 5-minute chart, but the primary calculations, thresholds, confirmation requirements, plots, labels, and alert conditions are all configurable.
ALERTS
The indicator provides separate TradingView alert conditions for:
- BUY
- SELL
- TAKE PROFIT
The SELL alert includes both standard EMA exits and regime-protection exits.
IMPORTANT NOTES
- This is an indicator, not an automated trading strategy.
- It displays signals and provides alert conditions, but it does not place trades or calculate backtest performance.
- Signals are based on completed candles to reduce intrabar changes and false triggers.
DISCLAIMER
This indicator is provided for educational and analytical purposes only and does not constitute financial advice. No indicator can guarantee profitable results. Always perform your インジケーター

インジケーター

インジケーター

ICT Sessions//@version=6
indicator("ICT交易时段", overlay=true)
// ==================== 设置 ====================
tz = input.string("America/New_York", "时区", options= )
showAsia = input.bool(true, "显示亚洲盘")
showLondon = input.bool(true, "显示伦敦盘")
showNY = input.bool(true, "显示纽约盘")
showOverlap = input.bool(true, "显示重合时段")
// 重点:加上 :23456 (只周一到周五)
asiaS = input.session("1900-0400:23456", "亚洲盘时间")
londonS = input.session("0200-1200:23456", "伦敦盘时间")
nyS = input.session("0800-1700:23456", "纽约盘时间")
asiaColor = input.color(color.new(#F5E6C8, 78), "亚洲颜色")
londonColor = input.color(color.new(#C8E6C9, 78), "伦敦颜色")
nyColor = input.color(color.new(#E1BEE7, 78), "纽约颜色")
overlapColor = input.color(color.new(#9C27B0, 65), "伦敦-纽约重合颜色")
asiaLonColor = input.color(color.new(#80CBC4, 70), "亚洲-伦敦重合颜色")
// ==================== 核心逻辑 ====================
isAsia = not na(time(timeframe.period, asiaS, tz))
isLondon = not na(time(timeframe.period, londonS, tz))
isNY = not na(time(timeframe.period, nyS, tz))
isLondonNY = isLondon and isNY
isAsiaLon = isAsia and isLondon
// ==================== 背景绘制 ====================
bgcolor(showOverlap and isLondonNY ? overlapColor : na)
bgcolor(showOverlap and isAsiaLon ? asiaLonColor : na)
bgcolor(showAsia and isAsia and not isAsiaLon and not isLondonNY ? asiaColor : na)
bgcolor(showLondon and isLondon and not isAsiaLon and not isLondonNY ? londonColor : na)
bgcolor(showNY and isNY and not isLondonNY ? nyColor : na) インジケーター

ICT Sessions//@version=6
indicator("ICT交易时段(含重合)精简版", overlay=true, max_bars_back=500)
// ==================== 设置 ====================
tz = input.string("America/New_York", "时区(推荐纽约)", options= )
showAsia = input.bool(true, "显示亚洲盘")
showLondon = input.bool(true, "显示伦敦盘")
showNY = input.bool(true, "显示纽约盘")
showOverlap = input.bool(true, "显示重要重合")
// 时段时间
asiaS = input.session("1900-0400", "亚洲盘时间")
londonS = input.session("0200-1200", "伦敦盘时间")
nyS = input.session("0800-1700", "纽约盘时间")
// 颜色
asiaColor = input.color(color.new(#F5E6C8, 78), "亚洲颜色")
londonColor = input.color(color.new(#C8E6C9, 78), "伦敦颜色")
nyColor = input.color(color.new(#E1BEE7, 78), "纽约颜色")
overlapColor = input.color(color.new(#9C27B0, 65), "伦敦-纽约重合颜色")
// ==================== 核心逻辑 ====================
isWeekday = dayofweek != dayofweek.saturday and dayofweek != dayofweek.sunday
isAsia = isWeekday and not na(time(timeframe.period, asiaS, tz))
isLondon = isWeekday and not na(time(timeframe.period, londonS, tz))
isNY = isWeekday and not na(time(timeframe.period, nyS, tz))
isLondonNY = isLondon and isNY
isAsiaLon = isAsia and isLondon
// ==================== 背景绘制 ====================
bgcolor(showAsia and isAsia and not isAsiaLon and not isLondonNY ? asiaColor : na)
bgcolor(showLondon and isLondon and not isAsiaLon and not isLondonNY ? londonColor : na)
bgcolor(showNY and isNY and not isLondonNY ? nyColor : na)
// 重合(重点)
bgcolor(showOverlap and isAsiaLon ? color.new(#80CBC4, 70) : na)
bgcolor(showOverlap and isLondonNY ? overlapColor : na) インジケーター

TRADION Multi Trend EngineTRADION Multi Trend Engine
TRADION Multi Trend Engine is a multi-layer trend-following indicator designed to measure the overall market direction and trend strength by combining multiple trend analysis methods into a single consensus-based system.
The indicator evaluates Classic Trend Structure, Linear Regression, Logarithmic Trend, SuperTrend, and Hull Moving Average simultaneously. Each enabled method contributes bullish or bearish signals, which are combined into an overall trend consensus.
Trend Analysis Methods
Classic Trend
Analyzes price structure using confirmed pivot highs and pivot lows.
Higher lows indicate a bullish trend.
Lower highs indicate a bearish trend.
Confirmed structures are displayed as dynamic trend lines on the chart.
Linear Regression
Calculates the linear price trend over the selected period.
In addition to the regression line, the indicator plots upper and lower deviation bands based on the standard deviation.
Price above a rising regression line indicates a bullish trend.
Price below a falling regression line indicates a bearish trend.
Logarithmic Trend
Evaluates price movements using a logarithmic scale, providing a more balanced trend analysis, especially for long-term charts or assets with significant percentage price changes.
SuperTrend
Uses ATR-based volatility calculations to determine the primary market trend.
Green SuperTrend: Bullish trend
Red SuperTrend: Bearish trend
Hull Trend
Uses the Hull Moving Average to identify market direction with reduced lag.
Rising Hull MA with price above the average indicates a bullish trend.
Falling Hull MA with price below the average indicates a bearish trend.
Consensus Scoring System
Each enabled trend method independently contributes either a bullish or bearish score.
The indicator calculates an overall consensus and classifies the market into one of the following conditions:
STRONG BUY – Bullish consensus of 80% or higher
BUY – Bullish consensus between 60% and 79%
READY BUY – Bullish consensus between 50% and 59%
STRONG SELL – Bearish consensus of 80% or higher
SELL – Bearish consensus between 60% and 79%
READY SELL – Bearish consensus between 50% and 59%
WAIT – No clear directional consensus
The dashboard located in the upper-right corner displays the Bull Score, Bear Score, and the current status of every active trend method.
Buy & Sell Signals
The BUY and SELL labels are generated when both the Linear Regression and Logarithmic Trend confirm the same directional breakout.
BUY Signal
Generated when price moves above both the Linear Regression line and the Logarithmic Trend line for the first time.
SELL Signal
Generated when price moves below both the Linear Regression line and the Logarithmic Trend line for the first time.
Signals are generated only on the initial breakout. As long as price remains within the same trend region, no additional labels are created.
Dashboard
The built-in dashboard displays:
Overall Trend Status
Bull Score
Bear Score
Classic Trend Direction
Linear Regression Direction
Logarithmic Trend Direction
SuperTrend Direction
Hull Trend Direction
The dashboard supports a compact mobile mode, and both text and background colors can be customized.
Alert Conditions
The indicator includes the following alert conditions:
TRADION Strong Buy
TRADION Strong Sell
TRADION Buy
TRADION Sell
To reduce temporary intrabar signals, it is recommended to configure TradingView alerts using the "Once Per Bar Close" option.
Recommended Usage
TRADION Multi Trend Engine is designed as a trend confirmation and market analysis tool, rather than a standalone automated trading system.
For better decision-making, signals should be combined with:
Support and Resistance
Volume Analysis
Market Structure
Momentum Analysis
Proper Risk Management
Lower timeframes may produce more market noise and a higher number of signals, while medium and higher timeframes generally provide more reliable trend identification.
Technical Note
The Classic Trend module is based on confirmed pivot highs and lows. Since pivot confirmation requires future bars, trend lines are plotted only after the selected pivot sensitivity has been confirmed.
Disclaimer
This indicator is intended for technical analysis and educational purposes only. It does not provide financial or investment advice and should not be interpreted as a recommendation to buy or sell any financial instrument.
Past performance does not guarantee future results. Always conduct your own analysis and apply appropriate risk management, position sizing, and stop-loss strategies before making trading decisions.
インジケーター

インジケーター

EMA + RSI + Stochastic SignalEMA + RSI + Stochastic Signal (Graded Confluence)
Overview
This indicator combines a multi-EMA trend framework, RSI momentum, and a Stochastic crossover trigger into a single, graded signal system. Instead of just firing a triangle, every signal is scored A / B / C based on how much confluence lines up behind it — and a hover tooltip shows you exactly which conditions passed or failed. Optional Heikin-Ashi smoothing helps filter noise.
How signals are generated
A BUY requires all three core conditions:
Price breaks above the EMA High band
RSI > 50 (bullish momentum)
Stochastic %K crosses up (and is not yet overbought)
A SELL is the mirror image:
Price breaks below the EMA Low band
RSI < 50 (bearish momentum)
Stochastic %K crosses down (and is not yet oversold)
Confluence grading
Once a core signal fires, three extra factors are checked to grade signal quality:
EMA trend stack (EMA1 > EMA2 > EMA3 for longs, inverse for shorts)
Volume surge vs its moving average
2nd-candle confirmation in the signal's direction
Grade: A = all 3 confirmed (full confluence), B = 2 (partial), C = 1 or fewer (weak). Hover any signal label to see the full ✓/✗ checklist.
On-chart tools
Graded BUY/SELL labels with detailed hover tooltips
Live info table (RSI, %K, %D, Stoch cross status, current signal) — position selectable
Signal background highlighting
Optional Heikin-Ashi candle overlay
Alerts
Dynamic alert() calls deliver the full breakdown — ticker, price, timeframe, grade, and the pass/fail checklist — straight to your pop-up/webhook. Classic alertcondition() BUY/SELL alerts are also included. To use the detailed version, create an alert and choose "Any alert() function call."
Settings
EMA lengths & colors (trend + High/Low bands)
RSI length and source
Stochastic %K/%D/smoothing and OB/OS levels
Heikin-Ashi toggle & display
Volume MA length and surge multiplier
Table location
Notes
This is an analysis/education tool, not financial advice. Signals repaint intra-bar; wait for bar close for confirmation, and always combine with your own risk management. Best used with trend and higher-timeframe context. インジケーター

インジケーター

インジケーター

FVG ChannelThis script is a modified and expanded derivative of “FVG Channel ” by LuxAlgo. The original FVG detection, active-level aggregation, close-based mitigation, smoothed channel concept, and internal channel-level framework were adapted from that work. This version adds confirmed-bar processing, capped FVG storage, normalized and double-smoothed boundaries, recovery-based signal logic, configurable overextension requirements, signal cooldowns, optional volume confirmation, separate standard and Super classifications, alerts, and simplified historical target/stop measurements. The original work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International licence, and this modified version is distributed under the same licence. It is intended for noncommercial use, and changes from the original implementation have been clearly identified.
### Overview
FVG Channel converts active Fair Value Gap reference levels into a smoothed adaptive price channel.
The script identifies confirmed bullish and bearish FVG structures, stores one reference level from each active gap, removes levels after close-based mitigation, and averages the remaining bullish and bearish references.
These averages are smoothed twice to create the channel boundaries. The channel also includes three configurable internal levels, confirmed recovery signals, optional volume confirmation, standard and Super signal classifications, alerts, target and stop reference lines, and simplified historical outcome tables.
The indicator is designed to help users examine:
* areas where multiple unmitigated FVG references are concentrated;
* price overextension beyond the adaptive channel;
* confirmed recovery back inside the channel;
* stronger wick-extension conditions;
* historical target and stop outcomes under user-selected settings.
The script is intended for standard candlestick or bar charts. It does not predict future prices and does not provide automatic trade instructions.
## Fair Value Gap detection
A bullish FVG is identified when:
* the current low is above the high from two bars earlier;
* the middle candle closes above that earlier high;
* the current chart bar is confirmed.
For each bullish FVG, the script stores the high from two bars earlier as its reference level.
A bearish FVG is identified when:
* the current high is below the low from two bars earlier;
* the middle candle closes below that earlier low;
* the current chart bar is confirmed.
For each bearish FVG, the script stores the low from two bars earlier as its reference level.
The script stores one reference level from each detected FVG. It does not draw or store the complete upper and lower boundaries of every gap zone.
## FVG mitigation
Bullish and bearish FVG references remain active until they are mitigated by a confirmed close.
A bullish FVG reference is removed when price closes below its stored level.
A bearish FVG reference is removed when price closes above its stored level.
Wick contact alone does not remove an FVG reference.
This close-based method is intended to reduce the effect of temporary wick penetration, but it can also keep a level active after price has partially traded through the original gap area.
## Maximum stored FVG levels
The Maximum Stored FVG Levels setting limits the number of bullish and bearish references stored by the script.
When the selected limit is exceeded, the oldest stored reference is removed.
This prevents the arrays from expanding indefinitely on long chart histories.
A larger limit allows more historical FVG references to contribute to the channel but may increase processing requirements.
## Adaptive channel calculation
The active bullish FVG references are averaged.
The active bearish FVG references are averaged separately.
Each average then passes through two consecutive simple moving-average smoothing calculations.
The final channel boundaries are normalized so that:
* the higher smoothed reference becomes the upper boundary;
* the lower smoothed reference becomes the lower boundary.
This prevents the channel boundaries from becoming visually reversed.
When no active bullish or bearish FVG reference is available, the script temporarily substitutes a simple moving average of price for that side of the calculation.
The resulting channel is therefore influenced by active FVG structure when available and by smoothed price when no active reference exists.
## Smoothing Length
The Smoothing Length controls both smoothing passes applied to the FVG reference averages.
A shorter length:
* reacts more quickly to changes in the active FVG structure;
* produces a more responsive channel;
* may create more frequent recovery conditions;
* can be more sensitive to short-term movement.
A longer length:
* creates smoother boundaries;
* reacts more slowly;
* emphasizes broader FVG concentration;
* may produce fewer signals.
The same length is used for both smoothing passes.
## Upper and lower boundaries
The red upper boundary represents the higher of the two smoothed FVG reference calculations.
The green lower boundary represents the lower of the two smoothed calculations.
The boundaries are not traditional support and resistance lines and should not be treated as guaranteed reversal levels.
They represent smoothed averages derived from active FVG references and the price-SMA fallback logic.
## Internal channel levels
The script calculates three configurable levels between the lower and upper boundaries.
The default values are:
* Internal Level 1: 0.236;
* Internal Level 2: 0.500;
* Internal Level 3: 0.786.
Each value represents a proportional position within the current channel range.
For example, Internal Level 2 at 0.500 represents the midpoint between the lower and upper boundaries.
The levels must satisfy:
* Level 1 is below Level 2;
* Level 2 is below Level 3.
All internal-level settings are limited to values between 0 and 1.
The script produces an error when the levels are entered in an invalid order.
## Confirmed recovery signals
The signal system looks for price to remain outside the channel and then recover back inside it.
Signals are confirmed only after the chart bar closes.
### Bullish recovery
A bullish recovery condition requires:
* price to close below the lower boundary for the selected minimum number of consecutive bars;
* price to subsequently cross and close back above the lower boundary;
* the bullish signal cooldown to have expired;
* the optional volume condition to pass.
A green BULL label marks a standard bullish recovery.
This condition indicates that price remained below the adaptive channel and then recovered above its lower boundary.
It does not guarantee that price will continue higher.
### Bearish recovery
A bearish recovery condition requires:
* price to close above the upper boundary for the selected minimum number of consecutive bars;
* price to subsequently cross and close back below the upper boundary;
* the bearish signal cooldown to have expired;
* the optional volume condition to pass.
A red BEAR label marks a standard bearish recovery.
This condition indicates that price remained above the adaptive channel and then recovered below its upper boundary.
It does not guarantee that price will continue lower.
## Minimum Closes Outside Channel
This setting controls how many consecutive confirmed closes must occur beyond a channel boundary before a recovery signal becomes eligible.
For a bullish condition, the required closes must occur below the lower boundary.
For a bearish condition, the required closes must occur above the upper boundary.
A smaller value:
* allows faster recovery signals;
* produces more frequent conditions;
* may include shallower overextensions.
A larger value:
* requires price to remain outside the channel longer;
* produces fewer conditions;
* focuses on more persistent overextensions.
## Standard and Super signals
Each recovery is classified as either a standard signal or a Super signal.
The classifications are mutually exclusive. A Super signal does not also produce a standard label or standard alert.
### Super Bull recovery
A bullish recovery becomes a Super Bull condition when the signal candle’s lower wick extends beyond the lower boundary by at least the configured Super Signal Wick Extension percentage.
A lime SBULL label identifies this condition.
### Super Bear recovery
A bearish recovery becomes a Super Bear condition when the signal candle’s upper wick extends beyond the upper boundary by at least the configured Super Signal Wick Extension percentage.
An orange SBEAR label identifies this condition.
The Super classification measures wick distance beyond the relevant boundary.
It does not independently measure trend strength, probability, expected return, or future reversal quality.
A higher Super threshold creates fewer Super classifications.
A lower threshold creates more frequent Super classifications.
## Signal cooldown
The Signal Cooldown setting controls the minimum number of chart bars required between signals of the same direction.
Bullish and bearish cooldowns are tracked independently.
For example, a bullish signal does not reset the bearish cooldown.
A value of zero allows another same-direction signal as soon as all other requirements are satisfied.
The cooldown reduces repeated signals but does not change the underlying FVG channel.
## Volume confirmation
Volume confirmation is optional.
When enabled, a recovery signal requires current reported volume to be greater than:
* average volume over the selected Volume Lookback;
* multiplied by the Volume Confirmation Multiplier.
A multiplier of 1.0 requires volume to exceed its average.
A multiplier above 1.0 requires comparatively higher volume.
A multiplier below 1.0 creates a less restrictive condition.
Volume information differs between markets and data providers. Some symbols provide centralized transaction volume, while others may provide exchange-specific or tick-volume data.
The volume condition should therefore be interpreted according to the selected market.
## Signal-bar background
Optional background highlighting can be enabled for confirmed signal bars.
Separate colours are available for:
* Bull signals;
* Super Bull signals;
* Bear signals;
* Super Bear signals.
The background highlight is visual only and does not change the signal calculations.
## Signal labels
The indicator displays four possible labels:
* BULL: standard bullish recovery;
* SBULL: Super bullish recovery;
* BEAR: standard bearish recovery;
* SBEAR: Super bearish recovery.
The Signal Offset setting controls the vertical distance between each label and the signal candle.
Labels are plotted for every confirmed signal, even when another historical outcome measurement is already active.
## Alerts
Separate alerts are available for:
* Bull Recovery;
* Super Bull Recovery;
* Bear Recovery;
* Super Bear Recovery.
Standard and Super alerts are exclusive.
Alerts are based on confirmed chart bars, so a signal is not finalized until the bar closes.
When creating a TradingView alert, using Once Per Bar Close is recommended for consistency with the script’s confirmed-bar logic.
## Historical target and stop measurements
The Historical Outcome Settings provide simplified target and stop measurements for confirmed signals.
This system is not a full TradingView strategy backtest.
Only one unresolved outcome can be tracked at a time across all four signal types.
Signals can still appear while another outcome is active, but those later signals will not begin additional outcome measurements.
## Target Mode
The available Target Modes are:
* Disabled;
* Percentage;
* Internal Level 1;
* Internal Level 2;
* Internal Level 3.
### Disabled
Historical outcome tracking is turned off.
Signal labels and alerts continue to operate.
### Percentage
The target is calculated as a percentage of the signal bar’s closing price.
Separate target settings are available for standard and Super signals.
### Internal Level targets
The selected internal channel level is used as the target only when it lies beyond the signal close in the expected direction.
For a bullish signal, the internal target must be above the signal close.
For a bearish signal, the internal target must be below the signal close.
When the selected internal level is not positioned in the required direction, no historical outcome is started for that signal.
This prevents the script from creating an invalid target behind the recorded entry price.
## Standard and Super target settings
When Percentage mode is selected:
* Standard Target is used for BULL and BEAR signals;
* Super Target is used for SBULL and SBEAR signals;
* Standard Stop is used for BULL and BEAR signals;
* Super Stop is used for SBULL and SBEAR signals.
Targets and stops are measured from the confirmed signal bar’s closing price.
They are research references only and are not automatically submitted as orders.
## Outcome evaluation
The signal bar’s closing price becomes the recorded reference price.
Target and stop evaluation begins on the following chart bar.
The signal candle’s earlier high and low are therefore not used to determine the outcome after the entry has been recorded at its close.
For bullish measurements:
* the target is reached when a later high touches or exceeds the target;
* the stop is reached when a later low touches or falls below the stop.
For bearish measurements:
* the target is reached when a later low touches or falls below the target;
* the stop is reached when a later high touches or exceeds the stop.
## Target and stop on the same bar
When both the target and stop are touched during the same evaluation bar, the script records a stop outcome.
This conservative rule is used because the script cannot determine the exact intrabar order from standard chart-bar data.
A lower-timeframe price path is not reconstructed.
## Target and stop reference lines
The most recently created target and stop levels can be displayed temporarily on the chart.
The Target/Stop Line Length controls how many bars these references remain visible after they are created.
The display duration does not control how long the historical outcome remains active.
An outcome continues to be evaluated until its target or stop is reached, even after the visual lines disappear.
## Standard outcome table
The standard table reports completed BULL and BEAR measurements.
The format is:
* T: target outcomes;
* S: stop outcomes;
* percentage: target outcomes divided by completed target and stop outcomes.
For example:
BULL T/S: 12/8 (60%)
This means that 12 completed bullish measurements reached their targets and 8 reached their stops.
## Super outcome table
The Super table reports the same measurements separately for SBULL and SBEAR signals.
Super results are not combined with standard signal results.
This allows users to compare the script’s wick-extension classification with the standard recovery classification.
## Meaning of the table percentages
The percentages are simplified historical target-outcome ratios.
They are not:
* guaranteed win rates;
* expected future returns;
* probability forecasts;
* full strategy results;
* proof of profitability.
The calculations do not account for:
* commissions;
* slippage;
* spread;
* liquidity;
* position sizing;
* portfolio equity;
* order rejection;
* realistic execution;
* overlapping positions;
* complete intrabar sequencing.
Only one unresolved measurement is tracked at a time, so not every displayed signal is represented in the tables.
Results depend on the selected:
* symbol;
* timeframe;
* available chart history;
* FVG structure;
* smoothing length;
* minimum outside-bar requirement;
* cooldown;
* volume settings;
* Super threshold;
* target mode;
* target settings;
* stop settings.
Historical results do not imply future performance.
# How to Use
## 1. Use a standard chart
Apply FVG Channel to a standard candlestick or bar chart.
Avoid evaluating signal performance on synthetic chart types such as:
* Heikin Ashi;
* Renko;
* Kagi;
* Point and Figure;
* Range charts.
Synthetic chart prices may not represent directly tradable market prices.
## 2. Begin with the default channel settings
The default Smoothing Length is 20.
This gives the active bullish and bearish FVG reference averages two smoothing passes of 20 bars each.
Observe how the channel behaves on the selected symbol before reducing or increasing the setting.
Use a shorter length when a faster channel is preferred.
Use a longer length when a slower and smoother structure is preferred.
## 3. Read the channel position
Use the upper and lower boundaries to understand where price is trading relative to the smoothed active FVG structure.
Price inside the channel indicates that it is between the two adaptive boundaries.
Price below the lower boundary indicates a lower-channel overextension.
Price above the upper boundary indicates an upper-channel overextension.
An overextension is not a signal by itself.
The script waits for a confirmed recovery back inside the channel.
## 4. Wait for the required outside closes
The default Minimum Closes Outside Channel setting is 5.
For a bullish setup, price must close below the lower boundary for at least five consecutive confirmed bars.
For a bearish setup, price must close above the upper boundary for at least five consecutive confirmed bars.
Changing this value adjusts how persistent the overextension must be.
## 5. Wait for the confirmed recovery
After the required outside closes:
* a bullish condition requires price to cross and close back above the lower boundary;
* a bearish condition requires price to cross and close back below the upper boundary.
The signal is confirmed only when the candle closes.
A temporary intrabar move through the boundary does not create a finalized signal unless the close satisfies the condition.
## 6. Distinguish standard and Super signals
Use the signal labels to identify the classification.
* BULL is a standard bullish recovery.
* SBULL is a bullish recovery with sufficient lower-wick extension.
* BEAR is a standard bearish recovery.
* SBEAR is a bearish recovery with sufficient upper-wick extension.
A Super signal is not automatically better than a standard signal.
It only means that the wick-extension threshold was reached.
## 7. Adjust the Super threshold carefully
The default Super Signal Wick Extension is 15%.
This percentage is measured relative to the relevant channel-boundary price.
A higher value makes Super signals rarer.
A lower value makes them more common.
Review the scale and volatility characteristics of the selected market before changing this setting significantly.
## 8. Use volume confirmation when appropriate
Enable Volume Confirmation when signals should require reported volume above a selected threshold.
A practical starting point is:
* Volume Lookback: 20;
* Volume Confirmation Multiplier: 1.0.
This requires current volume to be above its 20-bar average.
Increase the multiplier for a stricter requirement.
Volume confirmation may be more useful on instruments with reliable volume data.
## 9. Review the internal levels
The internal channel levels can be used as visual reference points within the adaptive range.
The default levels represent approximately:
* 23.6%;
* 50%;
* 78.6%.
They can help show where price is positioned inside the current channel.
They are not guaranteed support, resistance, or profit targets.
## 10. Review wider market context
Before interpreting a recovery label, examine:
* the broader trend;
* nearby support and resistance;
* volatility;
* channel direction;
* channel width;
* recent price structure;
* active session conditions;
* available volume quality;
* major news or event risk.
A recovery signal against a strong directional trend can fail.
The indicator should not be used as the only reason for a market decision.
## 11. Configure the signal cooldown
The default cooldown is 50 bars for signals of the same direction.
Reduce the setting when more frequent same-direction signals are desired.
Increase it when repeated signals should be restricted.
Bullish and bearish cooldowns operate independently.
## 12. Configure historical measurements
Select Percentage mode for simple percentage-based target and stop research.
A practical starting configuration is:
* Standard Target: 1%;
* Standard Stop: 1%;
* Super Target: 2%;
* Super Stop: 2%.
These are examples only and are not recommended settings for every market or timeframe.
Select an Internal Level target when the channel’s own internal structure should be used.
Remember that a measurement is skipped when the chosen level is not beyond the signal close in the correct direction.
## 13. Read the target and stop lines
When a valid outcome starts:
* the green line represents the target;
* the red line represents the stop.
The lines remain visible for the selected number of bars.
Their disappearance does not necessarily mean the outcome has been resolved.
## 14. Read the tables correctly
The standard table separates BULL and BEAR results.
The Super table separates SBULL and SBEAR results.
T means completed target outcomes.
S means completed stop outcomes.
The percentage represents targets divided by completed targets and stops.
Do not interpret the percentage as a guaranteed win rate.
## 15. Understand one-active-outcome tracking
The script tracks only one unresolved outcome at a time.
A new signal may be displayed while an older measurement remains active.
However, the newer signal will not be added to the historical table until the previous measurement has ended and another eligible signal occurs.
This prevents overlapping measurements but means the table does not measure every displayed signal.
## 16. Create alerts
Create separate TradingView alerts for the conditions you want to receive:
* Bull Recovery;
* Super Bull Recovery;
* Bear Recovery;
* Super Bear Recovery.
Use Once Per Bar Close to match the script’s confirmed-signal behaviour.
Test alerts on the intended symbol and timeframe before relying on them operationally.
## Suggested starting process
1. Apply the indicator to a liquid symbol on a standard candlestick chart.
2. Keep the default Smoothing Length of 20.
3. Keep Minimum Closes Outside Channel at 5.
4. Leave volume confirmation disabled initially.
5. Observe several BULL and BEAR recovery examples.
6. Compare standard and Super signals.
7. Review whether signals occur with or against the broader trend.
8. Enable volume confirmation and compare the difference.
9. Use the historical tables only as simplified research measurements.
10. Test multiple symbols and timeframes before drawing conclusions.
## Important limitations
* The script stores one reference level from each FVG, not the entire FVG zone.
* FVGs are confirmed only after the relevant chart bar closes.
* FVG mitigation requires a confirmed close through the stored reference.
* Wick contact alone does not remove an FVG reference.
* Active bullish and bearish references are equally weighted.
* The channel uses a price-SMA fallback when no active FVG reference is available.
* Double smoothing introduces delay.
* Recovery signals do not guarantee reversals.
* Super classifications measure wick extension only.
* Volume quality varies across markets and data providers.
* Only one historical outcome is tracked at a time.
* Not every displayed signal is included in the tables.
* Same-bar target and stop contact is recorded as a stop outcome.
* Historical measurements do not include realistic execution costs.
* Internal target modes may skip signals when the selected level is not positioned beyond the signal close.
* Historical table results do not guarantee future performance.
FVG Channel is an analytical and research tool. It does not provide financial advice, guaranteed signals, or guaranteed results. インジケーター

インジケーター

インジケーター

インジケーター
