OPEN-SOURCE SCRIPT
ที่อัปเดต: Ye Min Naing EMA + Wave Trend

All in One indicator Base on EMA 9
Chart Overlay (price panel)
- EMA 9 (blue) - primary signal line
- EMA 21 (orange) - trend reference
- EMA 50 (gray) - major trend
- VWAP (purple)
- BUY/SELL labels on the chart
Oscillator (separate pane)
- Wave Trend Main Line (green) - ema(ci, 21) where ci = (hlc3 - ema(hlc3, 10)) / (0.015 * d)
- Signal Line (red) - SMA(main, 4) (verified from data)
- Histogram (columns) - main minus signal
- Dots at local min/max of main line
- Diamonds at histogram zero-crosses in OB/OS zones
- Reference lines at 0, +60, -60
Signal Logic
- BUY: Close crosses above EMA 9 + alternating state (must follow a SELL)
- SELL: Close crosses below EMA 9 + alternating state (must follow a BUY)
- Configurable confirmation bars (default: 1)
- Uses force_overlay=true so everything works in a single indicator
Chart Overlay (price panel)
- EMA 9 (blue) - primary signal line
- EMA 21 (orange) - trend reference
- EMA 50 (gray) - major trend
- VWAP (purple)
- BUY/SELL labels on the chart
Oscillator (separate pane)
- Wave Trend Main Line (green) - ema(ci, 21) where ci = (hlc3 - ema(hlc3, 10)) / (0.015 * d)
- Signal Line (red) - SMA(main, 4) (verified from data)
- Histogram (columns) - main minus signal
- Dots at local min/max of main line
- Diamonds at histogram zero-crosses in OB/OS zones
- Reference lines at 0, +60, -60
Signal Logic
- BUY: Close crosses above EMA 9 + alternating state (must follow a SELL)
- SELL: Close crosses below EMA 9 + alternating state (must follow a BUY)
- Configurable confirmation bars (default: 1)
- Uses force_overlay=true so everything works in a single indicator
Release Note
This is a multi-component trading indicator that combines trend-following (EMAs), momentum (Wave Trend oscillator), price action (Inside Bars), and signal generation into
one script. It runs as an oscillator panel below the chart but overlays EMAs and signals
onto the price chart.
---
1. Moving Averages (Chart Overlay)
- EMA 9 (blue) — Short-term trend, used as the signal trigger
- EMA 21 (orange) — Medium-term trend filter
- EMA 50 (white) — Long-term trend direction
- VWAP (red) — Volume-weighted average price, institutional fair value
2. Wave Trend Oscillator (Panel Below)
A LazyBear-style momentum oscillator derived from HLC3:
- WT Main (green line) — Primary momentum line
- WT Signal (red line) — 4-period SMA of WT Main
- Histogram — Difference between Main and Signal (green = bullish, red = bearish)
- Overbought zone (+60) / Oversold zone (-60) — Horizontal dashed lines
- Local min/max dots — Green circles at WT turning points up, red circles at turning
points down
- Diamond markers — Appear when histogram crosses zero inside extreme zones
(high-probability reversal spots)
3. Buy/Sell Signal Logic
Uses a state machine that forces signals to strictly alternate (no consecutive buys or
sells):
- LONG signal: Price closes above EMA 9 for confirm_bars + 1 consecutive bars (default: 2
bars) while not already in LONG state
- SHORT signal: Price closes below EMA 9 for confirm_bars + 1 consecutive bars while not
already in SHORT state
- Signals appear as green "LONG" labels below bars and red "SHORT" labels above bars on
the chart
- Matching triangle arrows appear on the oscillator panel at the WT value
4. Inside Bar Detection
- Highlights candles where high < previous high** AND **low > previous low (price
consolidating within the prior bar's range)
- Colored in yellow directly on the candle bar
- Useful for spotting compression before breakout moves
- Toggleable on/off with customizable color
5. Info Table (Top Right)
Displays on the last bar:
- State: Current signal state (LONG / SHORT)
- Price vs EMA9: Whether price is ABOVE or BELOW
- WT Main: Current Wave Trend value with color coding (red if overbought, green if
oversold)
6. Alerts
Three built-in alert conditions:
- Buy Signal only
- Sell Signal only
- Any Signal (buy or sell)
---
How to Trade With It
1. Trend direction: EMA 50 tells you the bias. Only take LONGs above EMA 50, SHORTs below
2. Entry trigger: Wait for the LONG/SHORT label from EMA 9 cross
3. Momentum confirmation: Check Wave Trend — best entries are when WT crosses from
oversold (LONG) or overbought (SHORT)
4. Inside bars: Watch for yellow bars near EMA 9 — a breakout from an inside bar in the
trend direction is a high-probability entry
5. VWAP: Price above VWAP = bullish intraday bias, below = bearish
Release Note
This is a multi-component trading indicator that combines trend-following (EMAs), momentum (Wave Trend oscillator), price action (Inside Bars), and signal generation into
one script. It runs as an oscillator panel below the chart but overlays EMAs and signals
onto the price chart.
---
1. Moving Averages (Chart Overlay)
- EMA 9 (blue) — Short-term trend, used as the signal trigger
- EMA 21 (orange) — Medium-term trend filter
- EMA 50 (white) — Long-term trend direction
- VWAP (red) — Volume-weighted average price, institutional fair value
2. Wave Trend Oscillator (Panel Below)
A LazyBear-style momentum oscillator derived from HLC3:
- WT Main (green line) — Primary momentum line
- WT Signal (red line) — 4-period SMA of WT Main
- Histogram — Difference between Main and Signal (green = bullish, red = bearish)
- Overbought zone (+60) / Oversold zone (-60) — Horizontal dashed lines
- Local min/max dots — Green circles at WT turning points up, red circles at turning
points down
- Diamond markers — Appear when histogram crosses zero inside extreme zones
(high-probability reversal spots)
3. Buy/Sell Signal Logic
Uses a state machine that forces signals to strictly alternate (no consecutive buys or
sells):
- LONG signal: Price closes above EMA 9 for confirm_bars + 1 consecutive bars (default: 2
bars) while not already in LONG state
- SHORT signal: Price closes below EMA 9 for confirm_bars + 1 consecutive bars while not
already in SHORT state
- Signals appear as green "LONG" labels below bars and red "SHORT" labels above bars on
the chart
- Matching triangle arrows appear on the oscillator panel at the WT value
4. Inside Bar Detection
- Highlights candles where high < previous high** AND **low > previous low (price
consolidating within the prior bar's range)
- Colored in yellow directly on the candle bar
- Useful for spotting compression before breakout moves
- Toggleable on/off with customizable color
5. Info Table (Top Right)
Displays on the last bar:
- State: Current signal state (LONG / SHORT)
- Price vs EMA9: Whether price is ABOVE or BELOW
- WT Main: Current Wave Trend value with color coding (red if overbought, green if
oversold)
6. Alerts
Three built-in alert conditions:
- Buy Signal only
- Sell Signal only
- Any Signal (buy or sell)
---
How to Trade With It
1. Trend direction: EMA 50 tells you the bias. Only take LONGs above EMA 50, SHORTs below
2. Entry trigger: Wait for the LONG/SHORT label from EMA 9 cross
3. Momentum confirmation: Check Wave Trend — best entries are when WT crosses from
oversold (LONG) or overbought (SHORT)
4. Inside bars: Watch for yellow bars near EMA 9 — a breakout from an inside bar in the
trend direction is a high-probability entry
5. VWAP: Price above VWAP = bullish intraday bias, below = bearish
Release Note
7 Components 1. EMA Overlay — EMA 9/21/50 + VWAP on the price chart for trend direction
2. Wave Trend Oscillator — Momentum oscillator with overbought/oversold zones (+60/-60), crossover signals, and
turning point dots
3. Buy/Sell Signals — Alternating LONG/SHORT labels when price confirms above/below EMA 9 (no repeat signals)
4. Inside Bars — Yellow-highlighted consolidation candles that often precede breakouts
5. S/R Zones — Gray boxes at pivot highs/lows, auto-extend and auto-remove when broken
6. Info Table — Real-time state display (LONG/SHORT, price vs EMA 9, WT value)
7. Alerts — Buy, Sell, or Any signal notifications
How to Trade It
- Trend: Signal label + WT momentum aligned + EMAs stacked in order
- Reversal: WT in extreme zone + turning point dot + inside bar at S/R
- Breakout: Inside bar at S/R zone + next bar breaks the range
Best Timeframes
- 15m for scalps, 1h for day trades, 4h for swings
Release Note
Good to tradeRelease Note
S and Lสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน