Derivative Oscillator - DEROSC

Category: Indicators By: Nicolas Created: October 5, 2018, 9:58 AM
October 5, 2018, 9:58 AM
Indicators
8 Comments

The Derivative Oscillator is an advanced version of the Relative Strength Index(RSI) and applies the MACD Histogram principle to the double smoothed RSI. The indicator was developed by Constance Brown and published in her book “Technical Analysis for the Trading Professional.”

The indicator is a twice exponentially smoothed RSI with the default parameters of 5 and 3.
Then a signal line is formed by simple smoothing of the resulting 2ERSI with the period of 9.
The derived histogram is calculated as a difference between 2ERSI and the signal line.

//PRC_DEROSC (derivative oscillator) | indicator
//05.10.2018
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from MT5 version

// --- settings 
InpPeriodRSI  =  14 // RSI period
InpPeriodEMA1 =  5 // First EMA period
InpPeriodEMA2 =  3 // Second EMA period
InpPeriodSMA  =  9 // SMA period
// --- end of settings 

InpAppliedPrice   = customclose

BufferRSI = RSI[InpPeriodRSI](InpAppliedPrice)
BufferEMA1 = average[InpPeriodEMA1,1](BufferRSI)
BufferEMA2 = average[InpPeriodEMA2,1](BufferEMA1)
BufferSMA = average[InpPeriodSMA](BufferEMA2)

DEROSC = (BufferEMA2-BufferSMA)/Pointsize

if DEROSC>0 then
 if DEROSC>DEROSC[1] then
  r=0
  g=128
  b=0
 else
  r=154
  g=205
  b=50
 endif
else
 if DEROSC>DEROSC[1] then
  r=255
  g=165
  b=0
 else
  r=255
  g=0
  b=0
 endif
endif

RETURN DEROSC coloured(r,g,b) style(histogram,1), 0 coloured(169,169,169) style(dottedline,1)

 

Download
Filename: PRC_DEROSC.itf
Downloads: 459
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...