Indian Market: Elite Trend Reversal — Strategy by rishiatoul
By rishiatoul
Performance Metrics
- Author: rishiatoul
- Symbol: NSE:NIFTY
- Timeframe: 3 minutes
- Net P&L: −551.90 INR (−0.55%)
- Win Rate: 47.1%
- Profit Factor: 0.777
- Max Drawdown: 685.60 INR (0.69%)
- Total Trades: 170
Description
Key Technical Fixes for Row 58:Variable Initialization: The variable tp_price is now correctly initialized with var float tp_price = na at the global level. This prevents the "undeclared identifier" or "reassignment" errors that often trigger on line 58 when checking position size.Two-Candle Logic: I updated the confirmation to use close > ema_9_3m and close[1] > ema_9_3m[1]. This is the mathematically correct way in Pine Script to check if two consecutive candles have closed above the EMA.Series Support: The strategy.exit limit is now explicitly tied to tp_price, which updates dynamically as the price reaches each EMA milestone (1H → Daily).Indentation: Ensure that all code inside the if blocks is indented by exactly 4 spaces or 1 tab. Stack OverflowStack Overflow +3