SuperIchi [LUX] For ThinkOrSwim

Katsu

Member
VIP
I am looking for an indicator called Superichi by Lax Algo I have the code from Tradingview
https://www.tradingview.com/script/vDGd9X9y-SuperIchi-LuxAlgo/

This indicator is a modification of the Ichimoku indicator using the Supertrend indicator as its core.
Unlike the regular components of the Ichimoku based on rolling maximums/minimums, using the Supertrend allows smoother components and makes it less prone to whipsaw signals.

Usage
The SuperIchi indicator can be interpreted similarly to a regular Ichimoku.
Users can use the Supertrend Factor to detect shorter or longer-term trends.
BdTSvaf.png
 
Last edited by a moderator:

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

I am looking for an indicator called Superichi by Lax Algo I have the code from Tradingview
https://www.tradingview.com/script/vDGd9X9y-SuperIchi-LuxAlgo/

// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo

//@version=5
indicator("SuperIchi [LUX]",'SuperIchi [LuxAlgo]',overlay=true,max_lines_count=500)
tenkan_len = input(9,'Tenkan          ',inline='tenkan')
tenkan_mult = input(2.,'',inline='tenkan')

kijun_len = input(26,'Kijun             ',inline='kijun')
kijun_mult = input(4.,'',inline='kijun')

spanB_len = input(52,'Senkou Span B ',inline='span')
spanB_mult = input(6.,'',inline='span')

offset = input(26,'Displacement')
//------------------------------------------------------------------------------
avg(src,length,mult)=>
atr = ta.atr(length)*mult
up = hl2 + atr
dn = hl2 - atr
upper = 0.,lower = 0.
upper := src[1] < upper[1] ? math.min(up,upper[1]) : up
lower := src[1] > lower[1] ? math.max(dn,lower[1]) : dn

os = 0,max = 0.,min = 0.
os := src > upper ? 1 : src < lower ? 0 : os[1]
spt = os == 1 ? lower : upper
max := ta.cross(src,spt) ? math.max(src,max[1]) : os == 1 ? math.max(src,max[1]) : spt
min := ta.cross(src,spt) ? math.min(src,min[1]) : os == 0 ? math.min(src,min[1]) : spt
math.avg(max,min)
//------------------------------------------------------------------------------
tenkan = avg(close,tenkan_len,tenkan_mult)
kijun = avg(close,kijun_len,kijun_mult)

senkouA = math.avg(kijun,tenkan)
senkouB = avg(close,spanB_len,spanB_mult)
//------------------------------------------------------------------------------
tenkan_css = #2157f3
kijun_css = #ff5d00

cloud_a = color.new(color.teal,80)
cloud_b = color.new(color.red,80)

chikou_css = #7b1fa2

plot(tenkan,'Tenkan-Sen',tenkan_css)
plot(kijun,'Kijun-Sen',kijun_css)

