Candlestick analysis
Al Brooks - Bar CountIndicator Purpose:
This indicator displays bar counts on the chart to help traders identify important time nodes and cycle transitions
Features smart session filtering with automatic futures/stock detection and appropriate trading session counting
Core Features:
Smart asset detection: Auto-detect futures and stocks
Session filter toggle: Choose all-day or session-specific counting
Auto timezone handling: Chicago time for futures, NY time for stocks
Flexible display control: Customizable display frequency and label size
Session Settings:
8:30-15:15 (CT) / Futures mode: Chicago time 8:30-15:15 (CT)
9:30-16:00 (ET) / Stock mode: New York time 9:30-16:00 (ET)
All-day mode: Count from first bar of the day
Timeframe Correspondence:
Multiples of 3: Correspond to 15-minute chart update cycles
Multiples of 12: Correspond to 1-hour chart update cycles
18: Key nodes, important time turning points
NQ 300+ Point Day Checklist (Bias + Alerts + Markers)This indicator helps identify high-range (≥300-point) days on Nasdaq-100 futures (NQ / MNQ) using a clear, rule-based checklist.
It evaluates volatility, compression, price displacement, prior-day structure, and overnight activity to generate a daily expansion score (0–6). Higher scores signal an increased likelihood of a strong trending or expansion day.
The script also provides:
Expansion probability levels (Normal / Watch / High-Prob)
Bullish, bearish, or neutral bias
On-chart markers and background highlights
Optional alerts for early awareness
Best used on the Daily timeframe to help traders focus on high-opportunity days and avoid overtrading during consolidation.
This is a context and probability tool — not a trade signal.
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
Ichimoku + VWAP + OBV + ATR Full System (NQ Daytrade)Extended Indicator Description
Ichimoku + VWAP + OBV + ATR Full System is a rule-based intraday trading indicator designed specifically for NQ day trading, focusing on trend alignment, participation confirmation, and volatility-aware execution.
This indicator does not rely on a single signal or crossover. Instead, it integrates multiple market dimensions into one structured framework to help traders identify high-probability trend continuation scenarios while avoiding low-quality, range-bound conditions.
System Philosophy
The core idea of this system is simple:
trade only when trend, price location, volume, and volatility are aligned.
Each component plays a specific role and is not meant to be used in isolation. The indicator works best when all conditions reinforce the same directional bias.
Component Breakdown
Ichimoku Cloud
Used to define the primary market structure and directional bias. The system favors trades only when price action aligns clearly above or below the cloud, helping filter out indecisive or transitional phases.
VWAP
Acts as a session-based equilibrium reference. Price position and distance relative to VWAP are used to confirm whether the market is trending with intent rather than reverting to the mean.
OBV (On-Balance Volume)
Provides participation and flow confirmation. OBV helps validate whether price movement is supported by volume, reducing the likelihood of false breakouts or weak trend signals.
ATR (Average True Range)
Used as a volatility filter and risk-awareness tool. ATR conditions help the system avoid low-volatility environments and support more realistic expectations for intraday movement.
Trade Logic Overview
The system is designed around trend-following pullbacks, not prediction or counter-trend trading.
When trend structure is established and confirmed by VWAP positioning and OBV behavior, pullback zones within the trend become areas of interest. ATR conditions ensure that trades are taken only when sufficient movement potential exists.
Rather than generating frequent signals, the system prioritizes selectivity and clarity, making it suitable for disciplined day traders who value context over quantity.
Intended Use
This indicator is built for:
NQ intraday and day trading
Trend continuation and pullback strategies
Traders who prefer structured, confirmation-based systems
Lower to mid intraday timeframes such as 3-minute, 5-minute, and 15-minute charts
Important Notes
This is not an automated trading system and does not provide guaranteed results. The indicator is designed as a decision-support tool to assist with market context, directional bias, and trade timing. Risk management, execution, and position sizing remain the responsibility of the user.
롱/숏 삼각형 시그널
동그라미 청산 시그널
VWAP 밴드 기반 방향성
OBV 보조지표
이름 (Name)
BTC Scalping Signal – VWAP + OBV
짧은 설명 (Short Description)
VWAP 밴드와 OBV를 기반으로 방향성, 진입·청산 시그널을 제공하는 스캘핑 지표입니다.
긴 설명 (Long Description)
이 지표는 BTC 단기 스캘핑을 위해 설계된 것으로, 특히 15분봉 환경에 최적화되어 있습니다.
VWAP 밴드의 위치와 추세 판별 로직을 기반으로 롱·숏 진입 신호를 제공합니다.
OBV 모멘텀을 보조 필터로 사용하여 돌파 및 되돌림 가능성을 판단합니다.
시장 변동성이 축소되거나 평균회귀 신호가 감지될 때 청산 시그널을 표시합니다.
삼각형(진입), 원형(청산) 등 직관적 시각 요소를 통해 빠른 의사결정을 지원합니다.
Zee's A+ MOMO BreakThis just shows an indicator when you have a 5 minute momentum candle that breaks PMH under specific parameters, i.e candle size, wick size, relative volume, time of day, etc. It will plot the PMH with a gold line automatically. Entry would be at the close of the MOMO break. I highly encourage you to back test your results and see how strong this setup is. Any questions feel free to comment or reach out, thanks.
Simple Gap IndicatorTitle: Simple Gap Indicator
Description: This is a utility script designed to automate the tracking and management of price gaps (also known as "Windows") on the chart. Unlike static drawings, this indicator dynamically monitors open gaps and automatically "closes" them (stops drawing) once price has filled the area, keeping your chart clean and focused on active levels only.
Why Use This Tool? Traders often mark gaps manually, but charts quickly become cluttered with old, invalid levels. This script solves that problem by using an array-based management system to track every open gap in real-time and remove it the moment it is invalidated by price action.
Technical Methodology:
Gap Detection: The script identifies "Full Gaps" where the Low of the current candle is higher than the High of the previous candle (Bullish), or vice versa (Bearish). This indicates a total disconnect in price delivery.
Dynamic Filtering:
ATR Filter: Users can filter out insignificant "noise" gaps by setting a minimum size threshold based on the Average True Range (ATR).
Time Filter: Option to restrict gap detection to specific session hours (e.g., ignoring overnight gaps on 24h charts).
Auto-Closure: The script loops through all active gaps on every new bar. If the current price wick touches an open gap, the box is visually terminated at that specific bar index and removed from the tracking array.
Visuals:
Green Box: Bullish Gap (Support Zone).
Red Box: Bearish Gap (Resistance Zone).
Labels: Optional text displaying the precise Top/Bottom price coordinates of the gap.
How to Use:
Enable "Auto-Close Gap on Retest" to keep your chart clean.
Use the ATR Filter if you are getting too many signals on lower timeframes (e.g., set to 0.5x ATR).
Set alerts for "New Gap" or "Gap Filled" to automate your workflow.
Credits: Calculations based on standard Gap/Window price action theory. Array management logic custom-coded for Pine Script v6.
Custom RSI + Divergence + Bold Lines (v6, matched)📌 Custom RSI with Divergence & Dynamic Coloring
This indicator enhances the classic Relative Strength Index (RSI) by combining
dynamic visual feedback with automatic regular divergence detection.
It is designed to help traders quickly identify overbought / oversold conditions
and potential momentum shifts through clear and intuitive visualization.
⸻
🔍 Key Features
1️⃣ Dynamic RSI Line Coloring
• Overbought zone (RSI > Overbought level) → RSI line turns green
• Oversold zone (RSI < Oversold level) → RSI line turns red
• Neutral zone → RSI line remains white
This allows instant recognition of the current RSI state.
⸻
2️⃣ Overbought / Oversold Visual Highlighting
• Clear overbought and oversold reference lines
• Background shading when RSI enters these zones
→ improves signal visibility and reaction speed
⸻
3️⃣ Automatic Regular Divergence Detection
• Bullish Divergence
• Price makes a lower low
• RSI makes a higher low
• Pivot lows are connected with a bold green line
• Bearish Divergence
• Price makes a higher high
• RSI makes a lower high
• Pivot highs are connected with a bold red line
Pivot points are connected directly, making divergence structures easy to identify at a glance.
⸻
4️⃣ Clear Signal Markers
• Bullish divergence: ▲ (bottom of the RSI pane)
• Bearish divergence: ▼ (top of the RSI pane)
⸻
⚙️ Inputs
• RSI Length
• Overbought / Oversold Levels
• Pivot Length (controls divergence sensitivity)
⸻
💡 How to Use
• Oversold + Bullish Divergence → Potential rebound setup
• Overbought + Bearish Divergence → Potential pullback or reversal
• Best used in combination with trend analysis, support/resistance, and volume
⸻
⚠️ Notes
• Divergence signals are probabilistic, not guaranteed.
• In ranging markets, divergences may appear more frequently.
• Always apply proper risk management.
⸻
🎯 Best For
• Traders who actively use RSI
• Traders looking for clean and intuitive divergence visualization
• Users who prefer minimal but informative indicators
ORB + FVG + PDH/PDL ORB + FVG + PDH/PDL is an all-in-one day-trading overlay that plots:
Opening Range (ORB) high/low with optional box and extension
Fair Value Gaps (FVG) with optional “unmitigated” levels + mitigation lines
Previous Day High/Low history (PDH/PDL) drawn as one-day segments (yesterday’s levels plotted across today’s session only)
Includes presets (ORB only / FVG only / Both) and optional alerts for ORB touches, ORB break + retest, FVG entry, and PDH/PDL touches.
Ichimoku + VWAP + OBV + ATR Full System (NQ Daytrade)This script provides optimized scalping signals for BTC, designed mainly for the 15-minute timeframe.
Long/short entries are generated using VWAP band position and trend confirmation logic.
OBV momentum is used as a secondary filter to validate breakout or reversal conditions.
Exit signals are displayed when volatility compression or mean-reversion conditions occur.
Simple visual markers (triangles and circles) are included for easy decision-making.
롱/숏 삼각형 시그널
동그라미 청산 시그널
VWAP 밴드 기반 방향성
OBV 보조지표
이름 (Name)
BTC Scalping Signal – VWAP + OBV
짧은 설명 (Short Description)
VWAP 밴드와 OBV를 기반으로 방향성, 진입·청산 시그널을 제공하는 스캘핑 지표입니다.
긴 설명 (Long Description)
이 지표는 BTC 단기 스캘핑을 위해 설계된 것으로, 특히 15분봉 환경에 최적화되어 있습니다.
VWAP 밴드의 위치와 추세 판별 로직을 기반으로 롱·숏 진입 신호를 제공합니다.
OBV 모멘텀을 보조 필터로 사용하여 돌파 및 되돌림 가능성을 판단합니다.
시장 변동성이 축소되거나 평균회귀 신호가 감지될 때 청산 시그널을 표시합니다.
삼각형(진입), 원형(청산) 등 직관적 시각 요소를 통해 빠른 의사결정을 지원합니다.
CISD Trend Candle + MACD SignalThis custom TradingView indicator combines trend-based candle coloring with MACD reversal detection to generate clear entry and exit signals:
🔷 Blue triangle (Buy): Appears when the candles confirm an uptrend (e.g., 5 consecutive closes above 21 EMA) and no long position is currently held.
🔴 Red triangle (Sell): Appears when the candles confirm a downtrend (e.g., 5 consecutive closes below 21 EMA) and no short position is currently held.
⚪ Gray triangle (Exit):
If in a long position, it shows when the candle turns neutral (gray) and the MACD crosses down (bearish signal), or the trend turns red.
If in a short position, it shows when the candle turns neutral and the MACD crosses up (bullish signal), or the trend turns blue.
🟠 Orange line: 21-period EMA used for trend validation.
This logic prevents premature entries and provides structured exit points, aiming to avoid false signals in choppy markets.
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)
Alertes Trading Manuel//@version=6
indicator("Signal simple +0.5% LONG", overlay = true)
// --- Paramètres ---
tpPctInput = input.float(0.5, "TP (%)", step = 0.1) // objectif pour toi : 0.5%
slPctInput = input.float(0.3, "SL (%)", step = 0.1) // SL indicatif : 0.3%
tpPct = tpPctInput / 100.0
slPct = slPctInput / 100.0
emaLenFast = input.int(50, "EMA rapide (intraday)", minval = 1)
emaLenSlow = input.int(200, "EMA lente (intraday)", minval = 1)
volLen = input.int(20, "Période moyenne Volume", minval = 1)
// --- Tendance daily : MA200 jours ---
ma200D = request.security(syminfo.tickerid, "D", ta.sma(close, 200))
above200D = close > ma200D
// --- Tendance intraday ---
emaFast = ta.ema(close, emaLenFast)
emaSlow = ta.ema(close, emaLenSlow)
upTrendIntraday = close > emaFast and emaFast > emaSlow
// --- MACD & RSI ---
= ta.macd(close, 12, 26, 9)
rsi = ta.rsi(close, 14)
macdOK = macdLine > macdSignal
rsiOK = rsi > 49 and rsi < 75
// --- Volume ---
volMa = ta.sma(volume, volLen)
volOK = volume > volume and volume > volMa
// --- Signal LONG simple ---
longSignal = above200D and upTrendIntraday and macdOK and rsiOK and volOK
// --- Affichage du signal ---
plotshape(
longSignal,
title = "Signal LONG",
location = location.belowbar,
style = shape.triangleup,
color = color.lime,
size = size.small,
text = "LONG"
)
// --- Lignes TP / SL indicatives basées sur le dernier signal ---
var float tpLine = na
var float slLine = na
if longSignal
tpLine := close * (1 + tpPct)
slLine := close * (1 - slPct)
// Les lignes restent jusqu'au prochain signal
plot(tpLine, "TP indicatif", color = color.new(color.green, 50), style = plot.style_linebr)
plot(slLine, "SL indicatif", color = color.new(color.red, 50), style = plot.style_linebr)
// --- Affichage des moyennes ---
plot(emaFast, "EMA rapide", color = color.new(color.blue, 40))
plot(emaSlow, "EMA lente", color = color.new(color.orange, 40))
plot(ma200D, "MA200 jours (daily)", color = color.new(color.fuchsia, 0), linewidth = 2)
indicator("MouNoOkite_InitialMove_Screener", overlay=true)//@version=5
indicator("猛の掟・初動スクリーナー(5EMA×MACD×出来高×ローソク)", 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")
volLookback = input.int(5, "出来高平均(日数)", minval=1)
volMinRatio = input.float(1.3, "出来高倍率(初動点灯)", step=0.1)
volStrong = input.float(1.5, "出来高倍率(本物初動)", step=0.1)
volMaxRatio = input.float(2.0, "出来高倍率(上限目安)", step=0.1)
wickBodyMult = input.float(2.0, "ピンバー判定: 下ヒゲ >= (実体×倍率)", step=0.1)
pivotLen = input.int(20, "直近高値/レジスタンス判定のLookback", minval=5)
pullMinPct = input.float(5.0, "押し目最小(%)", step=0.1)
pullMaxPct = input.float(15.0, "押し目最大(%)", step=0.1)
showDebug = input.bool(true, "デバッグ表示(条件チェック)")
// =========================
// EMA
// =========================
emaS = ta.ema(close, emaSLen)
emaM = ta.ema(close, emaMLen)
emaL = ta.ema(close, emaLLen)
plot(emaS, color=color.new(color.yellow, 0), title="EMA 5")
plot(emaM, color=color.new(color.blue, 0), title="EMA 13")
plot(emaL, color=color.new(color.orange, 0), title="EMA 26")
emaUpS = emaS > emaS
emaUpM = emaM > emaM
emaUpL = emaL > emaL
// 26EMA上に2日定着
above26_2days = close > emaL and close > emaL
// 黄金隊列
goldenOrder = emaS > emaM and emaM > emaL
// =========================
// MACD
// =========================
= ta.macd(close, macdFast, macdSlow, macdSignal)
// ヒストグラム縮小(マイナス圏で上向きの準備)も見たい場合の例
histShrinking = math.abs(macdHist) < math.abs(macdHist )
histUp = macdHist > macdHist
// ゼロライン上でGC(最終シグナル)
macdGCAboveZero = ta.crossover(macdLine, macdSig) and macdLine > 0 and macdSig > 0
// 参考:ゼロ直下で上昇方向(勢い準備)
macdRisingNearZero = (macdLine < 0) and (macdLine > macdLine ) and (math.abs(macdLine) <= math.abs(0.5))
// =========================
// Volume
// =========================
volMA = ta.sma(volume, volLookback)
volRatio = volMA > 0 ? (volume / volMA) : na
volumeOK = volRatio >= volMinRatio and volRatio <= volMaxRatio
volumeStrongOK = volRatio >= volStrong
// =========================
// 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
// 5EMA・13EMA を貫く大陽線(勢い)
bigBull =
close > open and
open < emaM and close > emaS and
(body > ta.sma(body, 20)) // “相対的に大きい”目安
candleOK = pinbar or bullEngulf or bigBull
// =========================
// 押し目 (-5%〜-15%) & レジブレ後
// =========================
recentHigh = ta.highest(high, pivotLen)
pullbackPct = recentHigh > 0 ? (recentHigh - close) / recentHigh * 100.0 : na
pullbackOK = pullbackPct >= pullMinPct and pullbackPct <= pullMaxPct
// “レジスタンスブレイク”簡易定義:直近pivotLen高値を一度上抜いている
// → その後に押し目位置にいる(現在が押し目)
brokeResistance = ta.crossover(close, recentHigh ) or (close > recentHigh )
afterBreakPull = brokeResistance or brokeResistance or brokeResistance or brokeResistance or brokeResistance
breakThenPullOK = afterBreakPull and pullbackOK
// =========================
// 最終三点シグナル(ヒゲ × 出来高 × MACD)
// =========================
final3 = pinbar and macdGCAboveZero and volumeStrongOK
// =========================
// 猛の掟 8条件チェック(1つでも欠けたら「見送り」)
// =========================
// 1) 5EMA↑ 13EMA↑ 26EMA↑
cond1 = emaUpS and emaUpM and emaUpL
// 2) 5>13>26 黄金隊列
cond2 = goldenOrder
// 3) ローソク足が26EMA上に2日定着
cond3 = above26_2days
// 4) MACD(12,26,9) ゼロライン上でGC
cond4 = macdGCAboveZero
// 5) 出来高が直近5日平均の1.3〜2.0倍
cond5 = volumeOK
// 6) ピンバー or 包み足 or 大陽線
cond6 = candleOK
// 7) 押し目 -5〜15%
cond7 = pullbackOK
// 8) レジスタンスブレイク後の押し目
cond8 = breakThenPullOK
all8 = cond1 and cond2 and cond3 and cond4 and cond5 and cond6 and cond7 and cond8
// =========================
// 判定(2択のみ)
// =========================
isBuy = all8 and final3
decision = isBuy ? "買い" : "見送り"
// =========================
// 表示
// =========================
plotshape(isBuy, title="BUY", style=shape.labelup, text="買い", color=color.new(color.lime, 0), textcolor=color.black, location=location.belowbar, size=size.small)
plotshape((not isBuy) and all8, title="ALL8_OK_but_noFinal3", style=shape.labelup, text="8条件OK (最終3未)", color=color.new(color.yellow, 0), textcolor=color.black, location=location.belowbar, size=size.tiny)
// デバッグ(8項目チェック結果)
if showDebug and barstate.islast
var label dbg = na
label.delete(dbg)
txt =
"【8項目チェック】 " +
"1 EMA全上向き: " + (cond1 ? "達成" : "未達") + " " +
"2 黄金隊列: " + (cond2 ? "達成" : "未達") + " " +
"3 26EMA上2日: " + (cond3 ? "達成" : "未達") + " " +
"4 MACDゼロ上GC: " + (cond4 ? "達成" : "未達") + " " +
"5 出来高1.3-2.0: "+ (cond5 ? "達成" : "未達") + " " +
"6 ローソク条件: " + (cond6 ? "達成" : "未達") + " " +
"7 押し目5-15%: " + (cond7 ? "達成" : "未達") + " " +
"8 ブレイク後押し目: " + (cond8 ? "達成" : "未達") + " " +
"最終三点(ヒゲ×出来高×MACD): " + (final3 ? "成立" : "未成立") + " " +
"判定: " + decision
dbg := label.new(bar_index, high, txt, style=label.style_label_left, textcolor=color.white, color=color.new(color.black, 0))
// アラート
alertcondition(isBuy, title="猛の掟 BUY", message="猛の掟: 買いシグナル(8条件+最終三点)")
Trend detection zero lag Trend Detection Zero-Lag (v6)
Trend Detection Zero-Lag is a high-performance trend identification indicator designed for intraday traders, scalpers, and swing traders who require fast trend recognition with minimal lag. It combines a zero-lag Hull Moving Average, slope analysis, swing structure logic, and adaptive volatility sensitivity to deliver early yet stable trend signals.
This indicator is optimized for real-time decision-making, particularly in fast markets where traditional moving averages react too slowly.
Core Features
🔹 Zero-Lag Trend Engine
Uses a Zero-Lag Hull Moving Average (HMA) to reduce lag by approximately 40–60% versus standard moving averages.
Provides earlier trend shifts while maintaining smoothness.
🔹 Multi-Factor Trend Detection
Trend direction is determined using a hybrid engine:
HMA slope (momentum direction)
Rising / falling confirmation
Swing structure detection (HH/HL vs LH/LL)
ATR-adjusted dynamic sensitivity
This approach allows fast flips when conditions change, without excessive noise.
Adaptive Volatility Sensitivity
Sensitivity dynamically adjusts based on ATR relative to price
In high volatility: faster reaction
In low volatility: smoother, more stable trend state
This ensures the indicator adapts across:
Trend days
Range days
Volatility expansion or contraction
Trend Duration Intelligence
The indicator tracks historical trend durations and maintains a rolling memory of recent bullish and bearish phases.
From this, it calculates:
Current trend duration
Average historical duration for the active trend direction
This helps traders gauge:
Whether a trend is early, mature, or extended
Probability of continuation vs exhaustion
Strength Scoring
A normalized Trend Strength Score (0–100) is calculated using:
Zero-lag slope magnitude
ATR normalization
This provides a quick read on:
Weak / choppy trends
Healthy trend continuation
Overextended momentum
Visual Design
Color-coded Zero-Lag HMA
Bullish trend → user-defined bullish color
Bearish trend → user-defined bearish color
Designed for dark mode / neon-style charts
Clean overlay with no clutter
Trend Detection Zero-Lag is built for traders who need:
Faster trend recognition
Adaptive behavior across market regimes
Structural confirmation beyond simple moving averages
Clear, actionable visual signals
Risk & Position CalculatorThis indicator is called "Risk & Position Calculator".
This indicator shows 4 information on a table format.
1st: 20 day ADR% (ADR%)
2nd: Low of the day price (LoD)
3rd: The percentage distance between the low of the day price and the current market price in real-time (LoD dist.%)
4th: The calculated amount of shares that are suggested to buy (Shares)
The ADR% and LoD is straightforward, and I will explain more on the 3rd and 4th information.
__________________________________________________________________________________
The Lod dist.% is a useful tool if you are a breakout buyer and use the low of the day price as your stop loss, it helps you determine if a breakout buy is at a risk tight area (~1/2 ADR%) or it is more of a chase (>1 ADR%).
I use four different colors to visualize this calculation results (green, yellow, purple, and red).
Green: Lod dist.% <= 0.5 ADR%
Yellow: 0.5 ADR% < Lod dist.% <= 1 ADR%
Purple: 1 ADR% < Lod dist.% <= 1.5 ADR%
Red: 1.5 ADR% < Lod dist.%
(e.g., if Lod dist.% is colored in Green, it means your stop loss is <= 0.5 ADR%, therefore if you buy here, the risk is probably tight enough)
__________________________________________________________________________________
The Shares is a useful tool if you want to know exactly how many shares you should buy at the breakout moment. To use this tool, you first need to input two information in the indicator setting panel: the account size ($) and portfolio risk (%).
Account Size ($) means the dollar value in your total account.
Portfolio Risk (%) means how much risk you are willing to take per trade.
(e.g. a 1% portfolio risk in a 5000$ account is 50$, which is the risk you will take per trade)
After you provide these two inputs, the indicator will help you calculate how many shares you should buy based on the calculated Dollar Risk ($), real-time market price, and the low of the day price.
(e.g. Dollar Risk (50$), real-time market price (100$), Lod price (95$) -> then you will need to buy 50/(100-95) = 10 shares to meet your demand, so it will display as Shares { 10 } )
In addition, I also introduce a mechanism that helps you avoid buying too big of a position relative to your overall account . I set the limit to 25%, which means you don't put more than 25% of your account money into a single trade, which helps prevent single stock risk.
By introducing this mechanism, it will supervise if the suggested Shares to buy exceed max position limit (25%). If it actually exceeds, instead of using Dollar Risk ($) to calculate Shares, it will use position limit to calculate and display the max Shares you should buy.
__________________________________________________________________________________
That's it. Hope you find this explanation helpful when you use this indicator. Have a great day mate:)
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)
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.
Bar Number IndicatorBar Number Indicator
This Pine Script indicator is designed to help intraday traders by automatically numbering candlesticks within a user-defined trading session. This is particularly useful for strategies that rely on specific bar counts (e.g., tracking the 1st, 18th, or 81st bar of the day).
Key Features:
Session-Based Counting: Automatically resets the count at the start of each new session (default 09:30 - 16:00).
Timezone Flexibility: Includes a dropdown to select your specific trading timezone (e.g., America/New_York), ensuring accurate session start times regardless of your local time or the exchange's default setting.
Smart Display Modes: Choose to show "All" numbers, or filter for "Odd" / "Even" numbers to keep your chart clean.
Custom Positioning: Easily place the numbers Above or Below the candlesticks.
Minimalist Design: Numbers are displayed as floating text without distracting background bubbles.






















