OPEN-SOURCE SCRIPT
EMA Crossover Indicator with UTC Time Filter and Profit Labels

The PineScript code provided is an indicator for TradingView that implements two user-defined Exponential Moving Averages (EMAs) with default periods of 5 and 9, generates buy and sell signals at EMA crossovers, filters these signals based on a user-specified UTC time window, and adds labels when the price moves 100 points in the profitable direction from the entry point. Below is a detailed description of the script's functionality, structure, and key components:
Overview
Key Features
2. Crossover Signals:
( ta.crossover ).
( ta.crossunder ).
3. UTC Time Filter:
window, handling both same-day and overnight ranges (e.g., 22:00 to 02:00).
labels.
4. Profit Tracking (+100 Points):
or more from the entry price.
or more from the entry price.
avoid chart clutter.
5. Visual Elements:
Labels:
the profit threshold is met.
Code Structure
overlay=true): Defines the indicator name and sets it to overlay on the price chart.
emaShortPeriod and emaLongPeriod: Integer inputs for EMA periods
(defaults: 5 and 9).
(defaults: 00:00 to 23:59).
closing price.
emaLong = ta.ema(close, emaLongPeriod): Computes the Long EMA.
then checks if the current time is within the specified range. Handles overnight
ranges correctly.
active signal type), `profitLabelPlaced` (prevents multiple profit labels).
met.
Usage
Setup: Add the indicator to a TradingView chart. Adjust EMA periods, UTC time
window, and points threshold via the indicator settings.
a signal.
Applications: Useful for traders who want to:
- Identify when a trade reaches a specific profit target.
Notes
price (e.g., $100 for stocks, 100 pips for forex). Adjust `pointsThreshold` for
different assets.
markets.
the chart clean.
account for multiple hits of the threshold unless a new signal occurs.
If you need further clarification or want to add features (e.g., alerts, additional profit levels, or different time filters), let me know!
Overview
- Platform:
- Indicator Type:
Key Features
- User-Defined EMAs:
- - **Long EMA**:
2. Crossover Signals:
( ta.crossover ).
( ta.crossunder ).
3. UTC Time Filter:
window, handling both same-day and overnight ranges (e.g., 22:00 to 02:00).
labels.
4. Profit Tracking (+100 Points):
or more from the entry price.
or more from the entry price.
avoid chart clutter.
5. Visual Elements:
Labels:
the profit threshold is met.
Code Structure
overlay=true): Defines the indicator name and sets it to overlay on the price chart.
emaShortPeriod and emaLongPeriod: Integer inputs for EMA periods
(defaults: 5 and 9).
(defaults: 00:00 to 23:59).
closing price.
emaLong = ta.ema(close, emaLongPeriod): Computes the Long EMA.
then checks if the current time is within the specified range. Handles overnight
ranges correctly.
active signal type), `profitLabelPlaced` (prevents multiple profit labels).
met.
Usage
Setup: Add the indicator to a TradingView chart. Adjust EMA periods, UTC time
window, and points threshold via the indicator settings.
a signal.
Applications: Useful for traders who want to:
- Identify when a trade reaches a specific profit target.
Notes
price (e.g., $100 for stocks, 100 pips for forex). Adjust `pointsThreshold` for
different assets.
markets.
the chart clean.
account for multiple hits of the threshold unless a new signal occurs.
If you need further clarification or want to add features (e.g., alerts, additional profit levels, or different time filters), let me know!
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.