EU & US Current Day Only

The purpose of this indicator is:
To automatically detect and mark the opening prices of the European and U.S. trading sessions for each day.
To generate buy/sell trading signals only when specific intraday conditions are met.
To limit the number of trades per day and ensure that all trades are closed by the end of the day.
To enable intraday trading within a defined time window and with confirmed price action.
⚙️ How the Indicator Works
1. User Inputs
The user defines the following parameters:
Opening hour for the EU and US sessions (UTC).
Maximum number of trades per day (e.g., 2).
Minimum distance in pips the price must move from the session open levels to confirm a signal.
Trading hours (start and end).
Time zone.
2. Tracking Session Open Prices
At the start of each new day, the indicator:
Detects the exact moment when the EU and US sessions open (e.g., 9:00 UTC for EU).
Records the opening prices of these sessions (eu_open_price and us_open_price).
These levels are then plotted as horizontal lines on the chart:
Red line = EU Open
Black line = US Open
3. Trading Signals
The strategy will only trigger a trade if the following conditions are met:
Trading is happening within the defined hours (start_hour to end_hour).
Both session open levels (EU & US) are defined for the current day.
The current price is:
Above both levels by a defined pip distance → Buy signal.
Below both levels by a defined pip distance → Sell signal.
The strategy has not yet reached the maximum number of trades for the day.
Example logic:
If price moves more than 20 pips above both EU and US open levels → enter a long position.
If price drops more than 20 pips below both levels → enter a short position.
4. Exiting Positions
If the opposite signal appears while a position is open:
The strategy will automatically close the current position.
Additionally, at the start of a new day, any open positions are forcefully closed:
pinescript
Копирај
Измени
strategy.close_all(comment="Close EOD")
This ensures that the strategy remains purely intraday and avoids overnight risk.
✅ Advantages
Clear identification of daily session levels (EU/US open).
Filters out weak signals using minimum pip distance.
Limits the number of trades per day – avoids overtrading.
Automatically closes trades at the end of the day – reduces risk.
🔚 Conclusion
This indicator is especially useful for intraday traders who base their entries on how price behaves around the EU and US session open levels. The strategy is clean, rule-based, and suitable for automated backtesting, optimization, and real-time trading—especially for currency pairs with high volatility during the European and American sessions.
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente Aleksin_Aleksandar.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
Declinazione di responsabilità
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente Aleksin_Aleksandar.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.