OPEN-SOURCE SCRIPT

9/20 EMA with FVG up

Original Code written by - GG-EK

Overview
This strategy uses the crossover of the 9 EMA and 20 EMA on the current chart's time frame (preferably 5 minutes) to identify potential trade entries. The system integrates Fair Value Gaps (FVG) on a higher time frame (1 hour) to help set realistic targets.

Entry Criteria
Long Entry:
Condition: The 5Min 9 EMA crosses and closes above the 5Min 20 EMA.
Confirmation: A candle must close above the 5Min 9 EMA after the crossover.
Signal: Once confirmed, the system plots a Long Signal on the chart.

Short Entry:
Condition: The 5Min 9 EMA crosses and closes below the 5Min 20 EMA.
Confirmation: A candle must close below the 5Min 9 EMA after the crossover.
Signal: Once confirmed, the system plots a Short Signal on the chart.

Risk Management

Stop-Loss (SL):

Suggested SL is set at the low (for long trades) or the high (for short trades) of the previous two candles at the time of entry.
Trail the stop-loss as the trade progresses to lock in profits.
Take Profit (TP):

The system uses FVG (Fair Value Gaps) plotted on a 1-hour time frame to estimate the potential target.
Traders are encouraged to hold positions until the target FVG is reached, or adjust their TP based on personal risk-reward preferences.

Additional Features
The system dynamically plots the 9 EMA and 20 EMA on the chart.
FVG zones are marked on the chart, aiding in target visualization.

Signals for long and short entries are visually displayed to simplify trade decisions.

This strategy is designed for traders who prefer systematic, rule-based entries and exits while incorporating advanced concepts like FVG for target estimation.

Upgrades from the original code:

1) EMA of 5Min TF fixed across TF's.
2) Entry condition refined to stick to 5Min EMA's irrespective of respective TF EMA's
Exponential Moving Average (EMA)

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?

כתב ויתור