Kuskus Starlight

Category: Indicators By: Nicolas Created: October 24, 2016, 9:29 AM
October 24, 2016, 9:29 AM
Indicators
5 Comments

The Kusku Starlight indicator is an oscillator built upon some kind of Fisher transform of price. It is normalized over the last “RangePeriods”. Price smoothing can be adjusted in the parameters as well. I translate the code from MT4 by a request on English forum.

 

//PRC_KuskusStarlight | indicator
//24.10.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//adapted from MT4 indicators'code

// --- parameters
RangePeriods=30
PriceSmoothing=0.3    // =0.67
IndexSmoothing=0.3    // =0.50

if barindex>RangePeriods then
 LowestLow=Lowest[RangePeriods](Low) 
 HighestHigh=Highest[RangePeriods](high)

 if (HighestHigh-LowestLow<0.1*Pointsize) then
  HighestHigh=LowestLow+0.1*Pointsize
 endif
 GreatestRange=HighestHigh-LowestLow
 MidPrice=(High+Low)/2

 // PriceLocation in current Range
 if (GreatestRange<>0) then
  PriceLocation=(MidPrice-LowestLow)/GreatestRange
  PriceLocation= 2.0*PriceLocation - 1.0
 endif

 // Smoothing of PriceLocation
 ExtMapBuffer4=PriceSmoothing*ExtMapBuffer4[1]+(1.0-PriceSmoothing)*PriceLocation
 SmoothedLocation=ExtMapBuffer4
 if (SmoothedLocation> 0.99) then
  SmoothedLocation= 0.99
 elsif (SmoothedLocation<-0.99) then
  SmoothedLocation=-0.99
 endif

 // FisherIndex
 if(1-SmoothedLocation<>0)  then
  FishIndex=Log((1+SmoothedLocation)/(1-SmoothedLocation))
 endif

 // Smoothing of FisherIndex
 ExtMapBuffer1=IndexSmoothing*ExtMapBuffer1[1]+(1.0-IndexSmoothing)*FishIndex 
 SmoothedFish=ExtMapBuffer1
 if SmoothedFish >0 then
  color = 1
 else
 color = -1
 endif
endif

return SmoothedFish coloured by color as "Kuskus Starglight", 0 as "0 level"

 

Download
Filename: PRC_KuskusStarlight.itf
Downloads: 239
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...