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"
You must be logged in to post a comment.
hi/ciao nicholas ti scrivo approfittando della pagina, perche ho bisogno di aiuto..... sto ultimando una strategia per pro order molto buona (a mio giudizio) presuppone un plafond di almeno 1500€ per un contratto da 200€, validata a 100000 barre, provata in reale con ottimi risultati....per renderla quasi perfetta (sullo strumento da me scelto) avrei bisogno di aiuto per formulare un codice che a fronte di una diminuzione nel giorno precedente o in corso di piu di 250pips dia solo ordini long e viceversa per un aumento di piu di 250pips dia solo ordini short. (la condizione deve essere valida solo in queste occasioni, in situazioni normali ( cioe sotto la soglia dei 250pips) gli ordini limite vengono messi secondo le metodologie proprie del sistema grazie luigi
Hi Nicolas, The indicator works a treat. Thank you so much for your efforts, I really wasn't expecting anyone to just write a piece of code. Think I'm going to like it here!
Hi Nicholas, excuse me, but I don't know about this opportunity, I try, sorry again