It can be used for intraday trading and as well as swing trades.
For using intraday I prefer 8 ema and 20 ema to take trades and trail stop losses with 50ema and 200 ema for confirmation.
For swing trades you can always use 50 ema as support to buy on the dip.
The entry is made on the basis of the stock breaks the previous day high or previous day low.
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.