The RSIoMA is a simple RSI calculation of a moving average. In this version you can choose the smoothing period and method of the moving average (PriceSmoothing = period and PriceSmoothingM = method).
This version of the RSIoMA include the dynamic levels calculation for overbought and oversold zones.
Converted from an MT5 version by a request in the forum.
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
//PRC_RSIoMA extended | indicator //27.08.2018 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from MT5 version // --- settings RsiPeriod = 14 // Rsi period PriceSmoothing = 21 // Price smoothing (<= 1 for no smoothing) PriceSmoothingM = 1 // Price smoothing method (MA mode) MinMaxPeriod = 50 // Floating levels period (<= 1 for fixed levels) LevelUp = 80.0 // Up level % LevelDown = 20.0 // Down level % // --- end of settings RsiPrice = customclose // Price to use n=max(1,PriceSmoothing) ma=average[n,PriceSmoothingM](RsiPrice) rsioma=rsi[RsiPeriod](ma) //levels mmin = rsioma mmax = rsioma for k=1 to MinMaxPeriod-1 do mmin=min(rsioma[k],mmin) mmax=max(rsioma[k],mmax) next rrange = mmax-mmin levelupz = mmin+LevelUp * rrange/100 leveldnz = mmin+LevelDown * rrange/100 levelmi = mmin+0.5*rrange //colours r=192 g=192 b=192 if rsioma>levelupz then r=50 g=205 b=50 elsif rsioma<leveldnz then r=255 g=165 b=0 endif return rsioma coloured(r,g,b) style(line,3) as "RSIoMA",levelupz coloured(50,205,50) style(dottedline,2) as "Level Up", leveldnz coloured(255,165,0) style(dottedline,2) as "Level Down", levelmi coloured(155,155,155) style(dottedline,2) as "mid level" |
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