plot(ta.crossover(tenkan,kijun) ? kijun : na,'Crossover',#2157f3,3,plot.style_circles)
plot(ta.crossunder(tenkan,kijun) ? kijun : na,'Crossunder',#ff5d00,3,plot.style_circles)

A = plot(senkouA,'Senkou Span A',na,offset=offset-1)
B = plot(senkouB,'Senkou Span B',na,offset=offset-1)
fill(A,B,senkouA > senkouB ? cloud_a : cloud_b)

plot(close,'Chikou',chikou_css,offset=-offset+1,display=display.none)
check the below

CSS:
#// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0
#// © LuxAlgo
#indicator("SuperIchi [LUX]",'SuperIchi [LUX]',overlay=true,max_lines_count=500)
# Converted by Sam4Cok@Samer800 - 06/2022

input tenkan_len   = 9;    #'Tenkan????????
input kijun_len    = 26;   #'Kijun???????????
input spanB_len    = 52;   #'Senkou Span B?',inline='span')
input Displacement = 26;   #'Displacement')
input tenkan_mult  = 2.0;  # tenkan
input kijun_mult   = 4.0;  #' kijun
input spanB_mult   = 6.0;  #'span')
input UseSmooth    = no;
input TenkanLine   = yes;
input KijunLine    = yes;
input ChikouLine   = no;
input Cloud        = yes;

def na = Double.NaN;

#//------------------------------------------------------------------------------
DefineGlobalColor("tenkan",  CreateColor(33 , 87 , 243));
DefineGlobalColor("kijun",   CreateColor(255, 93 , 0  ));
DefineGlobalColor("cloudUP", CreateColor(0  , 128, 128));
DefineGlobalColor("cloudDN", CreateColor(239, 83 , 80 ));
DefineGlobalColor("chikou",  CreateColor(123, 31 , 162));
#//------------------------------------------------------------------------------

script avg {
  input src = close;
  input length = 9;
  input mult   = 2;
    def atr = ATR(LENGTH = length) * mult;
    def up = hl2 + atr;
    def dn = hl2 - atr;
    def upper = if src[1] < upper[1] then Min(up, upper[1]) else up;
    def lower = if src[1] > lower[1] then Max(dn, lower[1]) else dn;
    def os  = if src > upper then 1 else if src < lower then 0 else os[1];
    def spt = if os == 1 then lower else upper;
    def max = if Crosses(src, spt) then Max(src, max[1]) else if os == 1 then Max(src, max[1]) else spt;
    def min = if Crosses(src, spt) then Min(src, min[1]) else if os == 0 then Min(src, min[1]) else spt;
    def value = (max + min) / 2;
    plot return = value;
}
#//------------------------------------------------------------------------------

def tenkan = avg(close, tenkan_len, tenkan_mult);
def kijun  = avg(close, kijun_len , kijun_mult );

plot tenkan1 = if TenkanLine then tenkan else Na;
plot kijun1  = if KijunLine  then kijun  else Na;
plot Chikou  = if ChikouLine and UseSmooth then EhlersSuperSmootherFilter(close[-Displacement + 1]) else
               if ChikouLine then close[-Displacement + 1] else Na;

def senkouA1 = (kijun + tenkan) / 2 ;
def senkouB1 = avg(close, spanB_len, spanB_mult);

def senkouA = senkouA1[Displacement - 1];
def senkouB = senkouB1[Displacement - 1];

#//------------------------------------------------------------------------------

tenkan1.SetPaintingStrategy(PaintingStrategy.LINE);
tenkan1.SetLineWeight(2);
tenkan1.SetDefaultColor(GlobalColor("tenkan"));

kijun1.SetPaintingStrategy(PaintingStrategy.LINE);
kijun1.SetLineWeight(2);
kijun1.SetDefaultColor(GlobalColor("kijun"));

Chikou.SetPaintingStrategy(PaintingStrategy.LINE);
Chikou.SetLineWeight(1);
Chikou.SetDefaultColor(GlobalColor("Chikou"));

plot DotUP = if tenkan crosses above kijun then kijun else Na;
DotUP.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotUP.SetDefaultColor(GlobalColor("tenkan"));
DotUP.SetLineWeight(3);

plot DotDN = if tenkan crosses below kijun then kijun else Na;
DotDN.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotDN.SetDefaultColor(GlobalColor("kijun"));
DotDN.SetLineWeight(3);

AddCloud (if Cloud then senkouA else Na, senkouB, GlobalColor("cloudUP"), GlobalColor("cloudDN"));

#-- END of CODE
 
Last edited by a moderator:
check the below

CSS:
#// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0
#// © LuxAlgo
#indicator("SuperIchi [LUX]",'SuperIchi [LUX]',overlay=true,max_lines_count=500)
# Converted by Sam4Cok@Samer800 - 06/2022

input tenkan_len   = 9;    #'Tenkan????????
input kijun_len    = 26;   #'Kijun???????????
input spanB_len    = 52;   #'Senkou Span B?',inline='span')
input Displacement = 26;   #'Displacement')
input tenkan_mult  = 2.0;  # tenkan
input kijun_mult   = 4.0;  #' kijun
input spanB_mult   = 6.0;  #'span')
input UseSmooth    = no;
input TenkanLine   = yes;
input KijunLine    = yes;
input ChikouLine   = no;
input Cloud        = yes;

def na = Double.NaN;

#//------------------------------------------------------------------------------
DefineGlobalColor("tenkan",  CreateColor(33 , 87 , 243));
DefineGlobalColor("kijun",   CreateColor(255, 93 , 0  ));
DefineGlobalColor("cloudUP", CreateColor(0  , 128, 128));
DefineGlobalColor("cloudDN", CreateColor(239, 83 , 80 ));
DefineGlobalColor("chikou",  CreateColor(123, 31 , 162));
#//------------------------------------------------------------------------------

script avg {
  input src = close;
  input length = 9;
  input mult   = 2;
    def atr = ATR(LENGTH = length) * mult;
    def up = hl2 + atr;
    def dn = hl2 - atr;
    def upper = if src[1] < upper[1] then Min(up, upper[1]) else up;
    def lower = if src[1] > lower[1] then Max(dn, lower[1]) else dn;
    def os  = if src > upper then 1 else if src < lower then 0 else os[1];
    def spt = if os == 1 then lower else upper;
    def max = if Crosses(src, spt) then Max(src, max[1]) else if os == 1 then Max(src, max[1]) else spt;
    def min = if Crosses(src, spt) then Min(src, min[1]) else if os == 0 then Min(src, min[1]) else spt;
    def value = (max + min) / 2;
    plot return = value;
}
#//------------------------------------------------------------------------------

def tenkan = avg(close, tenkan_len, tenkan_mult);
def kijun  = avg(close, kijun_len , kijun_mult );

plot tenkan1 = if TenkanLine then tenkan else Na;
plot kijun1  = if KijunLine  then kijun  else Na;
plot Chikou  = if ChikouLine and UseSmooth then EhlersSuperSmootherFilter(close[-Displacement + 1]) else
               if ChikouLine then close[-Displacement + 1] else Na;

def senkouA1 = (kijun + tenkan) / 2 ;
def senkouB1 = avg(close, spanB_len, spanB_mult);

def senkouA = senkouA1[Displacement - 1];
def senkouB = senkouB1[Displacement - 1];

#//------------------------------------------------------------------------------

tenkan1.SetPaintingStrategy(PaintingStrategy.LINE);
tenkan1.SetLineWeight(2);
tenkan1.SetDefaultColor(GlobalColor("tenkan"));

kijun1.SetPaintingStrategy(PaintingStrategy.LINE);
kijun1.SetLineWeight(2);
kijun1.SetDefaultColor(GlobalColor("kijun"));

Chikou.SetPaintingStrategy(PaintingStrategy.LINE);
Chikou.SetLineWeight(1);
Chikou.SetDefaultColor(GlobalColor("Chikou"));

plot DotUP = if tenkan crosses above kijun then kijun else Na;
DotUP.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotUP.SetDefaultColor(GlobalColor("tenkan"));
DotUP.SetLineWeight(3);

plot DotDN = if tenkan crosses below kijun then kijun else Na;
DotDN.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotDN.SetDefaultColor(GlobalColor("kijun"));
DotDN.SetLineWeight(3);

AddCloud (if Cloud then senkouA else Na, senkouB, GlobalColor("cloudUP"), GlobalColor("cloudDN"));

#-- END of CODE
Thank you so much, such a blessing!!!!! Thank you!!!!
 
check the below

CSS:
#// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0
#// © LuxAlgo
#indicator("SuperIchi [LUX]",'SuperIchi [LUX]',overlay=true,max_lines_count=500)
# Converted by Sam4Cok@Samer800 - 06/2022

input tenkan_len   = 9;    #'Tenkan????????
input kijun_len    = 26;   #'Kijun???????????
input spanB_len    = 52;   #'Senkou Span B?',inline='span')
input Displacement = 26;   #'Displacement')
input tenkan_mult  = 2.0;  # tenkan
input kijun_mult   = 4.0;  #' kijun
input spanB_mult   = 6.0;  #'span')
input UseSmooth    = no;
input TenkanLine   = yes;
input KijunLine    = yes;
input ChikouLine   = no;
input Cloud        = yes;

def na = Double.NaN;

#//------------------------------------------------------------------------------
DefineGlobalColor("tenkan",  CreateColor(33 , 87 , 243));
DefineGlobalColor("kijun",   CreateColor(255, 93 , 0  ));
DefineGlobalColor("cloudUP", CreateColor(0  , 128, 128));
DefineGlobalColor("cloudDN", CreateColor(239, 83 , 80 ));
DefineGlobalColor("chikou",  CreateColor(123, 31 , 162));
#//------------------------------------------------------------------------------

script avg {
  input src = close;
  input length = 9;
  input mult   = 2;
    def atr = ATR(LENGTH = length) * mult;
    def up = hl2 + atr;
    def dn = hl2 - atr;
    def upper = if src[1] < upper[1] then Min(up, upper[1]) else up;
    def lower = if src[1] > lower[1] then Max(dn, lower[1]) else dn;
    def os  = if src > upper then 1 else if src < lower then 0 else os[1];
    def spt = if os == 1 then lower else upper;
    def max = if Crosses(src, spt) then Max(src, max[1]) else if os == 1 then Max(src, max[1]) else spt;
    def min = if Crosses(src, spt) then Min(src, min[1]) else if os == 0 then Min(src, min[1]) else spt;
    def value = (max + min) / 2;
    plot return = value;
}
#//------------------------------------------------------------------------------

def tenkan = avg(close, tenkan_len, tenkan_mult);
def kijun  = avg(close, kijun_len , kijun_mult );

plot tenkan1 = if TenkanLine then tenkan else Na;
plot kijun1  = if KijunLine  then kijun  else Na;
plot Chikou  = if ChikouLine and UseSmooth then EhlersSuperSmootherFilter(close[-Displacement + 1]) else
               if ChikouLine then close[-Displacement + 1] else Na;

def senkouA1 = (kijun + tenkan) / 2 ;
def senkouB1 = avg(close, spanB_len, spanB_mult);

def senkouA = senkouA1[Displacement - 1];
def senkouB = senkouB1[Displacement - 1];

#//------------------------------------------------------------------------------

tenkan1.SetPaintingStrategy(PaintingStrategy.LINE);
tenkan1.SetLineWeight(2);
tenkan1.SetDefaultColor(GlobalColor("tenkan"));

kijun1.SetPaintingStrategy(PaintingStrategy.LINE);
kijun1.SetLineWeight(2);
kijun1.SetDefaultColor(GlobalColor("kijun"));

Chikou.SetPaintingStrategy(PaintingStrategy.LINE);
Chikou.SetLineWeight(1);
Chikou.SetDefaultColor(GlobalColor("Chikou"));

plot DotUP = if tenkan crosses above kijun then kijun else Na;
DotUP.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotUP.SetDefaultColor(GlobalColor("tenkan"));
DotUP.SetLineWeight(3);

plot DotDN = if tenkan crosses below kijun then kijun else Na;
DotDN.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotDN.SetDefaultColor(GlobalColor("kijun"));
DotDN.SetLineWeight(3);

AddCloud (if Cloud then senkouA else Na, senkouB, GlobalColor("cloudUP"), GlobalColor("cloudDN"));

#-- END of CODE
Flawless Thank u soo much
 
check the below

CSS:
#// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0
#// © LuxAlgo
#indicator("SuperIchi [LUX]",'SuperIchi [LUX]',overlay=true,max_lines_count=500)
# Converted by Sam4Cok@Samer800 - 06/2022

input tenkan_len   = 9;    #'Tenkan????????
input kijun_len    = 26;   #'Kijun???????????
input spanB_len    = 52;   #'Senkou Span B?',inline='span')
input Displacement = 26;   #'Displacement')
input tenkan_mult  = 2.0;  # tenkan
input kijun_mult   = 4.0;  #' kijun
input spanB_mult   = 6.0;  #'span')
input UseSmooth    = no;
input TenkanLine   = yes;
input KijunLine    = yes;
input ChikouLine   = no;
input Cloud        = yes;

def na = Double.NaN;

#//------------------------------------------------------------------------------
DefineGlobalColor("tenkan",  CreateColor(33 , 87 , 243));
DefineGlobalColor("kijun",   CreateColor(255, 93 , 0  ));
DefineGlobalColor("cloudUP", CreateColor(0  , 128, 128));
DefineGlobalColor("cloudDN", CreateColor(239, 83 , 80 ));
DefineGlobalColor("chikou",  CreateColor(123, 31 , 162));
#//------------------------------------------------------------------------------

script avg {
  input src = close;
  input length = 9;
  input mult   = 2;
    def atr = ATR(LENGTH = length) * mult;
    def up = hl2 + atr;
    def dn = hl2 - atr;
    def upper = if src[1] < upper[1] then Min(up, upper[1]) else up;
    def lower = if src[1] > lower[1] then Max(dn, lower[1]) else dn;
    def os  = if src > upper then 1 else if src < lower then 0 else os[1];
    def spt = if os == 1 then lower else upper;
    def max = if Crosses(src, spt) then Max(src, max[1]) else if os == 1 then Max(src, max[1]) else spt;
    def min = if Crosses(src, spt) then Min(src, min[1]) else if os == 0 then Min(src, min[1]) else spt;
    def value = (max + min) / 2;
    plot return = value;
}
#//------------------------------------------------------------------------------

def tenkan = avg(close, tenkan_len, tenkan_mult);
def kijun  = avg(close, kijun_len , kijun_mult );

plot tenkan1 = if TenkanLine then tenkan else Na;
plot kijun1  = if KijunLine  then kijun  else Na;
plot Chikou  = if ChikouLine and UseSmooth then EhlersSuperSmootherFilter(close[-Displacement + 1]) else
               if ChikouLine then close[-Displacement + 1] else Na;

def senkouA1 = (kijun + tenkan) / 2 ;
def senkouB1 = avg(close, spanB_len, spanB_mult);

def senkouA = senkouA1[Displacement - 1];
def senkouB = senkouB1[Displacement - 1];

#//------------------------------------------------------------------------------

tenkan1.SetPaintingStrategy(PaintingStrategy.LINE);
tenkan1.SetLineWeight(2);
tenkan1.SetDefaultColor(GlobalColor("tenkan"));

kijun1.SetPaintingStrategy(PaintingStrategy.LINE);
kijun1.SetLineWeight(2);
kijun1.SetDefaultColor(GlobalColor("kijun"));

Chikou.SetPaintingStrategy(PaintingStrategy.LINE);
Chikou.SetLineWeight(1);
Chikou.SetDefaultColor(GlobalColor("Chikou"));

plot DotUP = if tenkan crosses above kijun then kijun else Na;
DotUP.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotUP.SetDefaultColor(GlobalColor("tenkan"));
DotUP.SetLineWeight(3);

plot DotDN = if tenkan crosses below kijun then kijun else Na;
DotDN.SetPaintingStrategy(PaintingStrategy.SQUARES);
DotDN.SetDefaultColor(GlobalColor("kijun"));
DotDN.SetLineWeight(3);

AddCloud (if Cloud then senkouA else Na, senkouB, GlobalColor("cloudUP"), GlobalColor("cloudDN"));

#-- END of CODE
@Sammy800, could you please make it work on tick charts? Only chikouline shows on tick charts for some reason. Thank you very much!
 
@Sammy800, could you please make it work on tick charts? Only chikouline shows on tick charts for some reason. Thank you very much!

Unfortunately, indicators either work or don't work, or partially work on range and tick charts.

Given that many of the scripts on this forum are time-dependent, a large majority will not be able to be
applied to range, tick, renko charts.
 
I'm getting a EXACTLY ONE PLOT EXPECTED message, what am I missing?
 
Last edited by a moderator:
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
495 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