The Disparity Index is a well known indicator used to assess overbought and oversold areas. In this code I added some bands to represent the overbought/oversold areas.
Since the Disparity Index is closely related to RSI by using a EMA130 you would have, on a daily timeframe, also a quite accurate weekly RSI at hand.
Blue skies
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
//variables //periodo=130 //tipo=1 //corr=2 //formulas a=average[periodo,tipo](close) dispidx=close-a b=std[periodo](dispidx) band=corr*b //colours setup if dispidx>band then r=205 g=0 b=0 else r=0 g=0 b=205 endif if dispidx<-band then r=0 g=205 b=0 endif return dispidx coloured (r,g,b) as "DI",0,band as "upper limit",-band as "lower limit" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials