OPEN-SOURCE SCRIPT

Blue Sniper V.1

Diupdate
Overview
This Pine Script indicator is designed to generate Buy and Sell signals based on proximity to the 50 EMA, stochastic oscillator levels, retracement conditions, and EMA slopes. It is tailored for trending market conditions, making it ideal for identifying high-probability entry points during strong bullish or bearish trends.

Key Features:

Filters out signals in non-trending conditions.
Focuses on retracements near the 50 EMA for precise entries.
Supports alert notifications for Buy and Sell signals.
Includes a cooldown mechanism to prevent signal spamming.
Allows time-based filtering to restrict signals to a specific trading window.

How It Works
Trending Market Conditions
The indicator is most effective when the market exhibits a clear trend. It uses two exponential moving averages (50 EMA and 200 EMA) to determine the overall market trend:

Bullish Trend: 50 EMA is above the 200 EMA, and both EMAs have upward slopes.
Bearish Trend: 50 EMA is below the 200 EMA, and both EMAs have downward slopes.
Buy and Sell Conditions
Buy Signal:

The market is in a bullish trend.
Stochastic oscillator is in the oversold zone.
Price retraces upwards, breaking away from the recent low by more than 1.5 ATR.
Price is near the 50 EMA (within the defined proximity percentage).
Sell Signal:

The market is in a bearish trend.
Stochastic oscillator is in the overbought zone.
Price retraces downwards, breaking away from the recent high by more than 1.5 ATR.
Price is near the 50 EMA.

Outputs
Signals:

Buy Signal: Green "BUY" label below the price bar.
Sell Signal: Red "SELL" label above the price bar.
Alerts:

Alerts are triggered for Buy and Sell signals if conditions are met within the specified time window (if enabled).
EMA Visualization:

50 EMA (blue line).
200 EMA (red line).

Limitations
Not Suitable for Non-Trending Markets: This script is designed for trending conditions. Sideways or choppy markets may produce false signals.
Proximity Tolerance: Adjust the proximityPercent to prevent signals from triggering too frequently during minor oscillations around the 50 EMA.
No Guarantee of Accuracy: As with any technical indicator, it should be used in conjunction with other tools and analysis.
Catatan Rilis
Key Components:
Exponential Moving Averages (EMAs):

The indicator uses two EMAs: a fast 50-period EMA and a slow 200-period EMA. These are used to determine the general market trend.
A bullish trend is when the fast EMA (50) is above the slow EMA (200), and both EMAs are sloping upward.
A bearish trend is when the fast EMA (50) is below the slow EMA (200), and both EMAs are sloping downward.
Stochastic Oscillator:

This measures whether the market is overbought or oversold. A reading below a set threshold (e.g., 20) indicates the market is oversold, and above another threshold (e.g., 80) means the market is overbought.
Price Proximity to the 50 EMA:

The indicator checks if the current price is close enough to the 50 EMA (within a set percentage). This can help confirm if the price is at a level where a potential trade might be more reliable.
Retracement Conditions:

The indicator looks for price retracements (pullbacks) using the Average True Range (ATR) to check if the price is moving significantly from recent highs or lows.
Cooldown Mechanism:

To avoid too many signals in a short period, the indicator uses a cooldown timer that prevents buy or sell alerts from triggering again until a set number of bars (candles) have passed since the last signal.
Time Filter:

Users can set specific start and end times for when alerts should be active during the trading day. This allows you to limit when you receive buy or sell signals, based on your preferred trading hours.

How Buy and Sell Signals Work:
Buy Signal: A buy alert will only trigger if the market is in a bullish trend, the price is near the 50 EMA, the stochastic oscillator is oversold, and the price is showing a valid upward retracement.

Sell Signal: A sell alert will only trigger if the market is in a bearish trend, the price is near the 50 EMA, the stochastic oscillator is overbought, and the price is showing a valid downward retracement.

Alerts and Visualization:
When a valid buy or sell condition is met, an alert is sent to the user, but only during the user-defined trading hours.
Buy signals are displayed as green labels below the price bars, and sell signals are shown as red labels above the price bars.
The 50 EMA and 200 EMA lines are plotted on the chart to help visualize the trend direction.
Candlestick analysisChart patternsCycles

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan