OPEN-SOURCE SCRIPT
JonnyFutures Scalpomatic

This indicator combines Fair Value Gap (FVG) detection with Exponential Moving Average (EMA) signals to help identify potential trade entry points based on market inefficiencies and trend direction.
⚙️ Main Components
1. EMAs
Two EMAs are calculated:
EMA 20 (short-term trend)
EMA 50 (medium-term trend)
ema20 = ta.ema(close, len20)
ema50 = ta.ema(close, len50)
These are plotted on the chart:
Orange line = EMA 20
Purple line = EMA 50
2. Fair Value Gaps (FVGs)
The script looks for gaps in price structure (imbalances):
Bullish FVG → when the high from two bars ago is less than the current bar’s low
→ Indicates a potential bullish inefficiency.
Bearish FVG → when the low from two bars ago is greater than the current bar’s high
→ Indicates a potential bearish inefficiency.
bullishFVG = high[2] < low[0]
bearishFVG = low[2] > high[0]
When found, the background color changes:
Light Green for bullish FVGs
Light Red for bearish FVGs
bgcolor(bullishFVG ? color.new(color.green,90) : na)
bgcolor(bearishFVG ? color.new(color.red,90) : na)
3. EMA Crossover Signals
The script plots visual buy/sell markers when the closing price crosses above or below each EMA:
For EMA 20:
✅ Long signal (triangle up, lime): close crosses above EMA 20
❌ Short signal (triangle down, red): close crosses below EMA 20
For EMA 50:
✅ Long signal (triangle up, aqua): close crosses above EMA 50
❌ Short signal (triangle down, maroon): close crosses below EMA 50
These signals help identify potential trend-following entries or exits.
📈 How to Use It
Trend Confirmation:
Watch the EMAs — if EMA20 > EMA50, the trend is generally bullish; if EMA20 < EMA50, it’s bearish.
FVG Zones:
When a bullish or bearish FVG appears, it highlights potential retracement zones where price may rebalance before continuing the trend.
Entry Timing:
Combine FVGs with EMA cross signals for confluence:
Long bias → bullish FVG + price crossing above EMA 20 or 50.
Short bias → bearish FVG + price crossing below EMA 20 or 50.
🎯 Summary
This indicator:
Detects Fair Value Gaps and shades them visually.
Plots EMA 20 and EMA 50 to define short- and mid-term trends.
Marks entry/exit signals when price crosses these EMAs.
Is designed for trend-following trades with FVG confirmation
⚙️ Main Components
1. EMAs
Two EMAs are calculated:
EMA 20 (short-term trend)
EMA 50 (medium-term trend)
ema20 = ta.ema(close, len20)
ema50 = ta.ema(close, len50)
These are plotted on the chart:
Orange line = EMA 20
Purple line = EMA 50
2. Fair Value Gaps (FVGs)
The script looks for gaps in price structure (imbalances):
Bullish FVG → when the high from two bars ago is less than the current bar’s low
→ Indicates a potential bullish inefficiency.
Bearish FVG → when the low from two bars ago is greater than the current bar’s high
→ Indicates a potential bearish inefficiency.
bullishFVG = high[2] < low[0]
bearishFVG = low[2] > high[0]
When found, the background color changes:
Light Green for bullish FVGs
Light Red for bearish FVGs
bgcolor(bullishFVG ? color.new(color.green,90) : na)
bgcolor(bearishFVG ? color.new(color.red,90) : na)
3. EMA Crossover Signals
The script plots visual buy/sell markers when the closing price crosses above or below each EMA:
For EMA 20:
✅ Long signal (triangle up, lime): close crosses above EMA 20
❌ Short signal (triangle down, red): close crosses below EMA 20
For EMA 50:
✅ Long signal (triangle up, aqua): close crosses above EMA 50
❌ Short signal (triangle down, maroon): close crosses below EMA 50
These signals help identify potential trend-following entries or exits.
📈 How to Use It
Trend Confirmation:
Watch the EMAs — if EMA20 > EMA50, the trend is generally bullish; if EMA20 < EMA50, it’s bearish.
FVG Zones:
When a bullish or bearish FVG appears, it highlights potential retracement zones where price may rebalance before continuing the trend.
Entry Timing:
Combine FVGs with EMA cross signals for confluence:
Long bias → bullish FVG + price crossing above EMA 20 or 50.
Short bias → bearish FVG + price crossing below EMA 20 or 50.
🎯 Summary
This indicator:
Detects Fair Value Gaps and shades them visually.
Plots EMA 20 and EMA 50 to define short- and mid-term trends.
Marks entry/exit signals when price crosses these EMAs.
Is designed for trend-following trades with FVG confirmation
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.