r/pinescript • • 18d ago

Fixed RSI levels vs adaptive ones: why 70/30 fails exactly when you need it

TL;DR: RSI 70/30 assumes every market behaves the same. It doesn’t. In strong trends RSI can sit above 70 for weeks, and in quiet ranges it barely reaches 70 at all. Adapting the levels to the market usually works better than the fixed ones.

Where 70/30 breaks

In a strong uptrend, RSI above 70 isn’t a sell signal. It can stay above the threshold for days or weeks. Shorting every “overbought” reading means fighting against the trend over and over.

In a calm, ranging market, RSI often swings between 40 and 60. The 70/30 levels never trigger, so the indicator goes silent exactly when mean reversion would actually work.

What works better

Shift the levels with the trend. A common rule of thumb: in uptrends RSI tends to hold roughly 40-80, in downtrends roughly 20-60. A pullback to 40 in an uptrend can be the real buy zone, not 30.

Use percentiles instead of fixed numbers. Instead of “above 70”, ask “is RSI in its top 10% of the last few hundred bars?” The level adjusts to each market automatically.

Add a trend filter. Only take overbought signals when price is below a slow MA, and oversold ones when it’s above.

Limitations

Adaptive levels lag too. When a market switches from trend to range, they take time to catch up.

The 40-80 / 20-60 ranges are rules of thumb, not laws. They differ by market and timeframe, so test before trusting them.

RSI is still just one input. It works best combined with something that measures trend or volatility.

12 Upvotes

18 comments sorted by

3

u/TSDevStuff 18d ago

I moved to percentiles, but ta.percentile_nearest_rank on a rolling window has a catch: the lookback decides everything, and a long one lags just as badly as fixed levels in a regime switch. I'd test the lookback as a range and look for a plateau, not pick the value that looks best on one chart. Also compare against plain 70/30 with the same trend filter, since the filter is often doing most of the work.

1

u/NJ_Algo 18d ago

Fair point. The lookback is where a lot of overfitting can hide. I agree with you regarding the comparison against plain 70/30 with the same trend filter, I should have put it in the post. Did you actually do a research regarding the perfect lookback?

2

u/TSDevStuff 18d ago

No, and I'd be wary of anyone claiming one. It shifts with the asset and timeframe, so I test a range and pick from the middle of a stable plateau rather than the peak.

2

u/t2ton 14d ago

I tested many times, buy 55 sell 40 gives best results on daily timeframe. On weekly catches all trends and enormous profit. Often though it coincides with just MA50 strategy, but holds through stupid April sell-offs with sharp recoveries, when strict MA50 strategy sells in big loss and buys higher. 

1

u/NJ_Algo 14d ago

Interesting. Did 55/40 also hold up on other assets and on data you didn’t tune it on? On weekly the number of trades is small, so that would tell a lot.

2

u/t2ton 13d ago

I have a huge watchlist and I usually go through stocks and see a performance vs buy and hold and win rate.  It works well for ETFs and some futures also.

As said there is no magic in the strategy and chop also kills performance, but for clean stocks, that not chaotically jump here and there, long time performance should be decent. 

2

u/ScientificBeastMode 18d ago

This is dumb. But I guess if it actually made you money personally, then keep doing that I guess.

1

u/Nekssz 15d ago

Indeed

0

u/coffeeshopcrypto 17d ago

no its just dumb.

2

u/mrcake123 18d ago

Sounds like an extra dose of hindsight Koolaid

2

u/ButtStallion007 18d ago

Thanks for the question Claude.

1

u/Obviously_not_maayan 18d ago

You're introducing more lag to an already lagging indicator.

1

u/vovapetrov20 18d ago

Ai slop.

1

u/Motor_Potential_4849 17d ago

I find much better success with short period RSI settings. Much better.

1

u/halcyonwit 17d ago

What do you mean WORKS BETTER, please no more!