In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
2. Then check them in a smaller timeframe where you can see it is not breaking the previous candle's high and falling (Like Dr Reddy) for a stock which is falling or Vice Versa.
3. If the previous candle's high is broken in case of a falling stock (or, vice versa for a stock that is going up) you long it with a stop loss at the candle's low.
4. After two, three candles if it is in profit, update the stop loss to cost.
Example trade -
CO DRREDDY18DECFUT NFO 0 0.00 2,602.00 +4,300.00 0.00%