INVITE-ONLY SCRIPT

EU & US Current Day Only

47
📌 Purpose of the Indicator
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.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.