KusKus Starlight + EMA For ThinkOrSwim

Rokz

New member
The KusKus Starlight indicator is an oscillator built using Fisher price transformation. It is also normalized over the last range periods. Smoothing can be adjusted in the parameters.

This version adds an EMA to the histogram
DWoEA49.png

Hoping @samer800 or one of the conversion experts can convert this indicator for ToS from Pinescript.
https://www.tradingview.com/script/SuznjkYC-KusKus-Starlight-EMA/
 
Last edited by a moderator:
Hoping @samer800 or one of the conversion experts can convert this indicator for ToS from Pinescript.
https://www.tradingview.com/script/SuznjkYC-KusKus-Starlight-EMA/

The KusKus Starlight indicator is an oscillator built using Fisher price transformation. It is also normalized over the last range periods. Smoothing can be adjusted in the parameters.

This version adds an EMA to the histogram
View attachment 20818
check the below:

CSS:
#//@ErwinBeckers
#//If you use my scripts please leave a like or follow me. Thank you!
#study("KusKus Starlight + EMA", shorttitle="KusKus Starlight + EMA", overlay=false)
# - Converted by Sam4Cok@Samer800    - 02/2024
Declare lower;

#//parameters
input rangePeriods = 30; #,title="Range Periods")
input priceSmoothing = 0.3; #,title="Price Smoothing")
input indexSmoothing = 0.3; #,title="Index Smoothing")
input emaLength = 20; #, "EMA Period")

def na = Double.NaN;

def highesthigh = highest(high,rangePeriods);
def lowestlow = lowest(low,rangePeriods);

def greatestrange = if (highesthigh-lowestlow)!=0 then (highesthigh-lowestlow) else greatestrange[1];
def midprice = (high+low)/2;

#//pricelocation
def pricelocation = 2*((midprice-lowestlow)/greatestrange)-1;

#//smoothing of pricelocation
def extmapbuffer = CompoundValue(1,pricesmoothing*extmapbuffer[1] + (1-pricesmoothing)*pricelocation, (1-pricesmoothing)*pricelocation);
def smoothedlocation = if (if extmapbuffer>0.99 then 0.99 else (if extmapbuffer<-0.99 then -0.99 else extmapbuffer))!=1 then
    (if extmapbuffer>0.99 then 0.99 else (if extmapbuffer<-0.99 then -0.99 else extmapbuffer)) else smoothedlocation[1];

#//fisherlocation
def fishindex = log((1+smoothedlocation)/(1-smoothedlocation));
#//smoothingoffishindex
def extmapbuffer1 = CompoundValue(1, indexsmoothing * extmapbuffer1[1] + (1-indexsmoothing)*fishindex, (1-indexsmoothing)*fishindex);
def smoothedfish = extmapbuffer1;
def ma = ExpAverage(smoothedfish,emaLength);

plot ema = ma; #, color=yellow, linewidth=2)
plot fishHist = smoothedfish; #,color=smoothedfish>0?green:red,linewidth=3,style=histogram)
ema.SetLineWeight(2);
ema.SetDefaultColor(Color.MAGENTA);
fishHist.SetLineWeight(3);
fishHist.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
fishHist.AssignValueColor(if smoothedfish>0 then Color.GREEN else COlor.RED);

#-- END of CODE
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
427 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top