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"