takeshi_2Step_Screener_MOU_KAKU_FIXED3//@version=5
indicator("MNO_2Step_Screener_MOU_KAKU_FIXED3", overlay=true, max_labels_count=500)
// =========================
// Inputs
// =========================
emaSLen = input.int(5, "EMA Short (5)")
emaMLen = input.int(13, "EMA Mid (13)")
emaLLen = input.int(26, "EMA Long (26)")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
macdZeroTh = input.float(0.2, "MOU: MACD near-zero threshold", step=0.05)
volLookback = input.int(5, "Volume MA days", minval=1)
volMinRatio = input.float(1.3, "MOU: Volume ratio min", step=0.1)
volStrong = input.float(1.5, "Strong volume ratio (Breakout/KAKU)", step=0.1)
volMaxRatio = input.float(3.0, "Volume ratio max (filter)", step=0.1)
wickBodyMult = input.float(2.0, "Pinbar: lowerWick >= body*x", step=0.1)
pivotLen = input.int(20, "Resistance lookback", minval=5)
pullMinPct = input.float(5.0, "Pullback min (%)", step=0.1)
pullMaxPct = input.float(15.0, "Pullback max (%)", step=0.1)
breakLookbackBars = input.int(5, "Pullback route: valid bars after break", minval=1)
// --- Breakout route (押し目なし初動ブレイク) ---
useBreakoutRoute = input.bool(true, "Enable MOU Breakout Route (no pullback)")
breakConfirmPct = input.float(0.3, "Break confirm: close > R*(1+%)", step=0.1)
bigBodyLookback = input.int(20, "Break candle body MA length", minval=5)
bigBodyMult = input.float(1.2, "Break candle: body >= MA*mult", step=0.1)
requireCloseNearHigh = input.bool(true, "Break candle: close near high")
closeNearHighPct = input.float(25.0, "Close near high threshold (% of range)", step=1.0)
allowMACDAboveZeroInstead = input.bool(true, "Breakout route: allow MACD GC above zero instead")
// 表示
showEMA = input.bool(true, "Plot EMAs")
showMou = input.bool(true, "Show MOU label")
showKaku = input.bool(true, "Show KAKU label")
showDebugTbl = input.bool(false, "Show debug table (last bar)")
locChoice = input.string("Below Bar", "Label location", options= )
lblLoc = locChoice == "Below Bar" ? location.belowbar : location.abovebar
// =========================
// EMA
// =========================
emaS = ta.ema(close, emaSLen)
emaM = ta.ema(close, emaMLen)
emaL = ta.ema(close, emaLLen)
// plot は if の中に入れない(naで制御)
plot(showEMA ? emaS : na, color=color.new(color.yellow, 0), title="EMA 5")
plot(showEMA ? emaM : na, color=color.new(color.blue, 0), title="EMA 13")
plot(showEMA ? emaL : na, color=color.new(color.orange, 0), title="EMA 26")
emaUpS = emaS > emaS
emaUpM = emaM > emaM
emaUpL = emaL > emaL
goldenOrder = emaS > emaM and emaM > emaL
above26_2days = close > emaL and close > emaL
// 勝率維持の土台(緩めない)
baseTrendOK = (emaUpS and emaUpM and emaUpL) and goldenOrder and above26_2days
// =========================
// MACD
// =========================
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdGC = ta.crossover(macdLine, macdSig)
macdUp = macdLine > macdLine
macdNearZero = math.abs(macdLine) <= macdZeroTh
macdGCAboveZero = macdGC and macdLine > 0 and macdSig > 0
macdMouOK = macdGC and macdNearZero and macdUp
macdBreakOK = allowMACDAboveZeroInstead ? (macdMouOK or macdGCAboveZero) : macdMouOK
// =========================
// Volume
// =========================
volMA = ta.sma(volume, volLookback)
volRatio = volMA > 0 ? (volume / volMA) : na
volumeMouOK = volRatio >= volMinRatio and volRatio <= volMaxRatio
volumeStrongOK = volRatio >= volStrong and volRatio <= volMaxRatio
// =========================
// Candle patterns
// =========================
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
pinbar = (lowerWick >= wickBodyMult * body) and (lowerWick > upperWick) and (close >= open)
bullEngulf =
close > open and close < open and
close >= open and open <= close
bigBull =
close > open and
open < emaM and close > emaS and
(body > ta.sma(body, 20))
candleOK = pinbar or bullEngulf or bigBull
// =========================
// Resistance / Pullback route
// =========================
res = ta.highest(high, pivotLen)
pullbackPct = res > 0 ? (res - close) / res * 100.0 : na
pullbackOK = pullbackPct >= pullMinPct and pullbackPct <= pullMaxPct
brokeRes = ta.crossover(close, res )
barsSinceBreak = ta.barssince(brokeRes)
afterBreakZone = (barsSinceBreak >= 0) and (barsSinceBreak <= breakLookbackBars)
pullbackRouteOK = afterBreakZone and pullbackOK
// =========================
// Breakout route (押し目なし初動ブレイク)
// =========================
breakConfirm = close > res * (1.0 + breakConfirmPct / 100.0)
bullBreak = close > open
bodyMA = ta.sma(body, bigBodyLookback)
bigBodyOK = bodyMA > 0 ? (body >= bodyMA * bigBodyMult) : false
rng = math.max(high - low, syminfo.mintick)
closeNearHighOK = not requireCloseNearHigh ? true : ((high - close) / rng * 100.0 <= closeNearHighPct)
mou_breakout =
useBreakoutRoute and
baseTrendOK and
breakConfirm and
bullBreak and
bigBodyOK and
closeNearHighOK and
volumeStrongOK and
macdBreakOK
mou_pullback = baseTrendOK and volumeMouOK and candleOK and macdMouOK and pullbackRouteOK
mou = mou_pullback or mou_breakout
// =========================
// KAKU (Strict): 8条件 + 最終三点
// =========================
cond1 = emaUpS and emaUpM and emaUpL
cond2 = goldenOrder
cond3 = above26_2days
cond4 = macdGCAboveZero
cond5 = volumeMouOK
cond6 = candleOK
cond7 = pullbackOK
cond8 = pullbackRouteOK
all8_strict = cond1 and cond2 and cond3 and cond4 and cond5 and cond6 and cond7 and cond8
final3 = pinbar and macdGCAboveZero and volumeStrongOK
kaku = all8_strict and final3
// =========================
// Display (統一ラベル)
// =========================
showKakuNow = showKaku and kaku
showMouPull = showMou and mou_pullback and not kaku
showMouBrk = showMou and mou_breakout and not kaku
plotshape(showMouPull, title="MOU_PULLBACK", style=shape.labelup, text="猛",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showMouBrk, title="MOU_BREAKOUT", style=shape.labelup, text="猛B",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showKakuNow, title="KAKU", style=shape.labelup, text="確",
color=color.new(color.yellow, 0), textcolor=color.black, location=lblLoc, size=size.small)
// =========================
// Alerts
// =========================
alertcondition(mou, title="MNO_MOU", message="MNO: MOU triggered")
alertcondition(mou_breakout, title="MNO_MOU_BREAKOUT", message="MNO: MOU Breakout triggered")
alertcondition(mou_pullback, title="MNO_MOU_PULLBACK", message="MNO: MOU Pullback triggered")
alertcondition(kaku, title="MNO_KAKU", message="MNO: KAKU triggered")
// =========================
// Debug table (optional)
// =========================
var table t = table.new(position.top_right, 2, 14, border_width=1, border_color=color.new(color.white, 60))
fRow(_name, _cond, _r) =>
bg = _cond ? color.new(color.lime, 70) : color.new(color.red, 80)
tx = _cond ? "OK" : "NO"
table.cell(t, 0, _r, _name, text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, _r, tx, text_color=color.white, bgcolor=bg)
if showDebugTbl and barstate.islast
// ❗ colspanは使えないので2セルでヘッダーを作る
table.cell(t, 0, 0, "MNO Debug", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, 0, "", text_color=color.white, bgcolor=color.new(color.black, 0))
fRow("BaseTrend", baseTrendOK, 1)
fRow("MOU Pullback", mou_pullback, 2)
fRow("MOU Breakout", mou_breakout, 3)
fRow("Break confirm", breakConfirm, 4)
fRow("Break big body", bigBodyOK, 5)
fRow("Break close high", closeNearHighOK, 6)
fRow("Break vol strong", volumeStrongOK, 7)
fRow("Break MACD", macdBreakOK, 8)
fRow("KAKU all8", all8_strict, 9)
fRow("KAKU final3", final3, 10)
fRow("MOU any", mou, 11)
fRow("KAKU", kaku, 12)
תבניות גרפים
MNO_2Step_Strategy_MOU_KAKU (Publish-Clear)//@version=5
strategy("MNO_2Step_Strategy_MOU_KAKU (Publish-Clear)", overlay=true, pyramiding=0,
max_labels_count=500, max_lines_count=500,
initial_capital=100000,
default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// =========================
// Inputs
// =========================
emaSLen = input.int(5, "EMA Short (5)")
emaMLen = input.int(13, "EMA Mid (13)")
emaLLen = input.int(26, "EMA Long (26)")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
macdZeroTh = input.float(0.2, "MOU: MACD near-zero threshold", step=0.05)
volLookback = input.int(5, "Volume MA days", minval=1)
volMinRatio = input.float(1.3, "MOU: Volume ratio min", step=0.1)
volStrong = input.float(1.5, "Strong volume ratio (Breakout/KAKU)", step=0.1)
volMaxRatio = input.float(3.0, "Volume ratio max (filter)", step=0.1)
wickBodyMult = input.float(2.0, "Pinbar: lowerWick >= body*x", step=0.1)
pivotLen = input.int(20, "Resistance lookback", minval=5)
pullMinPct = input.float(5.0, "Pullback min (%)", step=0.1)
pullMaxPct = input.float(15.0, "Pullback max (%)", step=0.1)
breakLookbackBars = input.int(5, "Pullback route: valid bars after break", minval=1)
// --- Breakout route (押し目なし初動ブレイク) ---
useBreakoutRoute = input.bool(true, "Enable MOU Breakout Route (no pullback)")
breakConfirmPct = input.float(0.3, "Break confirm: close > R*(1+%)", step=0.1)
bigBodyLookback = input.int(20, "Break candle body MA length", minval=5)
bigBodyMult = input.float(1.2, "Break candle: body >= MA*mult", step=0.1)
requireCloseNearHigh = input.bool(true, "Break candle: close near high")
closeNearHighPct = input.float(25.0, "Close near high threshold (% of range)", step=1.0)
allowMACDAboveZeroInstead = input.bool(true, "Breakout route: allow MACD GC above zero instead")
// 表示
showEMA = input.bool(true, "Plot EMAs")
showMouLabels = input.bool(true, "Show MOU/MOU-B labels")
showKakuLabels = input.bool(true, "Show KAKU labels")
showDebugTbl = input.bool(true, "Show debug table (last bar)")
showStatusLbl = input.bool(true, "Show status label (last bar always)")
locChoice = input.string("Below Bar", "Label location", options= )
lblLoc = locChoice == "Below Bar" ? location.belowbar : location.abovebar
// =========================
// 必ず決済が起きる設定(投稿クリア用)
// =========================
enableTPSL = input.bool(true, "Enable TP/SL")
tpPct = input.float(2.0, "Take Profit (%)", step=0.1, minval=0.1) // ←投稿クリア向けに近め
slPct = input.float(1.0, "Stop Loss (%)", step=0.1, minval=0.1) // ←投稿クリア向けに近め
maxHoldBars = input.int(30, "Max bars in trade (force close)", minval=1)
entryMode = input.string("MOU or KAKU", "Entry trigger", options= )
// ✅ 保険:トレード0件を避ける(投稿クリア用)
// 1回でもクローズトレードができたら自動で沈黙
publishAssist = input.bool(true, "Publish Assist (safety entry if 0 trades)")
// =========================
// EMA
// =========================
emaS = ta.ema(close, emaSLen)
emaM = ta.ema(close, emaMLen)
emaL = ta.ema(close, emaLLen)
plot(showEMA ? emaS : na, color=color.new(color.yellow, 0), title="EMA 5")
plot(showEMA ? emaM : na, color=color.new(color.blue, 0), title="EMA 13")
plot(showEMA ? emaL : na, color=color.new(color.orange, 0), title="EMA 26")
emaUpS = emaS > emaS
emaUpM = emaM > emaM
emaUpL = emaL > emaL
goldenOrder = emaS > emaM and emaM > emaL
above26_2days = close > emaL and close > emaL
baseTrendOK = (emaUpS and emaUpM and emaUpL) and goldenOrder and above26_2days
// =========================
// MACD
// =========================
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdGC = ta.crossover(macdLine, macdSig)
macdUp = macdLine > macdLine
macdNearZero = math.abs(macdLine) <= macdZeroTh
macdGCAboveZero = macdGC and macdLine > 0 and macdSig > 0
macdMouOK = macdGC and macdNearZero and macdUp
macdBreakOK = allowMACDAboveZeroInstead ? (macdMouOK or macdGCAboveZero) : macdMouOK
// =========================
// Volume
// =========================
volMA = ta.sma(volume, volLookback)
volRatio = volMA > 0 ? (volume / volMA) : na
volumeMouOK = volRatio >= volMinRatio and volRatio <= volMaxRatio
volumeStrongOK = volRatio >= volStrong and volRatio <= volMaxRatio
// =========================
// Candle patterns
// =========================
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
pinbar = (lowerWick >= wickBodyMult * body) and (lowerWick > upperWick) and (close >= open)
bullEngulf = close > open and close < open and close >= open and open <= close
bigBull = close > open and open < emaM and close > emaS and (body > ta.sma(body, 20))
candleOK = pinbar or bullEngulf or bigBull
// =========================
// Resistance / Pullback route
// =========================
res = ta.highest(high, pivotLen)
pullbackPct = res > 0 ? (res - close) / res * 100.0 : na
pullbackOK = pullbackPct >= pullMinPct and pullbackPct <= pullMaxPct
brokeRes = ta.crossover(close, res )
barsSinceBreak = ta.barssince(brokeRes)
afterBreakZone = (barsSinceBreak >= 0) and (barsSinceBreak <= breakLookbackBars)
pullbackRouteOK = afterBreakZone and pullbackOK
// =========================
// Breakout route (押し目なし初動ブレイク)
// =========================
breakConfirm = close > res * (1.0 + breakConfirmPct / 100.0)
bullBreak = close > open
bodyMA = ta.sma(body, bigBodyLookback)
bigBodyOK = bodyMA > 0 ? (body >= bodyMA * bigBodyMult) : false
rng = math.max(high - low, syminfo.mintick)
closeNearHighOK = not requireCloseNearHigh ? true : ((high - close) / rng * 100.0 <= closeNearHighPct)
mou_breakout = useBreakoutRoute and baseTrendOK and breakConfirm and bullBreak and bigBodyOK and closeNearHighOK and volumeStrongOK and macdBreakOK
mou_pullback = baseTrendOK and volumeMouOK and candleOK and macdMouOK and pullbackRouteOK
mou = mou_pullback or mou_breakout
// =========================
// KAKU (Strict): 8条件 + 最終三点
// =========================
cond1 = emaUpS and emaUpM and emaUpL
cond2 = goldenOrder
cond3 = above26_2days
cond4 = macdGCAboveZero
cond5 = volumeMouOK
cond6 = candleOK
cond7 = pullbackOK
cond8 = pullbackRouteOK
all8_strict = cond1 and cond2 and cond3 and cond4 and cond5 and cond6 and cond7 and cond8
final3 = pinbar and macdGCAboveZero and volumeStrongOK
kaku = all8_strict and final3
// =========================
// Entry (strategy)
// =========================
entrySignal = entryMode == "KAKU only" ? kaku : (mou or kaku)
canEnter = strategy.position_size == 0
newEntryKaku = canEnter and kaku and entrySignal
newEntryMouB = canEnter and (not kaku) and mou_breakout and entrySignal
newEntryMou = canEnter and (not kaku) and mou_pullback and entrySignal
// --- Publish Assist(保険エントリー) ---
// 条件が厳しすぎて「トレード0件」だと投稿時に警告が出る。
// closedtradesが0の間だけ、軽いEMAクロスで1回だけ拾う(その後は沈黙)。
assistFast = ta.ema(close, 5)
assistSlow = ta.ema(close, 20)
assistEntry = publishAssist and strategy.closedtrades == 0 and canEnter and ta.crossover(assistFast, assistSlow)
// 実エントリー
if newEntryKaku or newEntryMouB or newEntryMou or assistEntry
strategy.entry("LONG", strategy.long)
// ラベル(視認)
if showMouLabels and newEntryMou
label.new(bar_index, low, "猛(IN)", style=label.style_label_up, color=color.new(color.lime, 0), textcolor=color.black)
if showMouLabels and newEntryMouB
label.new(bar_index, low, "猛B(IN)", style=label.style_label_up, color=color.new(color.lime, 0), textcolor=color.black)
if showKakuLabels and newEntryKaku
label.new(bar_index, low, "確(IN)", style=label.style_label_up, color=color.new(color.yellow, 0), textcolor=color.black)
if assistEntry
label.new(bar_index, low, "ASSIST(IN)", style=label.style_label_up, color=color.new(color.aqua, 0), textcolor=color.black)
// =========================
// Exit (TP/SL + 強制クローズ)
// =========================
inPos = strategy.position_size > 0
tpPx = inPos ? strategy.position_avg_price * (1.0 + tpPct/100.0) : na
slPx = inPos ? strategy.position_avg_price * (1.0 - slPct/100.0) : na
if enableTPSL
strategy.exit("TP/SL", from_entry="LONG", limit=tpPx, stop=slPx)
// 最大保有バーで強制決済(これが「レポート無し」回避の最後の保険)
var int entryBar = na
if strategy.position_size > 0 and strategy.position_size == 0
entryBar := bar_index
if strategy.position_size == 0
entryBar := na
forceClose = inPos and not na(entryBar) and (bar_index - entryBar >= maxHoldBars)
if forceClose
strategy.close("LONG")
// =========================
// 利確/損切/強制クローズのラベル
// =========================
closedThisBar = (strategy.position_size > 0) and (strategy.position_size == 0)
avgPrev = strategy.position_avg_price
tpPrev = avgPrev * (1.0 + tpPct/100.0)
slPrev = avgPrev * (1.0 - slPct/100.0)
hitTP = closedThisBar and high >= tpPrev
hitSL = closedThisBar and low <= slPrev
// 同一足TP/SL両方は厳密に判断できないので、表示は「TP優先」で簡略(投稿ギリギリ版)
if hitTP
label.new(bar_index, high, "利確", style=label.style_label_down, color=color.new(color.lime, 0), textcolor=color.black)
else if hitSL
label.new(bar_index, low, "損切", style=label.style_label_up, color=color.new(color.red, 0), textcolor=color.white)
else if closedThisBar and forceClose
label.new(bar_index, close, "時間決済", style=label.style_label_left, color=color.new(color.gray, 0), textcolor=color.white)
// =========================
// Signals (猛/猛B/確)
// =========================
plotshape(showMouLabels and mou_pullback and not kaku, title="MOU_PULLBACK", style=shape.labelup, text="猛",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showMouLabels and mou_breakout and not kaku, title="MOU_BREAKOUT", style=shape.labelup, text="猛B",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showKakuLabels and kaku, title="KAKU", style=shape.labelup, text="確",
color=color.new(color.yellow, 0), textcolor=color.black, location=lblLoc, size=size.small)
// =========================
// Alerts
// =========================
alertcondition(mou, title="MNO_MOU", message="MNO: MOU triggered")
alertcondition(mou_breakout, title="MNO_MOU_BREAKOUT", message="MNO: MOU Breakout triggered")
alertcondition(mou_pullback, title="MNO_MOU_PULLBACK", message="MNO: MOU Pullback triggered")
alertcondition(kaku, title="MNO_KAKU", message="MNO: KAKU triggered")
alertcondition(assistEntry, title="MNO_ASSIST_ENTRY", message="MNO: ASSIST ENTRY (publish safety)")
// =========================
// Status label(最終足に必ず表示)
// =========================
var label status = na
if showStatusLbl and barstate.islast
label.delete(status)
statusTxt =
"MNO RUNNING " +
"ClosedTrades: " + str.tostring(strategy.closedtrades) + " " +
"BaseTrend: " + (baseTrendOK ? "OK" : "NO") + " " +
"MOU: " + (mou ? "YES" : "no") + " (猛=" + (mou_pullback ? "Y" : "n") + " / 猛B=" + (mou_breakout ? "Y" : "n") + ") " +
"KAKU: " + (kaku ? "YES" : "no") + " " +
"VolRatio: " + (na(volRatio) ? "na" : str.tostring(volRatio, format.mintick)) + " " +
"Pull%: " + (na(pullbackPct) ? "na" : str.tostring(pullbackPct, format.mintick)) + " " +
"Pos: " + (inPos ? "IN" : "OUT")
status := label.new(bar_index, high, statusTxt, style=label.style_label_left, textcolor=color.white, color=color.new(color.black, 0))
// =========================
// Debug table(最終足のみ)
// =========================
var table t = table.new(position.top_right, 2, 14, border_width=1, border_color=color.new(color.white, 60))
fRow(_name, _cond, _r) =>
bg = _cond ? color.new(color.lime, 70) : color.new(color.red, 80)
tx = _cond ? "OK" : "NO"
table.cell(t, 0, _r, _name, text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, _r, tx, text_color=color.white, bgcolor=bg)
if showDebugTbl and barstate.islast
table.cell(t, 0, 0, "MNO Debug", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, 0, "", text_color=color.white, bgcolor=color.new(color.black, 0))
fRow("BaseTrend", baseTrendOK, 1)
fRow("MOU Pullback", mou_pullback, 2)
fRow("MOU Breakout", mou_breakout, 3)
fRow("Break confirm", breakConfirm, 4)
fRow("Break big body", bigBodyOK, 5)
fRow("Break close high", closeNearHighOK, 6)
fRow("Break vol strong", volumeStrongOK, 7)
fRow("Break MACD", macdBreakOK, 8)
fRow("KAKU all8", all8_strict, 9)
fRow("KAKU final3", final3, 10)
fRow("AssistEntry", assistEntry, 11)
fRow("ClosedTrades>0", strategy.closedtrades > 0, 12)
True Gap Finder with Revisit DetectionTrue Gap Finder with Revisit Detection
This indicator is a powerful tool for intraday traders to identify and track price gaps. Unlike simple gap indicators, this script actively tracks the status of the gap, visualizing the void until it is filled (revisited) by price.
Key Features:
Active Gap Tracking: Finds gap-up and gap-down occurrences (where Low > Previous High or High < Previous Low) and actively tracks them.
Gap Zones (Clouds): Visually shades the empty "gap zone" (the void between the gap candles), making it instantly obvious where price needs to travel to fill the gap. The cloud disappears automatically once the gap is filled.
Dynamic Labels: automatically displays price labels at the origin of the gap, showing the specific price range (High-Low) that constitutes the gap. Labels are positioned intelligently to avoid cluttering current price action.
Alerts: Configurable alerts notify you the moment a gap is filled.
Customization: Full control over colors, clouds, labels, and alert settings to match your chart style.
How it works: The indicator tracks the most recent gap. If a new gap forms, it becomes the active focus. When price moves back to "close" or "fill" this gap area, the lines and clouds automatically stop plotting, giving you a clean chart that focuses only on open business.
ATR + True RangeOne indicator for ATR & TR its a common indictor which can be used as one
instead of 2 different its is trial mode only not to be used with out other references
TedAlpha – Structure / FVG / OB Sessions:
Only looks for trades when price is inside your defined London or NY time blocks.
CHOCH:
Uses pivots to track swing highs/lows, then flags a bullish CHOCH when structure flips from LL/LH to HH/HL, and vice versa for bearish.
FVG:
Detects 3-candle imbalance and keeps the zone “active” for fvgLookback bars, then checks if price trades back into it.
Order Blocks:
On a CHOCH, grabs the last opposite candle (bearish before bull CHOCH = bullish OB, bullish before bear CHOCH = bearish OB) and marks its body as the OB zone.
Signal:
A valid long = bull CHOCH + in session + (price inside bullish FVG and/or bullish OB, depending on toggles).
Short is the mirror image.
RR 1:3:
SL uses the last swing low (for longs) or last swing high (for shorts), TP is auto-set at 3× that distance and plotted as lines.
Dynamic Trend Channel - Adaptive Support & Resistance SystemA powerful trend-following indicator that adapts to market conditions in real-time. The Dynamic Trend Channel uses ATR-based volatility measurements to create intelligent support and resistance zones that adjust automatically to price action.
Key Features:
✓ Adaptive channel width based on market volatility (ATR)
✓ Color-coded trend identification (Green = Bullish, Red = Bearish)
✓ Smooth, flowing bands that reduce noise
✓ Breakout signals for high-probability entries
✓ Real-time info table showing trend status and price positioning
✓ Customizable settings for all timeframes
Prev Day ±1% BoundaryThis indicator plots dynamic intraday price bands based on the previous day’s close. It calculates a reference price using yesterday’s daily close and draws:
An upper boundary at +1% above the previous close
A lower boundary at –1% below the previous close
These levels are shown as horizontal lines across all intraday bars, with an optional shaded zone between them.
How to use:
Use the boundaries as intraday reference levels for potential support, resistance, or mean-reversion zones.
When price trades near the upper band, it may indicate short-term extension to the upside relative to the prior close.
When price trades near the lower band, it may indicate short-term extension to the downside.
The shaded region between the lines highlights a ±1% normal fluctuation zone around the previous day’s closing price.
This tool is especially useful for intraday traders on indices like SPX, providing quick visual context for how far price has moved relative to the prior session’s close.
Strategia S&P 500 vs US10Y Yield (od 2000)This strategy explores the macroeconomic relationship between the equity market (S&P 500) and the debt market (10-Year Treasury Yield). Historically, rapid spikes in bond yields often exert downward pressure on equity valuations, leading to corrections or bear markets.
The goal of this strategy is capital preservation. It attempts to switch to cash when yields are rising too aggressively and re-enter the stock market when the bond market stabilizes.
ZKNZCN Önceki Bar H/L (Ayrı Kontrol)Bir önceki barın high & low noktalarını çizgi halinde görmeyi sağlar.
Keltner Channels Strategy NewThe strategy is chenging the same as an original copy, but this one is for tests, so I will publish it and check results
Entry Scanner Conservative Option AKeeping it simple,
Trend,
RSI,
Stoch RSI,
MACD, checked.
Do not have entry where there is noise on selection, look for cluster of same entry signals.
If you can show enough discipline, you will be profitable.
CT
takeshi GPT//@version=5
indicator("猛の掟・初動スクリーナーGPT", overlay = true, timeframe = "", timeframe_gaps = true)
// ======================================================
// ■ 1. パラメータ設定
// ======================================================
// EMA長
emaFastLen = input.int(5, "短期EMA (5)", minval = 1)
emaMidLen = input.int(13, "中期EMA (13)", minval = 1)
emaSlowLen = input.int(26, "長期EMA (26)", minval = 1)
// 出来高
volMaLen = input.int(5, "出来高平均期間", minval = 1)
volMultInitial = input.float(1.3, "出来高 初動ライン (×)", minval = 1.0, step = 0.1)
volMultStrong = input.float(1.5, "出来高 本物ライン (×)", minval = 1.0, step = 0.1)
// 押し目・レジスタンス
pullbackLookback = input.int(20, "直近高値の探索期間", minval = 5)
pullbackMinPct = input.float(5.0, "押し目下限 (%)", minval = 0.0, step = 0.1)
pullbackMaxPct = input.float(15.0, "押し目上限 (%)", minval = 0.0, step = 0.1)
// ピンバー判定パラメータ
pinbarWickRatio = input.float(2.0, "ピンバー下ヒゲ/実体 比率", minval = 1.0, step = 0.5)
pinbarMaxUpperPct = input.float(25.0, "ピンバー上ヒゲ比率上限 (%)", minval = 0.0, step = 1.0)
// 大陽線判定
bigBodyPct = input.float(2.0, "大陽線の最低値幅 (%)", minval = 0.1, step = 0.1)
// ======================================================
// ■ 2. 基本テクニカル計算
// ======================================================
emaFast = ta.ema(close, emaFastLen)
emaMid = ta.ema(close, emaMidLen)
emaSlow = ta.ema(close, emaSlowLen)
// MACD
= ta.macd(close, 12, 26, 9)
// 出来高
volMa = ta.sma(volume, volMaLen)
// 直近高値(押し目判定用)
recentHigh = ta.highest(high, pullbackLookback)
drawdownPct = (recentHigh > 0) ? (recentHigh - close) / recentHigh * 100.0 : na
// ======================================================
// ■ 3. A:トレンド(初動)条件
// ======================================================
// 1. 5EMA↑ 13EMA↑ 26EMA↑
emaUpFast = emaFast > emaFast
emaUpMid = emaMid > emaMid
emaUpSlow = emaSlow > emaSlow
condTrendUp = emaUpFast and emaUpMid and emaUpSlow
// 2. 黄金並び 5EMA > 13EMA > 26EMA
condGolden = emaFast > emaMid and emaMid > emaSlow
// 3. ローソク足が 26EMA 上に2日定着
condAboveSlow2 = close > emaSlow and close > emaSlow
// ======================================================
// ■ 4. B:モメンタム(MACD)条件
// ======================================================
// ヒストグラム縮小+上向き
histShrinkingUp = (math.abs(histLine) < math.abs(histLine )) and (histLine > histLine )
// ゼロライン直下〜直上での上向き
nearZeroRange = 0.5 // ゼロライン±0.5
macdNearZero = math.abs(macdLine) <= nearZeroRange
// MACDが上向き
macdTurningUp = macdLine > macdLine
// MACDゼロライン上でゴールデンクロス
macdZeroCrossUp = macdLine > signalLine and macdLine <= signalLine and macdLine > 0
// B条件:すべて
condMACD = histShrinkingUp and macdNearZero and macdTurningUp and macdZeroCrossUp
// ======================================================
// ■ 5. C:需給(出来高)条件
// ======================================================
condVolInitial = volume > volMa * volMultInitial // 1.3倍〜 初動点灯
condVolStrong = volume > volMa * volMultStrong // 1.5倍〜 本物初動
condVolume = condVolInitial // 「8掟」では1.3倍以上で合格
// ======================================================
// ■ 6. D:ローソク足パターン
// ======================================================
body = math.abs(close - open)
upperWick = high - math.max(close, open)
lowerWick = math.min(close, open) - low
rangeAll = high - low
// 安全対策:0除算回避
rangeAllSafe = rangeAll == 0.0 ? 0.0000001 : rangeAll
bodyPct = body / close * 100.0
// ● 長い下ヒゲ(ピンバー)
lowerToBodyRatio = (body > 0) ? lowerWick / body : 0.0
upperPct = upperWick / rangeAllSafe * 100.0
isBullPinbar = lowerToBodyRatio >= pinbarWickRatio and upperPct <= pinbarMaxUpperPct and close > open
// ● 陽線包み足(bullish engulfing)
prevBearish = close < open
isEngulfingBull = close > open and prevBearish and close >= open and open <= close
// ● 5EMA・13EMAを貫く大陽線
crossFast = open < emaFast and close > emaFast
crossMid = open < emaMid and close > emaMid
isBigBody = bodyPct >= bigBodyPct
isBigBull = close > open and (crossFast or crossMid) and isBigBody
// D条件:どれか1つでOK
condCandle = isBullPinbar or isEngulfingBull or isBigBull
// ======================================================
// ■ 7. E:価格帯(押し目位置 & レジスタンスブレイク)
// ======================================================
// 7. 押し目 -5〜15%
condPullback = drawdownPct >= pullbackMinPct and drawdownPct <= pullbackMaxPct
// 8. レジスタンス突破 → 押し目 → 再上昇
// 直近 pullbackLookback 本の高値をレジスタンスとみなす(現在足除く)
resistance = ta.highest(close , pullbackLookback)
// レジスタンスブレイクが起きたバーからの経過本数
brokeAbove = ta.barssince(close > resistance)
// ブレイク後に一度レジ上まで戻したか
pulledBack = brokeAbove != na ? ta.lowest(low, brokeAbove + 1) < resistance : false
// 現在は再上昇方向か
reRising = close > close
condBreakPull = (brokeAbove != na) and (brokeAbove <= pullbackLookback) and pulledBack and reRising
// ======================================================
// ■ 8. 最終 8条件 & 三点シグナル
// ======================================================
// 8つの掟
condA = condTrendUp and condGolden and condAboveSlow2
condB = condMACD
condC = condVolume
condD = condCandle
condE = condPullback and condBreakPull
all_conditions = condA and condB and condC and condD and condE
// 🟩 最終三点シグナル
// 1. 長い下ヒゲ 2. MACDゼロライン上GC 3. 出来高1.5倍以上
threePoint = isBullPinbar and macdZeroCrossUp and condVolStrong
// 「買い確定」= 8条件すべて + 三点シグナル
buy_confirmed = all_conditions and threePoint
// ======================================================
// ■ 9. チャート表示 & スクリーナー用出力
// ======================================================
// EMA表示
plot(emaFast, color = color.orange, title = "EMA 5")
plot(emaMid, color = color.new(color.blue, 10), title = "EMA 13")
plot(emaSlow, color = color.new(color.green, 20), title = "EMA 26")
// 初動シグナル
plotshape(
all_conditions and not buy_confirmed,
title = "初動シグナル(掟8条件クリア)",
style = shape.labelup,
color = color.new(color.yellow, 0),
text = "初動",
location = location.belowbar,
size = size.small)
// 三点フルシグナル(買い確定)
plotshape(
buy_confirmed,
title = "三点フルシグナル(買い確定)",
style = shape.labelup,
color = color.new(color.lime, 0),
text = "買い",
location = location.belowbar,
size = size.large)
// スクリーナー用 series 出力(非表示)
plot(all_conditions ? 1 : 0, title = "all_conditions (8掟クリア)", display = display.none)
plot(buy_confirmed ? 1 : 0, title = "buy_confirmed (三点+8掟)", display = display.none)
9/39 EMA Crossover + ADX + RSI Filter (No builtin ADX)
9/39 EMA Crossover + ADX + RSI Filter
This indicator combines classic trend‑following EMAs with momentum and trend‑strength filters to generate high‑quality Buy/Sell signals. It is designed for traders who want cleaner entries, reduced noise, and confirmation‑based signals.
✅ How It Works
1. EMA Trend Logic
• Buy Signal:
9 EMA crosses above 39 EMA
• Sell Signal:
9 EMA crosses below 39 EMA
This captures short‑term momentum shifts within the broader trend.
✅ 2. ADX Trend Strength Filter
To avoid weak or sideways markets, signals only trigger when:
• ADX > 20
This ensures the market has enough directional strength before taking trades.
✅ 3. RSI Momentum Filter
Momentum must align with the direction of the crossover:
• Buy: RSI > 50
• Sell: RSI < 50
This prevents counter‑trend entries and improves signal reliability.
✅ Final Signal Conditions
✅ BUY
• 9 EMA crosses above 39 EMA
• ADX > 20
• RSI > 50
✅ SELL
• 9 EMA crosses below 39 EMA
• ADX > 20
• RSI < 50
✅ Features
• Clean BUY/SELL labels on chart
• ADX calculated manually (compatible with all Pine environments)
• Alerts included for automation
• Works on all timeframes and instruments
✅ Best Use‑Cases
• Trend‑following strategies
• Swing trading
• Intraday momentum confirmation
• Filtering out sideways/noisy markets
Multi-MA + RSI Pullback Strategy (Jordan)1️⃣ Strategy logic I’ll code
From your screenshots:
Indicators
• EMAs: 600 / 200 / 100 / 50
• RSI: length 6, levels 80 / 20
Rules (simplified so a script can handle them):
• Use a higher-timeframe trend filter (15m or 1h) using the EMAs.
• Take entries on the chart timeframe (you can use 1m or 5m).
• Long:
• Higher-TF trend is up.
• Price is pulling back into a zone (between 50 EMA and 100 EMA on the entry timeframe – this approximates your 50–61% retrace).
• RSI crosses below 20 (oversold).
• Short:
• Higher-TF trend is down.
• Price pulls back between 50 & 100 EMAs.
• RSI crosses above 80 (overbought).
• Exits: ATR-based stop + take-profit with adjustable R:R (2:1 or 3:1).
• Max 4 trades per day.
News filter & “only trade gold” you handle manually (run it on XAUUSD and avoid news times yourself – TradingView can’t read the economic calendar from code).
teril 1H EMA50 Harami Reversal Alerts BB Touch teril Harami Reversal Alerts BB Touch (Wick Filter Added + 1H EMA50)
teril Harami Reversal Alerts BB Touch (Wick Filter Added + 1H EMA50)
teril Harami Reversal Alerts BB Touch (Wick Filter Added + 1H EMA50)
teril Harami Reversal Alerts BB Touch (Wick Filter Added + 1H EMA50)
Capitulation Detector StrategyA multi-factor capitulation detector designed to identify exhaustion points in extended trends. It focuses on fading capitulation moves after multi-leg trends with extreme volume and price extension.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE CONCEPT
Capitulation occurs when the last holders give up — panic selling into lows or euphoric buying into highs. These moments create asymmetric opportunities because:
Sentiment becomes maximally skewed
Weak hands are flushed out
Price deviates far from equilibrium
The "fuel" for continuation is exhausted
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE 6 FACTORS
Trend Persistence — Price stays on one side of 38 EMA for 12+ bars, confirming a sustained directional move
Acceleration — Price stays on one side of 5 EMA for 3+ bars, showing the move is accelerating into exhaustion
Volume Spike — Current bar volume ≥ 2x the 20-bar average
Body Expansion — Candle body ≥ 1.5x average, showing conviction/panic in the move
Extension — Price is 2+ ATR away from the 38 EMA, indicating overextension from equilibrium
Multi-Leg Structure — At least 3 consecutive lower lows (for longs) or higher highs (for shorts)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNAL LOGIC
Bullish Capitulation: 4+ factors align + price below 38 EMA + down candle + volume spike
Bearish Capitulation: 4+ factors align + price above 38 EMA + up candle + volume spike
The strategy enters counter-trend, fading the exhaustion move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXIT OPTIONS
ATR-based stop loss (default: 2 ATR)
ATR-based take profit (default: 3 ATR)
Optional trailing stop
Time filter for session-specific trading
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEST PRACTICES
Works best on liquid instruments with clean trends
More reliable after 3+ legs in the trend
Higher conviction when daily AND intraday timeframes align
"The bigger and more extended, the better"
Consider VWAP as additional confirmation (not coded here)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS GUIDE
Min Score: Increase for fewer, higher-quality signals
Volume Spike Multiplier: 2x; increase for stricter filter
Extension ATR: Higher values = more overextended setups only
Trend Bars Min: Higher values = longer established trends required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS
Bullish Capitulation (potential long)
Bearish Capitulation (potential short)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DISCLAIMER
This is a counter-trend strategy — inherently higher risk than trend-following. Always use proper position sizing and risk management. Backtest thoroughly on your specific instruments and timeframes.
CHOP-O-METER - Multi-Factor Choppiness DetectorA composite indicator that quantifies market choppiness using four independent measurements, helping you identify when to trade trends vs. when to sit out or fade moves.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
The Chop-O-Meter combines four normalized components (each scaled 0-100) into a single weighted score:
1. Price Efficiency (Kaufman-style)
Measures how efficiently price moved from point A to B. If price travels far but nets little distance, efficiency is low = high chop.
2. Direction Change Frequency
Counts how often price direction flips within the lookback period. More flips = more chop.
3. Mean Reversion Intensity
Tracks how often price crosses its moving average. Frequent crosses indicate a ranging, choppy market.
4. ATR Expansion Ratio
Compares the sum of individual bar ranges to the total period range. High ratio means lots of movement within a tight overall range = chop.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
READING THE INDICATOR
Above 65 (Red Zone): High chop — avoid trend-following, consider mean-reversion or staying flat
Below 35 (Green Zone): Trending — momentum strategies more likely to succeed
35-65 (Orange): Transitional/uncertain regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNALS
🔻 Green triangle (top): Chop breaking down — potential trend starting
🔺 Red triangle (bottom): Trend exhausting — chop may be returning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
Lookback Period: Number of bars to analyze (default 20)
Component Weights: Adjust influence of each factor
Thresholds: Customize high/low chop boundaries
Show Components: Toggle individual factor plots for debugging
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
USE CASES
Filter out trend trades when chop score is high
Reduce position size in choppy regimes
Switch between mean-reversion and momentum strategies
Identify regime transitions early
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS INCLUDED
Entering High Chop
Entering Trend
Chop Breaking Down
Ahmed Gold Signals - 5M LIVE (Frequent)📈 Gold (XAUUSD) Trading Signals – Precision-Based Strategy
Our Gold signals are built on pure price action, not random indicators or guesswork.
🔍 How our signals are generated
We focus on:
🧲 Liquidity Sweeps
Identifying when price grabs stop-losses above highs or below lows and then reverses
📊 Clear trend direction using EMA 50 & EMA 200
✅ Strong confirmation candles after the sweep
🎯 Entries only in the direction of the trend to increase accuracy
🔵 BUY Signals
Bullish market structure
Price sweeps liquidity below recent lows
Strong bullish confirmation candle closes
➡️ High-probability BUY setup
🔴 SELL Signals
Bearish market structure
Price sweeps liquidity above recent highs
Strong bearish confirmation candle closes
➡️ High-probability SELL setup
⏱️ Timeframe
5-minute chart (5M)
Fast, precise signals ideal for scalping Gold
🛡️ Risk Management
Stop loss placed beyond the liquidity sweep
Clear take-profit targets
Risk-to-reward typically 1:2 or better
⚠️ Important Notes
We do not trade every move
We wait for confirmation
Quality over quantity — always
FLUXO COMPRA E VENDA MGThe “FLUXO COMPRA E VENDA MG” indicator is a scoring-based system designed to evaluate buying and selling pressure by combining trend, volume, order flow, momentum, and Smart Money concepts (liquidity, sweeps, and FVG).
It does not rely on a single condition. Instead, it aggregates multiple weighted factors and only generates buy or sell signa
AlphaWave Band + Tao Trend Start/End (JH) v1.1AlphaWave Band + Tao Trend Start/End (JH)
이 지표는 **“추세구간만 먹는다”**는 철학으로 설계된 트렌드 시각화 & 트리거 도구입니다.
예측하지 않고,
횡보를 피하고,
이미 시작된 추세의 시작과 끝만 명확하게 표시하는 데 집중합니다.
🔹 핵심 개념
AlphaWave Band
→ 변동성 기반으로 기다려야 할 자리를 만들어 줍니다.
TAO RSI
→ 과열/과매도 구간에서 지금 반응해야 할 순간을 정확히 짚어줍니다.
🔹 신호 구조 (단순 · 명확)
START (▲ 아래 표시)
추세가 시작되는 구간
END (▼ 위 표시)
추세가 종료되는 구간
> 중간 매매는 각자의 전략 영역이며,
이 지표는 추세의 시작과 끝을 시각화하는 데 목적이 있습니다.
🔹 시각적 특징
20 HMA 추세선
상승 추세: 노란색
하락 추세: 녹색
횡보 구간: 중립 색상
기존 밴드와 세력 표시를 훼손하지 않고
추세 흐름만 직관적으로 강조
🔹 추천 사용 구간
3분 / 5분 (단타 · 스캘핑)
일봉 (중기 추세 확인)
> “예측하지 말고, 추세를 따라가라.”
---
📌 English Description (TradingView)
AlphaWave Band + Tao Trend Start/End (JH)
This indicator is designed with one clear philosophy:
“Trade only the trend.”
No prediction.
No noise.
No meaningless sideways signals.
It focuses purely on visualizing the START and END of trend phases.
🔹 Core Concept
AlphaWave Band
→ Defines where you should wait based on volatility.
TAO RSI
→ Pinpoints when price reaction actually matters near exhaustion zones.
🔹 Signal Logic (Clean & Minimal)
START (▲ below price)
Marks the beginning of a trend
END (▼ above price)
Marks the end of a trend
> Entries inside the trend are trader-dependent.
This tool is about structure, not over-signaling.
🔹 Visual Design
20 HMA Trend Line
Uptrend: Yellow
Downtrend: Green
Sideways: Neutral
Trend visualization without damaging existing bands or volume context
🔹 Recommended Timeframes
3m / 5m for scalping & intraday
Daily for higher timeframe trend structure
> “Don’t predict. Follow the trend.”
new takesi_2Step_Screener_MOU_KAKU_FIXED4 (Visible)//@version=5
indicator("MNO_2Step_Screener_MOU_KAKU_FIXED4 (Visible)", overlay=true, max_labels_count=500)
// =========================
// Inputs
// =========================
emaSLen = input.int(5, "EMA Short (5)")
emaMLen = input.int(13, "EMA Mid (13)")
emaLLen = input.int(26, "EMA Long (26)")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
macdZeroTh = input.float(0.2, "MOU: MACD near-zero threshold", step=0.05)
volLookback = input.int(5, "Volume MA days", minval=1)
volMinRatio = input.float(1.3, "MOU: Volume ratio min", step=0.1)
volStrong = input.float(1.5, "Strong volume ratio (Breakout/KAKU)", step=0.1)
volMaxRatio = input.float(3.0, "Volume ratio max (filter)", step=0.1)
wickBodyMult = input.float(2.0, "Pinbar: lowerWick >= body*x", step=0.1)
pivotLen = input.int(20, "Resistance lookback", minval=5)
pullMinPct = input.float(5.0, "Pullback min (%)", step=0.1)
pullMaxPct = input.float(15.0, "Pullback max (%)", step=0.1)
breakLookbackBars = input.int(5, "Pullback route: valid bars after break", minval=1)
// --- Breakout route (押し目なし初動ブレイク) ---
useBreakoutRoute = input.bool(true, "Enable MOU Breakout Route (no pullback)")
breakConfirmPct = input.float(0.3, "Break confirm: close > R*(1+%)", step=0.1)
bigBodyLookback = input.int(20, "Break candle body MA length", minval=5)
bigBodyMult = input.float(1.2, "Break candle: body >= MA*mult", step=0.1)
requireCloseNearHigh = input.bool(true, "Break candle: close near high")
closeNearHighPct = input.float(25.0, "Close near high threshold (% of range)", step=1.0)
allowMACDAboveZeroInstead = input.bool(true, "Breakout route: allow MACD GC above zero instead")
// 表示
showEMA = input.bool(true, "Plot EMAs")
showMou = input.bool(true, "Show MOU label")
showKaku = input.bool(true, "Show KAKU label")
// ★ここを改善:デバッグ表はデフォルトON
showDebugTbl = input.bool(true, "Show debug table (last bar)")
// ★稼働確認ラベル(最終足に必ず出す)
showStatusLbl = input.bool(true, "Show status label (last bar always)")
locChoice = input.string("Below Bar", "Label location", options= )
lblLoc = locChoice == "Below Bar" ? location.belowbar : location.abovebar
// =========================
// EMA
// =========================
emaS = ta.ema(close, emaSLen)
emaM = ta.ema(close, emaMLen)
emaL = ta.ema(close, emaLLen)
plot(showEMA ? emaS : na, color=color.new(color.yellow, 0), title="EMA 5")
plot(showEMA ? emaM : na, color=color.new(color.blue, 0), title="EMA 13")
plot(showEMA ? emaL : na, color=color.new(color.orange, 0), title="EMA 26")
emaUpS = emaS > emaS
emaUpM = emaM > emaM
emaUpL = emaL > emaL
goldenOrder = emaS > emaM and emaM > emaL
above26_2days = close > emaL and close > emaL
// 勝率維持の土台(緩めない)
baseTrendOK = (emaUpS and emaUpM and emaUpL) and goldenOrder and above26_2days
// =========================
// MACD
// =========================
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdGC = ta.crossover(macdLine, macdSig)
macdUp = macdLine > macdLine
macdNearZero = math.abs(macdLine) <= macdZeroTh
macdGCAboveZero = macdGC and macdLine > 0 and macdSig > 0
macdMouOK = macdGC and macdNearZero and macdUp
macdBreakOK = allowMACDAboveZeroInstead ? (macdMouOK or macdGCAboveZero) : macdMouOK
// =========================
// Volume
// =========================
volMA = ta.sma(volume, volLookback)
volRatio = volMA > 0 ? (volume / volMA) : na
volumeMouOK = volRatio >= volMinRatio and volRatio <= volMaxRatio
volumeStrongOK = volRatio >= volStrong and volRatio <= volMaxRatio
// =========================
// Candle patterns
// =========================
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
pinbar = (lowerWick >= wickBodyMult * body) and (lowerWick > upperWick) and (close >= open)
bullEngulf =
close > open and close < open and
close >= open and open <= close
bigBull =
close > open and
open < emaM and close > emaS and
(body > ta.sma(body, 20))
candleOK = pinbar or bullEngulf or bigBull
// =========================
// Resistance / Pullback route
// =========================
res = ta.highest(high, pivotLen)
pullbackPct = res > 0 ? (res - close) / res * 100.0 : na
pullbackOK = pullbackPct >= pullMinPct and pullbackPct <= pullMaxPct
brokeRes = ta.crossover(close, res )
barsSinceBreak = ta.barssince(brokeRes)
afterBreakZone = (barsSinceBreak >= 0) and (barsSinceBreak <= breakLookbackBars)
pullbackRouteOK = afterBreakZone and pullbackOK
// =========================
// Breakout route (押し目なし初動ブレイク)
// =========================
breakConfirm = close > res * (1.0 + breakConfirmPct / 100.0)
bullBreak = close > open
bodyMA = ta.sma(body, bigBodyLookback)
bigBodyOK = bodyMA > 0 ? (body >= bodyMA * bigBodyMult) : false
rng = math.max(high - low, syminfo.mintick)
closeNearHighOK = not requireCloseNearHigh ? true : ((high - close) / rng * 100.0 <= closeNearHighPct)
mou_breakout =
useBreakoutRoute and
baseTrendOK and
breakConfirm and
bullBreak and
bigBodyOK and
closeNearHighOK and
volumeStrongOK and
macdBreakOK
mou_pullback = baseTrendOK and volumeMouOK and candleOK and macdMouOK and pullbackRouteOK
mou = mou_pullback or mou_breakout
// =========================
// KAKU (Strict): 8条件 + 最終三点
// =========================
cond1 = emaUpS and emaUpM and emaUpL
cond2 = goldenOrder
cond3 = above26_2days
cond4 = macdGCAboveZero
cond5 = volumeMouOK
cond6 = candleOK
cond7 = pullbackOK
cond8 = pullbackRouteOK
all8_strict = cond1 and cond2 and cond3 and cond4 and cond5 and cond6 and cond7 and cond8
final3 = pinbar and macdGCAboveZero and volumeStrongOK
kaku = all8_strict and final3
// =========================
// Display (猛 / 猛B / 確)
// =========================
showKakuNow = showKaku and kaku
showMouPull = showMou and mou_pullback and not kaku
showMouBrk = showMou and mou_breakout and not kaku
plotshape(showMouPull, title="MOU_PULLBACK", style=shape.labelup, text="猛",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showMouBrk, title="MOU_BREAKOUT", style=shape.labelup, text="猛B",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showKakuNow, title="KAKU", style=shape.labelup, text="確",
color=color.new(color.yellow, 0), textcolor=color.black, location=lblLoc, size=size.small)
// =========================
// ★稼働確認:最終足に必ず出すステータスラベル
// =========================
var label status = na
if showStatusLbl and barstate.islast
label.delete(status)
statusTxt =
"MNO RUNNING " +
"MOU: " + (mou ? "YES" : "no") + " (pull=" + (mou_pullback ? "Y" : "n") + " / brk=" + (mou_breakout ? "Y" : "n") + ") " +
"KAKU: " + (kaku ? "YES" : "no") + " " +
"BaseTrend: " + (baseTrendOK ? "OK" : "NO") + " " +
"MACD(mou): " + (macdMouOK ? "OK" : "NO") + " / MACD(zeroGC): " + (macdGCAboveZero ? "OK" : "NO") + " " +
"Vol: " + (na(volRatio) ? "na" : str.tostring(volRatio, format.mintick)) + " " +
"Pull%: " + (na(pullbackPct) ? "na" : str.tostring(pullbackPct, format.mintick))
status := label.new(bar_index, high, statusTxt, style=label.style_label_left,
textcolor=color.white, color=color.new(color.black, 0))
// =========================
// Alerts
// =========================
alertcondition(mou, title="MNO_MOU", message="MNO: MOU triggered")
alertcondition(mou_breakout, title="MNO_MOU_BREAKOUT", message="MNO: MOU Breakout triggered")
alertcondition(mou_pullback, title="MNO_MOU_PULLBACK", message="MNO: MOU Pullback triggered")
alertcondition(kaku, title="MNO_KAKU", message="MNO: KAKU triggered")
// =========================
// Debug table (optional)
// =========================
var table t = table.new(position.top_right, 2, 14, border_width=1, border_color=color.new(color.white, 60))
fRow(_name, _cond, _r) =>
bg = _cond ? color.new(color.lime, 70) : color.new(color.red, 80)
tx = _cond ? "OK" : "NO"
table.cell(t, 0, _r, _name, text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, _r, tx, text_color=color.white, bgcolor=bg)
if showDebugTbl and barstate.islast
table.cell(t, 0, 0, "MNO Debug", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, 0, "", text_color=color.white, bgcolor=color.new(color.black, 0))
fRow("BaseTrend", baseTrendOK, 1)
fRow("MOU Pullback", mou_pullback, 2)
fRow("MOU Breakout", mou_breakout, 3)
fRow("Break confirm", breakConfirm, 4)
fRow("Break big body", bigBodyOK, 5)
fRow("Break close high", closeNearHighOK, 6)
fRow("Break vol strong", volumeStrongOK, 7)
fRow("Break MACD", macdBreakOK, 8)
fRow("KAKU all8", all8_strict, 9)
fRow("KAKU final3", final3, 10)
fRow("MOU any", mou, 11)
fRow("KAKU", kaku, 12)
Ripster Clouds + Saty Pivot + RVOL + Trend1. Ripster EMA Clouds (local + higher timeframe)
Local timeframe (your chart TF):
Plots up to 5 EMA clouds (8/9, 5/12, 34/50, 72/89, 180/200 – configurable).
Each cloud is:
One short EMA and one long EMA.
A filled band between them.
Color logic:
Cloud is bullish when short EMA > long EMA (green/blue-ish tone).
Bearish when short EMA < long EMA (red/orange/pink tone).
You can choose:
EMA vs SMA,
Whether to show the lines,
Per-cloud toggles.
MTF Clouds:
Two higher-timeframe EMA clouds:
Cloud 1: 50/55
Cloud 2: 20/21
Computed on a higher TF (default D, but configurable).
Show as thin lines + transparent bands.
Used for:
Visual higher-TF trend,
Optional signal filter (MTF must agree for trades).
2. Saty Pivot Ribbon (time-warped EMAs)
This is basically your Saty Pivot Ribbon integrated:
Uses a “Time Warp” setting to overlay EMAs from another timeframe.
EMAs:
Fast, Pivot, Slow (defaults 8 / 21 / 34).
Clouds:
Fast cloud between fast & pivot EMAs.
Slow cloud between pivot & slow EMAs.
Bullish/bearish colors are distinct from Ripster colors.
Optional highlights:
Can highlight fast/pivot/slow lines separately.
Conviction EMAs:
13 and 48 EMAs (configurable).
When fast conviction EMA crosses over/under slow:
You get triangle arrows (bullish/bearish conviction).
Bias candles:
If enabled, candles are recolored based on:
Price vs Bias EMA,
Candle up/down/doji,
So you see bullish/bearish “bias” directly in candle colors.
3. DTR vs ATR panel (range vs average)
In a small table panel (bottom-center by default):
Computes higher-TF ATR (default 14, TF auto D/W/M, smoothing type selectable).
Measures current range (high–low) on that TF.
Displays:
DTR: X vs ATR: Y Z% (+/-Δ% vs prev)
Where:
Z% = current range / ATR * 100.
Δ% = change vs previous bar’s Z%.
Background color:
Greenish for low move (<≈70%),
Red for high move (≥≈90%),
Yellow in between,
Slightly dimmed when price is below bias EMA.
This tells you: “Is today an average, quiet, or explosive day compared to normal?”
4. SMA Divergence panel
Separate histogram & line panel:
Fast and slow SMAs (default 14 & 30).
Computes price divergence vs SMA in %:
% above/below slow SMA,
% above/below fast SMA.
Shows:
Slow SMA divergence as a semi-transparent column,
Fast SMA divergence as a solid column on top,
EMA of the slow divergence (trend line) colored:
Blue when rising,
Orange/red when falling.
Static upper/lower bands with fill, plus optional zero line.
This gives you a feel for how stretched price is vs its anchors.
5. RVOL table (relative volume)
Small 3×2 table (bottom-right by default):
Inputs:
Average length (default 50 bars),
Optionally show previous candle RVOL.
Calculates:
RVOL now = volume / avg(volume N bars) * 100,
RVOL prev,
RVOL momentum (now – prev) for data window only.
Table columns:
Candle Vol,
RVOL (Now),
RVOL (Prev).
Colors:
200% → “high RVOL” color,
100–200% → “medium RVOL” color,
<100% → “low RVOL” color,
Slightly dimmer if price is below bias EMA.
This is used both visually and optionally as a signal filter (e.g., only trade when RVOL ≥ threshold).
6. Trend Dashboard (Price + 34/50 + 5/12)
Top-right trend box with 3 rows:
Price Action row:
Uses either Bias EMA or custom EMA on close to say:
Bullish (close > trend EMA),
Bearish (close < trend EMA),
Flat.
Ripster 34/50 Cloud row:
Uses 34/50 EMAs: bullish if 34>50, bearish if 34<50.
Ripster 5/12 Cloud row:
Uses 5/12 EMAs: bullish if 5>12, bearish if 5<12.
Then it does a vote:
Counts bullish votes (Price, 34/50, 5/12),
Counts bearish votes,
Depending on mode:
Majority (2 of 3) or Strict (3 of 3).
Output:
Overall Bullish / Bearish / Sideways.
You also get an optional label on the chart like
Overall: Bullish trend with color, and an optional background tint (green/red for bull/bear).
7. VWAP + Buy/Sell Signals
VWAP is plotted as a white line.
Fast “trend” cloud mid: average of 5 & 12 EMAs.
Slow “trend” cloud mid: average of 34 & 50 EMAs.
Buy condition:
5/12 crosses above 34/50 (bullish cloud flip),
Price > VWAP,
Optional filter: MTF Cloud 1 bullish (50/55 on higher TF),
Optional filter: RVOL >= threshold.
Sell condition:
5/12 crosses below 34/50,
Price < VWAP,
Optional same filters but bearish.
When conditions are met:
Plots BUY triangle up below price (distinct teal/green tone).
Plots SELL triangle down above price (distinct magenta/orange tone).
Alert conditions are defined for:
BUY / SELL signals,
Overall Bullish / Bearish / Sideways change,
MTF Cloud 1 trend flips.
8. Data Window metrics
For easy backtesting / inspection via TradingView’s data window, it exposes:
DTR% (Current) and DTR% Momentum,
RVOL% (Now), RVOL% (Prev), RVOL% Momentum.
TL;DR – What does this script do for you?
It turns your chart into a multi-framework trend and momentum dashboard:
Ripster EMA clouds for short/medium trend & S/R.
Saty Ribbon for higher-TF pivot structure and conviction.
RVOL + DTR/ATR for context (is this a big and well-participated move?).
SMA divergence panel for overextension/stretch.
A compact trend table that tells you Price vs 34/50 vs 5/12 in one glance.
Buy/Sell markers + alerts when:
short-term Ripster trend (5/12) flips over/under medium (34/50),
price agrees with VWAP,
plus optional filters (MTF trend and / or RVOL).
Basically: it’s a trend + confirmation + context system wrapped into one indicator, with most knobs configurable in the settings.






















