OPEN-SOURCE SCRIPT

Buy/Sell Signal v3

91

BTC/Gold Scalping Strategy - 5M 1H Timeframe

Description
Advanced trading indicator specifically designed for scalping BTC and Gold on 5-minute and 1-hour timeframes. It uses EMA crossovers with automatic risk management (Stop Loss and Take Profit) based on ATR.

Main Features
- Automatic entry signals: Identifies optimal buy and sell points based on EMA crossovers
- Integrated risk management: Automatically calculates SL and TP according to your preferred risk/reward ratio
- Smart invalidation: Cancels previous positions when a new opposite signal appears
- Clear visualization: Horizontal lines showing entry, stop loss, and take profit in real time
- Informative panel: Table with all information about the active position
- Complete alert system: Notifications for entries, exits, and invalidations

How It Works
The indicator detects trend changes through the crossover of two EMAs:
- Fast EMA (default 5 periods): Quickly responds to price changes
- Slow EMA (default 13 periods): Filters market noise
- BUY Signal: When the fast EMA crosses above the slow EMA
- SELL Signal: When the fast EMA crosses below the slow EMA

Risk Management
- Stop Loss: Placed below/above the low/high of the entry candle, adjusted by ATR
- Take Profit: Automatically calculated according to your configured R:R ratio (default 3:1)
- Invalidation: If an opposite signal appears before TP or SL is hit, the position closes automatically

Visual Elements
- 🟢 BUY Label: Buy signal (lime green)
- 🔴 SELL Label: Sell signal (red)
- ⚠️ INV Icon: Invalidated entry (yellow)
- 🎯 TP Icon: Take Profit reached (green)
- ❌ SL Icon: Stop Loss triggered (red)
- ⚪ White dotted line: Entry price
- 🔴 Red line: Stop Loss level
- 🟢 Green line: Take Profit level

Recommended Settings
For BTC:
- Fast EMA: 5
- Slow EMA: 13
- ATR: 14
- SL Multiplier: 0.5
- Risk:Reward: 3.0
- Candle confirmation: Enabled

For Gold (XAU/USD):
- Fast EMA: 5
- Slow EMA: 13
- ATR: 14
- SL Multiplier: 0.4–0.6 (adjust depending on volatility)
- Risk:Reward: 2.5–3.5
- Candle confirmation: Enabled

Available Alerts
1. 🟢 BUY Signal: Triggered when a new buy opportunity appears
2. 🔴 SELL Signal: Triggered when a new sell opportunity appears
3. 🎯 Take Profit: Notifies when the profit target is reached
4. ❌ Stop Loss: Alerts when stop loss is triggered
5. ⚠️ Invalidated Entry: Alerts when a position is canceled by an opposite signal

Important Notes
- ⏰ Recommended timeframe: 5 minutes and 1 hour
- 📊 Optimized assets: Bitcoin (BTC/USD) and Gold (XAU/USD), including Futures
- ⚠️ No repaint*: Signals do not change once confirmed
- 🎓 Educational use: Always perform your own analysis before trading
- 💰 Capital management: Never risk more than 1–2% of your account per trade

Customizable Parameters
Indicators:
- Fast EMA period (1–50)
- Slow EMA period (1–50)
- ATR period (1–50)
- Stop Loss multiplier (0.1–5.0)
- Risk:Reward ratio (1.0–10.0)
- Candle confirmation (On/Off)
EMA Visualization:
- Show/Hide Fast EMA
- Customizable Fast EMA color
- Show/Hide Slow EMA
- Customizable Slow EMA color

How to Use
1. Add the indicator to your 5-minute chart
2. Adjust parameters according to your trading style
3. Set up alerts to receive notifications
4. Wait for clear BUY or SELL signals
5. Manage the trade following the SL and TP levels displayed

Disclaimer: This indicator is a technical analysis tool. It does not constitute financial advice. Trading carries significant risks and you may lose your capital. Always trade responsibly with proper risk management.

Pernyataan Penyangkalan

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.