GOLD 5m PA ScalperXAUUSD 5-Minute Price Action Scalper with HTF Confirmation
This Pine Script is a trend-following scalping strategy designed specifically for XAUUSD (Gold) on the 1,3,5-minute timeframe.
Its main goal is to reduce noise and false signals by combining lower-timeframe price action with higher-timeframe (15-minute) structure.
CORE IDEA
Trade only in the direction of the dominant trend and only when price reacts from a strong higher-timeframe Order Block.
Candlestick analysis
Displacement## Displacement Indicator (Institutional Momentum Filter)
This indicator highlights **true price displacement** — candles where price moves with **abnormal force relative to recent volatility**.
It is designed to help traders distinguish **real momentum** from normal market noise.
Displacement often precedes:
- Breaks of structure
- Fair Value Gaps (FVGs)
- Strong continuation or meaningful pullbacks
This tool focuses on **confirmation**, not prediction.
---
### 🔍 How Displacement Is Defined
A candle is marked as *displacement* only when **all conditions are met**:
• Candle body is larger than a multiple of ATR (volatility-adjusted)
• Candle body makes up a high percentage of the full candle (strong close)
• Directional conviction (bullish or bearish close)
This filters out:
- Small or average candles
- Wick-heavy indecision
- Low-quality breakouts
---
### 🎯 What This Indicator Is Best Used For
✔ Confirming impulsive moves
✔ Validating structure breaks
✔ Anchoring Fair Value Gaps
✔ Filtering low-probability setups
✔ Identifying institutional participation
Works best on **M5, M15, and H1**, especially during **London and NY sessions**.
---
### ⚠️ Important Notes
• This is **not** a buy/sell signal by itself
• Best used with trend, structure, or liquidity context
• Not designed for ranging or low-volatility markets
Think of this indicator as a **momentum truth filter** —
if displacement is missing, conviction is likely missing too.
---
### ⚙️ Inputs Explained
• ATR Length – defines normal volatility
• ATR Multiplier – how aggressive displacement must be
• Minimum Body % – ensures strong candle closes
All inputs are adjustable to fit different markets and styles.
---
### 🧠 Philosophy
Displacement reflects **commitment**, not anticipation.
This tool helps you wait for **proof**, not hope.
---
If you want, I can:
- Tighten this for **ICT-style language**
- Rewrite for **beginner clarity**
- Add a **“How I personally use it”** section
- Optimize it for **TradingView algorithm visibility**
**Tell me which you want changed.**
Wide Bodied Bar (WBB) IdentifierThis script is inspired by Peter L.Brandt's Wide Bodied Bar/WBB. It uses ATR to detect the wide bodied bars. Peter prefered WBB's for his entries. I believe this bar made him feel that the breakout is real and will continue on the same direction as the breakout. Enjoy
MNQ Optimal Entry Detector Use 2 minute time frame, no range entry signals as they are lower probability, use discretion and understand bias. This is still in testing so do not use it as financial advice.
PDH/PDL (Personal)This TradingView indicator is a technical analysis tool designed to plot the Previous Day High (PDH) and Previous Day Low (PDL) levels with high accuracy. It is specifically engineered for traders who require market boundaries calculated based on the Indian Standard Time (IST) session, ensuring that day breaks are identified precisely at 12:00 AM IST regardless of the exchange's native timezone.
Trend SignalSystem Trend Signal — What It Does
Shows you when your trading system says "be long" vs "stay out" — with a trailing line and buy/sell labels only when the state flips.
The Rules Built In:
BUY state requires ALL of these:
Price above 50-DMA (intermediate trend up)
10-DMA above 20-DMA (short-term trend confirmed)
Sell/Buy Pressure Ratio below 1.5 AND flattening or falling (sellers not aggressive)
RSI above 30 and not making lower lows (momentum OK)
SELL state triggers on ANY of these :
Price drops below 50-DMA (trend broken)
Pressure Ratio spikes above 2.0 (heavy selling)
RSI making lower lows AND below 40 (momentum failing)
What You See:
"Buy" label appears only when state flips from sell → buy
"Sell" label appears only when state flips from buy → sell
No spam. One label per flip.
The Trailing Line:
Uses ATR to set distance from price.
In buy state: line = close - (ATR × 2.0), ratchets up only
In sell state: line = close + (ATR × 2.0), ratchets down only
Advanced Demand ZoneThis indicator automatically identifies strong demand zones based on swing lows followed by significant bullish reactions. It is designed for 4H timeframe and crypto trading (BTC, ETH, altcoins).
Key Features:
Automatically draws clear demand zones for better visual analysis.
Filters out weak impulses to reduce false zones.
Sends alerts when price enters a demand zone.
Transparent zones that do not clutter your chart.
Fully customizable parameters: swing lookback, impulse threshold, and zone transparency.
This tool helps traders quickly spot high-probability buy areas while allowing manual confirmation with price action, making it perfect for swing and intraday trading.
Highlighted Range (3 Sessions)3 session customizable range. All one color customizable for simplicity.
Heikin Ashi + Real Price OverlayHeikin-Ashi + Real Price Overlay
This indicator combines the smooth trend visualization of Heikin-Ashi candles with the true market price for precise execution.
Features:
Heikin-Ashi Candles: Provides a clear, smoothed view of market trends and momentum.
Real Close Price Overlay: Plots the actual closing price as a line on top of HA candles, ensuring accurate entry, exit, and stop placement.
Trend-Based Coloring: The real price line is colored according to HA trend (green for bullish, red for bearish), making trend bias instantly visible.
Lightweight and ideal for scalping, day trading, or any strategy where trend bias + exact price matters.
Use Case:
Use HA candles to identify market bias and momentum.
Use the real price line for precise entries, exits, and stop levels.
Perfect for traders who want the clarity of HA without sacrificing real price accuracy.
Manipulation Candle SystemThis indicator is based on One Candle Scalping Strategy by ProRealAlgos
## **Manipulation Candle System – Simple Explanation**
This indicator helps traders identify **potential market manipulation** during the **US stock market session (New York)** and highlights **key reversal signals**.
---
### **1. Daily ATR (Average True Range)**
* Measures the **average price movement** of the day.
* Helps determine if a move is **normal** or **abnormally large**.
* The indicator calculates **daily ATR** automatically.
* If 15 minute opening candle is more than 25% of Daily ATR, we can call it manipulation is happen .
---
### **2. 15-Minute Opening Candle Box**
* Highlights the **first 15-minute candle** of the US session.
* The box **extends for 2 hours** after the market opens.
* **Color indicates market condition**:
* **Red box** → the opening candle range is bigger than 25% of the daily ATR → potential **manipulation**.
* **Blue box** → the opening candle range is normal → **neutral session**.
* Helps traders visually spot when the market might be trying to **trap traders**.
---
### **3. 5-Minute Reversal Detection**
* Looks for **reversal candle patterns** on the 5-minute chart:
* Bullish engulfing or strong bullish pin → **buy reversal**.
* Bearish engulfing or strong bearish pin → **sell reversal**.
* Only checks during the **US session**, after 15 minute opening candle.
* Helps traders **time entries** in the direction of potential market reversals.
---
### **4. Buy / Sell Signals**
* Shows **triangle markers** on the chart:
* **Green triangle below candle** → buy signal.
* **Red triangle above candle** → sell signal.
* The signal text also indicates:
* `"BUY (Trap Reversal)"` → if the reversal occurs during manipulation.
* `"BUY (Normal Reversal)"` → if the reversal occurs during a neutral session.
* `"SELL (Trap Reversal)"` → if a sell reversal occurs during manipulation.
* `"SELL (Normal Reversal)"` → otherwise.
---
### **5. Info Table**
* Appears at the **top-right** of the chart.
* Shows:
1. Daily ATR value.
2. 15-minute opening candle range.
3. Session condition → `"MANIPULATION"` or `"NEUTRAL"`.
4. Current reversal signal text.
---
### **How a New Trader Can Use It**
1. Look at the **color of the opening box**:
* Red → be cautious, price may trap traders.
* Blue → normal market behavior.
2. Watch for **reversal signals** on the 5-minute chart.
3. Use the **info table** to confirm ATR, session bias, and signals.
4. Combine this with **risk management** before entering trades.
My RSI Fib Range Cloud//SOLO900q99This is basically the close price, optionally “stepped” if you set Bars Per Sample > 1.
2. Central Threshold Band (colored line)
• This is an EMA of the resampled price (default length 34).
• It turns:
• Green when RSI is in bullish fib zones,
• Pink when RSI is in bearish fib zones,
• Grey when RSI is in the middle/neutral area.
3. Sigma Range High (green line) and Sigma Range Low (pink line)
• These are an upper and lower band around price.
• The distance from price is based on how much price has been moving recently (average change).
Trappp's Advanced Multi-Timeframe Trading ToolkitThis comprehensive trading script by Trappp provides a complete market analysis framework with multiple timeframe support and resistance levels. The indicator features:
Key Levels:
· Monthly (light blue dashed) and Weekly (gold dashed) levels for long-term context
· Previous day high/low (yellow) with range display
· Pivot-based support/resistance (pink dashed)
· Premarket levels (blue) for pre-market activity
Intraday Levels:
· 1-minute opening candle (red)
· 5-minute (white), 15-minute (green), and 30-minute (purple) session levels
· All intraday levels extend right throughout the trading day
Technical Features:
· EMA 50/200 cross detection with alert labels
· Candlestick pattern recognition near key levels
· Smart proximity detection using ATR
· Automatic daily/weekly/monthly updates
Trappp's script is designed for traders who need immediate visual reference of critical price levels across multiple timeframes, helping identify potential breakouts, reversals, and pattern-based setups with clear, color-coded visuals for quick decision-making.
"Clean Market Structure & Trend Confirmation" TP LADDER(UPDATED)Clean Market Structure & Trend Confirmation — TP Ladder
This indicator is designed to identify high-probability intraday trend trades using market structure, momentum confirmation, and a visual ribbon system, with automatic take-profit and stop-loss levels plotted after confirmed signals.
WHAT THIS INDICATOR IS FOR
This script is built for active intraday traders trading SPY, QQQ, It focuses on trend continuation and directional momentum rather than scalping chop. It works best during regular market hours with extended hours enabled.
HOW TO LOAD (IMPORTANT)
Add the script to your chart
Set chart timeframe to 5-minute
Turn Extended Trading Hours ON
Use during the NY session (especially open and trend periods)
THE RIBBON (MOST IMPORTANT RULE)
The ribbon defines the trend.
• Blue/Teal ribbon = bullish trend
• Red ribbon = bearish trend
• Gray ribbon = compression / no trade zone
Only trade in the direction of the ribbon.
No ribbon alignment = no trade.
BULL & BEAR DOTS
“BULL” dot appears when structure flips bullish.
“BEAR” dot appears when structure flips bearish.
These confirm trend direction, not entries by themselves.
BUY & SELL ARROWS (ENTRIES)
• BUY arrow prints only when bullish ribbon, structure, momentum, and filters align
• SELL arrow prints only when bearish ribbon, structure, momentum, and filters align
• Arrows are non-repainting when using close-confirmed mode
No arrow = no trade.
CONTINUATION (C) LOGIC
The script allows limited continuation entries after pullbacks when structure realigns.
By default, only one continuation per direction per day is allowed to prevent overtrading and signal spam.
TAKE-PROFIT (TP) LADDER
When a BUY or SELL arrow confirms, the script automatically plots:
• TP1 = partial profit
• TP2 = extended target
• TP3 = final extension
• STOP = ATR-based stop loss
All levels are calculated using ATR and adjust automatically to volatility.
The ladder only appears after a confirmed signal.
HOW TO TRADE IT (SIMPLE FLOW)
Identify ribbon direction
Wait for BUY or SELL arrow
Enter on confirmation
Scale out at TP1, TP2, TP3
Respect the STOP line
If structure breaks or ribbon flips, exit.
WHAT TO AVOID
• Do not trade against the ribbon
• Do not trade in gray ribbon conditions
• Do not chase candles without arrows
• Do not expect constant signals (quality over quantity)
MNQ Optimal Entry Detector - Timeframe StableOptimized for timeframes and has better trade stability, overall better option however use with discretion, dont trade until 3 hours after market opens and dont use 4 hours before close due to lack of volume.
HMA & RSI Delta Hybrid SignalsA lag-free trend follower combining Hull Moving Average (HMA) with RSI Momentum Delta to filter false signals and catch high-probability reversals.
# 🚀 HMA & RSI Delta Hybrid Signals
This indicator represents a hybrid approach to trend trading by combining the smoothness of the **Hull Moving Average (HMA)** with the explosive detection capabilities of **RSI Momentum Delta**.
Unlike standard indicators that rely solely on price crossovers, this tool confirms the trend direction with the *velocity* of the price change (Momentum Delta), reducing false signals in choppy markets.
### 🧠 How It Works?
**1. Trend Detection (HMA):**
The script uses the **Hull Moving Average**, known for being extremely fast and lag-free, to determine the overall market direction.
* **Orange Line:** Represents the HMA Trend. The slope determines if we are in an Uptrend or Downtrend.
**2. Momentum Confirmation (RSI Delta):**
Instead of looking at raw RSI levels (like 70 or 30), this algorithm calculates the **"Delta"** (Absolute change from the previous bar).
* It asks: *"Is the price moving in the trend direction with enough speed?"*
* If the RSI jumps significantly (determined by the `Delta Threshold`), it confirms a strong entry.
### 🎯 Signal Modes (Sensitivity)
You can choose between two modes depending on your trading style:
* **🛡️ Conservative Mode (Default):**
* Strict filtering.
* Requires the Trend to match the HMA direction AND the RSI Delta to exceed the specific threshold (e.g., 0.8).
* *Best for:* Avoiding false signals in sideways markets.
* **⚔️ Aggressive Mode:**
* Faster entries.
* Requires the Trend to match the HMA direction AND any positive momentum change in RSI.
* *Best for:* Scalping or catching the very beginning of a move.
### ✨ Key Features
* **Non-Repainting Signals:** Once a bar closes, the signal is fixed.
* **Non-Repeating:** It will not spam multiple "BUY" signals in a row; it waits for a trend change or reset.
* **Visual Trend:** Background color changes based on the HMA slope (Green for Bullish, Purple for Bearish).
* **Fully Customizable:** Adjust HMA length, RSI period, and Delta sensitivity.
---
**⚠️ DISCLAIMER:** This tool is for educational and analytical purposes only. Always manage your risk.
H1 Bias Rhythmic Lite Public V1.0 by SRTH1 Bias Rhythmic Lite Public V1.0 by SRT
Version: 1.0 (Public Lite)
Author: SRT
Platform: TradingView / Pine Script v6
Overlay: Yes (works directly on price chart)
Purpose: Provide H1 directional bias with D1 alignment and basic rhythm signals. Perfect for traders looking for clean bias visualization without clutter.
💡 Key Features
H1 Bias (Primary Engine)
Uses EMA7, EMA40, SMA150, and SMA200 for H1 directional bias.
Clearly identifies bullish, bearish, and neutral conditions.
Stack-based logic ensures consistency and reliability.
D1 Bias Alignment
Pulls higher timeframe (daily) EMA40, SMA150, SMA200.
Confirms H1 bias alignment with daily trend.
Helps filter trades in the direction of the larger trend.
Flush Detection
H1 flushes: Price fully “flushed” beyond EMA7 for bullish/bearish setups.
D+H1 flush: Aligns H1 flush with D1 bias for stronger context.
Visual dots with configurable sizes and colors indicate flush levels.
Price Action Signals
Engulfing (EB) detection with ATR filtering and body % thresholds.
Long Tail Body (LTB) detection with optional body % filter for precise swing points.
Both EB and LTB signals show clear labels above/below the candle for instant recognition.
ATR-Based Dynamic Offsets
Uses ATR (configurable length) to scale labels and flush dot offsets dynamically.
Ensures signals are proportionate to volatility.
Daily Pivot & Session Lines
Daily pivot plotted automatically.
Option to show daily session high-low lines and day labels.
Easily configurable label sizes and colors.
Bias Summary Table
Top-right table shows:
D1 bias
H1 bias
LTB allowed (Yes/No)
Color-coded for easy reference: green = Bull, red = Bear, gray = Neutral.
Alerts
H1 flush and D+H1 flush alerts.
LTB active alerts when bias is aligned.
Perfect for keeping an eye on actionable swings.
⚙️ User Inputs
Moving Average Lengths: EMA7, EMA40, SMA150, SMA200
Show/Hide MAs: Toggle to declutter the chart
ATR Settings: Length and % threshold for EB/LTB sizing
Signal Toggles: Show/Hide EBull, EBear, LTB Bull, LTB Bear, Flush Dots
Daily Pivot & Label Settings: Toggle visibility, label size, line/text colors
✅ Advantages for Users
Lightweight and fast — minimal lag on H1 charts.
Clear visualization of market bias and swing points.
Free access to core H1 Bias Rhythmic methodology.
Serves as a learning tool for traders who want to upgrade later.
⚠️ Limitations
No automatic entries, stops, or take profits (manual trade execution required).
Lite version only offers simplified signals and bias visualization.
Advanced rhythm and multi-timeframe alerts are reserved for the Premium version.
📢 Short Promo for Premium
For traders who want full power, check out H1 Bias Rhythmic Premium V1.0 by SRT — complete multi-phase alerts, advanced LTB & EB filters, EMA/SMA flip confirmations, and professional-level rhythm signals. Upgrade to premium for the full H1 trading experience.
GMMA fill (v5) + Golden Crossover HighlightsGMMA Fill (v5) + Golden Crossover Highlights
This setup combines the Guppy Multiple Moving Average (GMMA) Fill version 5 with Golden Crossover signals to identify strong trend continuation and potential breakout points. GMMA provides layered moving averages for short- and long-term trend analysis, while the Golden Crossover highlights bullish momentum shifts, making it ideal for spotting entry opportunities in trending markets.
Pivot Points High LowGaneshA Pivot Points High/Low indicator that:
Detects swing highs (ta.pivothigh) and swing lows (ta.pivotlow) using configurable left/right bar lengths.
Draws labels at the confirmed pivot points:
Down labels at pivot highs (potential resistance).
Up labels at pivot lows (potential support).
Lets you customize text color and label fill color separately for highs and lows.
It’s designed for overlay (on-price chart), with max_labels_count=500 to allow many labels.
Improved Candle Strategy (without daily squared)# Candle Pattern Trading Strategy
## Core Logic
Analyzes the last 5 candlesticks to identify "close at high" and "close at low" patterns, generating long/short signals.
## Trading Conditions
- **Long**: ≥2 bars closed at high in past 5 bars + current bar closes at high → Open long
- **Short**: ≥2 bars closed at low in past 5 bars + current bar closes at low → Open short
- **Filter**: If ≥3 doji patterns detected, skip trading
## Risk Management
- Stop Loss: Based on entry bar's high/low
- Take Profit: Risk × 2x multiplier
- Cooldown: No trading for 2 bars after entry
- Session Filter: No trading for first 5 bars after market open
## Configurable Parameters
- Lookback period, doji threshold, close proximity ratio, TP/SL ratio, cooldown bars, etc.
**Use Cases**: 1-minute and higher timeframes on stocks/futures
8menutakeshi//@version=5
indicator("猛の掟・初動スクリーナー(完全版:8項目コメント表示)", overlay=true, max_labels_count=50)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// Inputs
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
showPanel = input.bool(true, "コメント表示")
panelPos = input.string("右上", "コメント位置", options= )
lastBarOnly = input.bool(true, "最後の足だけ更新(推奨)")
// EMA
lenEma1 = input.int(5, "EMA 5", minval=1)
lenEma2 = input.int(13, "EMA 13", minval=1)
lenEma3 = input.int(26, "EMA 26", minval=1)
// MACD
macdFast = input.int(12, "MACD fast", minval=1)
macdSlow = input.int(26, "MACD slow", minval=1)
macdSig = input.int(9, "MACD signal", minval=1)
// Volume
volMaLen = input.int(5, "出来高平均(N日)", minval=1)
volMinMul = input.float(1.3, "出来高倍率Min", step=0.1)
volMaxMul = input.float(2.0, "出来高倍率Max", step=0.1)
volFinalMul = input.float(1.5, "最終三点:出来高倍率(>=)", step=0.1)
// Candle
wickBodyMult = input.float(1.8, "下ヒゲ判定:下ヒゲ/実体 >=", step=0.1)
atrLen = input.int(14, "ATR長", minval=1)
bigBodyATR = input.float(1.2, "大陽線判定:実体 >= ATR×", step=0.1)
// Breakout / Pullback
resLookback = input.int(20, "レジスタンス:過去N日高値", minval=5)
pullMinPct = input.float(5.0, "押し目Min(%)", step=0.5)
pullMaxPct = input.float(15.0, "押し目Max(%)", step=0.5)
retestAllowPct = input.float(1.0, "ブレイク価格の許容下抜け(%)", step=0.1)
stateExpireBars = input.int(30, "ブレイク状態の期限(本数)", minval=5)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// Series
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ema5 = ta.ema(close, lenEma1)
ema13 = ta.ema(close, lenEma2)
ema26 = ta.ema(close, lenEma3)
= ta.macd(close, macdFast, macdSlow, macdSig)
volAvg = ta.sma(volume, volMaLen)
volMul = volAvg == 0 ? na : (volume / volAvg)
atr = ta.atr(atrLen)
// Candle parts
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 1-3: トレンド
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ema5Up = ema5 > ema5
ema13Up = ema13 > ema13
ema26Up = ema26 > ema26
allEmaUp = ema5Up and ema13Up and ema26Up
golden = (ema5 > ema13) and (ema13 > ema26)
above26_2days = (close > ema26) and (close > ema26 )
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 4: MACD(ゼロライン上GC)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
macdZeroGC = ta.crossover(macdLine, macdSignal) and (macdLine > 0)
histShrinkToUp = (macdHist > macdHist ) and (macdHist < macdHist ) // 参考表示
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 5: 出来高
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
volOK = not na(volMul) and (volMul >= volMinMul) and (volMul <= volMaxMul)
volStrongOK = not na(volMul) and (volMul >= volFinalMul) // 最終三点用
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 6: ローソク(ピンバー/包み/大陽線)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
longLowerWick = (body > 0) and ((lowerWick / body) >= wickBodyMult) and (upperWick <= lowerWick * 0.6) and (close > open)
bullEngulf = (close < open ) and (close > open) and (open <= close ) and (close >= open )
bigBull = (close > open) and (body >= atr * bigBodyATR) and (open < ema13) and (close > ema5)
candleOK = longLowerWick or bullEngulf or bigBull
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 7-8: ブレイク後押し目(押し目 -5〜15%)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
res = ta.highest(high, resLookback)
breakout = ta.crossover(close, res)
var bool inBreak = false
var float breakPrice = na
var int breakBar = na
var float postBreakHigh = na
if breakout
inBreak := true
breakPrice := res
breakBar := bar_index
postBreakHigh := high
if inBreak
postBreakHigh := na(postBreakHigh) ? high : math.max(postBreakHigh, high)
pullPct = (inBreak and not na(postBreakHigh) and postBreakHigh != 0) ? (postBreakHigh - close) / postBreakHigh * 100.0 : na
pullOK = not na(pullPct) and (pullPct >= pullMinPct) and (pullPct <= pullMaxPct)
retestOK = inBreak and not na(breakPrice) and (close >= breakPrice * (1 - retestAllowPct/100.0))
breakoutPullbackOK = inBreak and retestOK and pullOK
if inBreak and not na(breakBar) and (bar_index - breakBar > stateExpireBars)
inBreak := false
breakPrice := na
breakBar := na
postBreakHigh := na
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 8項目チェック(1つでも欠けたら見送り)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
chk1 = allEmaUp
chk2 = golden
chk3 = above26_2days
chk4 = macdZeroGC
chk5 = volOK
chk6 = candleOK
chk7 = pullOK
chk8 = breakoutPullbackOK
all8 = chk1 and chk2 and chk3 and chk4 and chk5 and chk6 and chk7 and chk8
// 最終三点(ヒゲ×出来高×MACD)
// ※「成立時は買い確定」の定義に合わせて、all8に加えてfinal3も必須にしている
final3 = longLowerWick and volStrongOK and macdZeroGC
judge = (all8 and final3) ? "判定:買い" : "判定:見送り"
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// コメント文字列(←txt を必ず先に定義)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
fMark(x) => x ? "達成" : "未達"
txt =
"【8項目チェック】 " +
"1 EMA全上向き: " + fMark(chk1) + " " +
"2 黄金隊列: " + fMark(chk2) + " " +
"3 26EMA上2日: " + fMark(chk3) + " " +
"4 MACDゼロ上GC: " + fMark(chk4) + " " +
"5 出来高" + str.tostring(volMinMul) + "-" + str.tostring(volMaxMul) + ": " + fMark(chk5) + " " +
"6 ローソク条件: " + fMark(chk6) + " " +
"7 押し目-" + str.tostring(pullMinPct) + "〜" + str.tostring(pullMaxPct) + "%: " + fMark(chk7) + " " +
"8 ブレイク後押し目: " + fMark(chk8) + " " +
"最終三点(ヒゲ×出来高×MACD): " + (final3 ? "成立" : "未成立") + " " +
judge + " " +
"(参考)出来高倍率=" + (na(volMul) ? "na" : str.tostring(volMul, "#.00")) +
" / 押し目率=" + (na(pullPct) ? "na" : str.tostring(pullPct, "#.0")) + "%" +
" / hist転換=" + (histShrinkToUp ? "YES" : "NO")
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// Table(位置は if で確定。三項演算子で改行しない)
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
var pos = position.top_right
if panelPos == "右上"
pos := position.top_right
else if panelPos == "左上"
pos := position.top_left
else if panelPos == "右下"
pos := position.bottom_right
else
pos := position.bottom_left
var table t = table.new(pos, 1, 1)
// 描画条件
drawNow = showPanel and (lastBarOnly ? barstate.islast : true)
bg = (all8 and final3) ? color.new(color.lime, 80) : color.new(color.gray, 15)
fg = color.white
if drawNow
table.cell(t, 0, 0, txt, text_color=fg, bgcolor=bg, text_size=size.small)
else
table.cell(t, 0, 0, "", text_color=fg, bgcolor=color.new(color.black, 100))
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 視覚補助
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
plot(ema5, color=color.new(color.yellow, 0), title="EMA5")
plot(ema13, color=color.new(color.orange, 0), title="EMA13")
plot(ema26, color=color.new(color.red, 0), title="EMA26")
plotshape(all8 and final3, title="BUY", style=shape.triangleup, location=location.belowbar,
color=color.new(color.lime, 0), size=size.tiny, text="BUY")






















