It is tracking Previous candle high and Previous candle low. It is an important script to trail PDH PDL system (and more importantly to create alerts) which is rampantly used by price action traders.
Release Notes: Previous Script has certain restrictions for intraday. That has been fixed here.
Open-source script

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.

Want to use this script on a chart?
Get trades instantly and discuss them with me at my Slack Channel @

Our community is full with traders who actually trade!



bro script error not work
1. So, Firstly scan for stocks that are falling or shooting up more than 6%. I took Dr Reddy because it is the most fallen stock in entire FnO today. You can also do this. Take top 3 and bottom 3 in FNO stocks.

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%
Amit_Ghosh Amit_Ghosh
PS: I made this tiny script because I wanted to create an alert for this method.
+2 Reply
monugourav Amit_Ghosh
@Amit_Ghosh, how do you get the alerts?
What chart to take in intraday trades like this
can u discribe it more sir.
Amit_Ghosh RiteshKumar
@RiteshKumar, Let market over. I will.
When things fall like Dr-Reddy was falling ; Your task is to sell with a stop loss at PCH. Previous Candle High and also when the stop triggers. It triggers a buy too with SL at PCL. #WorksWith Stocks that moved > 6%
I am on it