OPEN-SOURCE SCRIPT

Fibonacci 61.8 BUY or SELL (EMA-Filtered)

138
This indicator helps identify Fibonacci-based Buy or Sell zones based on recent pivot highs/lows, but only when filtered by the EMA trend.

โœ… Buy Zones: Only when price is above EMA
โœ… Sell Zones: Only when price is below EMA
๐ŸŸฉ Draws a 61.8% Fibonacci retracement line
๐ŸŸฅ Adds a label with price value: BUY @ or SELL @
๐Ÿ“ All drawing is based on pivot structure (LL โ†’ LH for buy; HH โ†’ HL for sell)

๐Ÿ“Š EMA Trend Filter
Only draws buy setups when price > EMA
Only draws sell setups when price < EMA
You can change the EMA length:


๐Ÿ“ˆ How It Works โ€“ Step by Step

โœ… BUY SETUP (LL โ†’ LH, only if price > EMA):
Detects pivot low โ†’ stores as prevLow
Detects pivot high after that โ†’ stores as prevHigh

Calculates Fib Level:
fibLevel = prevLow + (prevHigh - prevLow) * 0.618
Draws a green dashed line at that fib level

Adds a label to the right:
"BUY @ price"

๐Ÿšซ SELL SETUP (HH โ†’ HL, only if price < EMA):
Detects pivot high โ†’ stores as prevHigh
Detects pivot low after that โ†’ stores as prevLow

Calculates Fib Level:
fibLevel = prevHigh - (prevHigh - prevLow) * 0.618

Draws a red dashed line at that fib level

Adds a label to the right:
"SELL @ price"


โœ… Strengths

Simple yet powerful EMA + Fibonacci strategy
Visually clean: only one signal shown at a time
Customizable: style, color, width, offset, precision
Works well for trend continuation trades

โš ๏ธ Limitations

Only shows latest setup, not historical signals
Does not show price breaking fib level or reacting to it
Assumes fixed 61.8% retracementโ€”no multi-level analysis
Doesn't differentiate between minor and major pivots

๐Ÿ“Œ How to Trade It

๐ŸŸข BUY Example:
Price above EMA

Pivot Low โ†’ Pivot High โ†’ 61.8% level plotted
Wait for price to react at that level to go long


๐Ÿ”ด SELL Example:

Price below EMA
Pivot High โ†’ Pivot Low โ†’ 61.8% level plotted
Wait for price to react at that level to go short





Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.