Strong Buy: Triggered when: Price is above the 564 EMA (uptrend). The 5 EMA crosses above the 20 EMA (bullish crossover). The current candle is green (close > open). Strong Sell: Triggered when: Price is below the 564 EMA (downtrend). The 5 EMA crosses below the 20 EMA (bearish crossover). The current candle is red (close < open). Exit Signal:
Position is closed when the price touches back to the 564 EMA (either side, up or down): A "Close Position" label is shown in green for long trades. A "Close Position" label is shown in red for short trades. Risk Management:
Stop-Loss: Placed at the last swing low (for longs) or last swing high (for shorts), calculated over the last 10 bars. Take-Profit: A 1:3 risk/reward ratio is used, where the potential reward is three times the risk. Alerts:
Alerts are triggered for buy and sell signals. Alerts are also triggered when the exit condition (price touching the 564 EMA) is met. This script is designed to work on timeframes of 15 minutes or higher but can also be used for 5-minute scalping. It plots the EMAs on the chart, highlights buy/sell opportunities, shows stop-loss and take-profit levels, and generates alerts for key signals.