This RSI has a very clear idea about when to buy and sell. It plots buy and sell signals. It is an expert system. Yes, of course, it can make some errors. You should have used stop-loss
版本注释
Added purple arrows. Purple arrows are not a final decision. They are how it is likely to decide in the next step
版本注释
Refactored the decision into a single pine function so that it can be easily used in other scripts