TradingView
bharatTrader
20 окт 2020 г., 12:42

Adaptive and Static Relative Strength Overlay 

HDFC BANKNSE

Описание

This indictor combines adaptive and static relative strengths and displays the strength in a unique colour coding on the bars.
With this the one can view the performance of both the relative strengths in one indicator and overlay-ed on the price chart.

Adaptive Relative Strength - Date is identified based on market scenarios. It will change based on how the market trends in the future.
Static Relative Strength - Date is fixed (123 sessions). Roughly corresponds to 6 months.

The (default) colour coding is:
If "Both" is selected:
ars > 0 and srs > 0 = Blue
ars <=0 and srs <= 0 = Maroon
Orange otherwise (Any of ars or srs is negative)
If "Only ARS" is selected:
ars > 0 = Blue
Maroon otherwise
If "Only SRS" is selected:
srs > 0 = Blue
Maroon otherwise

Additionally the ARS and the SRS will be marked as labels on the bars corresponding to the reference dates.
The current ARS and SRS values will be market as label on the last bar.
Source can be any valid source, close is selected by default.
Default benchmark is "Nifty 50" the NSE Indian benchmark. This can be changed.
Комментарии
sachinwm
How to find ARS period
DJMEDHI
smartfinbiz
Superb sir
Quuh
Hi, thanks for the interesting implementation of the overlay. However, I would be interested to know to what extent the ARS is "adaptive". I haven't really understood that yet. I had initially suspected a volatility adaptation, but find nothing of the sort in the script. I would be very pleased about an answer!
bharatTrader
@Quuh, Thanks for your kind words. It is "adaptive" in the sense, that we desire to choose a "significant" day for the benchmark, from which to compare the strength of our scrip. It is adaptive as we are not fixing it to a fixed length and will vary as per the broader market scenario. Say for example, the Benchmark (broader market index like NASDAQ) recovers from a 1 month base, we would take that date as our ARS date and would like to compare the performance of our scrip from that day with respect to the benchmark. That way, we filter the strongest stocks after that correction. We change this date, after another similar "significant" event in the broader market.
Quuh
@bharatTrader, Thank you for the quick and helpful reply, to which I now have two follow-up questions.
(1) Your description sounds like I could anchor reference days from which to measure relative strength. However, this is not the case, isn't it? I can only set a specific periods, like looking back 20 days. I.e. in principle I would have to adjust the period by one day every day to preserve the reference point. Is that correct?
(2) I really like the idea of your indicator very much, but think that "adaptive" relative strength should be calculated in a volatility-adjusted kind of way. After all, if a reference index falls 1% and the compared ticker falls 2%, I wouldn't want to talk about relative weakness if the reference index has an average monthly volatility of 1.2% but the compared ticker has an value 4%. Your script would show it as relatively weak on that day, although on closer inspection it is relatively strong!
My coding skills are very weak ... otherwise I would implement this by my own hand. Yours, on the other hand, seem to be astonishingly great! So can you imagine to add a volatility-adjusted option to your script by means of beta, art or otherwise?. I think that would be a real novelty in the market. I curious to know your answer!
bharatTrader
@Quuh, (1) You have got it correct. This indicator needs an increment by 1 each trading session. Though I have one, that does away with this requirement. It is available as open source on my profile page. (2) I like your idea of volatility based strength measurements. I need to think over it. When you say, average monthly volatility, you refer to ATR over a month? Or?
Quuh
@bharatTrader, Thanks for your reply, I will have a look at the other (anchoring) indicator later. Anyway, this function is useful for my purposes!
And yes, if I'm talking about volatility based RS, then you could - just for example - use for example the ATR(20). That fits well with my trading style, but of course it would be ideal to also have the option to adjust this for longer viewing intervals to ATR(65) or the like.
In any case, I'm very glad you're considering working on something like this. If you decide to do so and I can help, don't be shy about writing to me!
Best regards
vivekagarwal1969
@bharatTrader, Thx for reply. May I know the indicator you have mentioned in Point 1 above. I could not get it on your profile. Thx
Ещё