Ichimoku For ThinkOrSwim

Does anyone has a study for ichmoku cloud where it can notify us when k line crosses above or under t line in 4 hr time frame ?
Or can someone help me set it up Bcz I have no knowledge in doing this
 
@Za321

n6VB09v.png


4MlOOZC.png
 
Last edited by a moderator:
Hi

New to ToS, I have never written a script. I use the Ichimoku in my trading. In ToS the default Ichimoku has solid colors for the Senkou Span A & B. I have looked but can see where I may change that. I prefer the cloud to be vertical dashed lines, I find it easier to see that candles that way. Is there a way to achieve that in the ToS default Ichimoku?

Thanks in advance for any help,
Coinn
 
Thank you rad14733, that is disappointing
Adjusting the opacity, as @rad14733 mentioned, to a lower value should make the candles show through the cloud better. And you can create a copy of the study and change the cloud colors, as mentioned earlier in this thread. Changing the cloud to colors dissimilar from your candles, like dark gray, may help.
 
XfJIf1K.jpg

Hi, just an fyi... I found if you scroll all the way down, the GLOBALS settings can be manually changed. Click the down arrow next to Globals to see the settings. Hope this helps!
 
Hello everyone, I have modified the Ichimoku cloud to provide long and short entry signals based on the YouTube video
. I back tested few and seems to be working, there are some instances where it provides false signals, I will look into eliminating them. If anyone wants to check it out, here is the code


Code:
# Ichimoku Long and Short entry signals based on Youtube video https://www.youtube.com/watch?v=KE_SAzserLE
# By arv06

# For Long Entry - Tenkan should be above Kijun, Chikou should be above the cloud, price should be above the cloud and cloud in front of 26 candles should be green (bullish)

# For Short Entry - Tenkan should be below Kijun, Chikou should be below the cloud, price should be below the cloud and cloud in front of 26 candles should be red (bearish)

input tenkan_period = 9;
input kijun_period = 26;
input showLabels = yes;
input showAlerts = no;
input showBubbles = yes;
input stopLossToTargetRatio=2;

plot Tenkan = (Highest(high, tenkan_period) + Lowest(low, tenkan_period)) / 2;
plot Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
plot SpanA = (Tenkan[kijun_period] + Kijun[kijun_period]) / 2;
plot SpanB = (Highest(high[kijun_period], 2 * kijun_period) + Lowest(low[kijun_period], 2 * kijun_period)) / 2;
plot Chikou = close[-kijun_period];

Tenkan.SetDefaultColor(Color.GREEN);
Tenkan.SetLineWeight(2);

Kijun.SetDefaultColor(Color.RED);
Kijun.SetLineWeight(2);

SpanA.SetDefaultColor(Color.WHITE);
SpanB.SetDefaultColor(Color.YELLOW);

Chikou.SetDefaultColor(Color.MAGENTA);
Chikou.SetLineWeight(2);

DefineGlobalColor("Bullish", Color.DARK_GREEN);
DefineGlobalColor("Bearish", Color.RED);
AddCloud(SpanA, SpanB, globalColor("Bullish"), globalColor("Bearish"));

def CloudTop = if SpanA > SpanB then SpanA else SpanB;
def CloudBottom = if SpanA > SpanB then SpanB else SpanA;

AddLabel(showLabels, "Price", if close > CloudTop then Color.GREEN else if close==CloudTop then Color.LIGHT_GRAY else Color.RED);
Alert(showAlerts && close crosses above CloudTop, concat("Price Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && close crosses below CloudBottom, concat("Price Down @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Conversion", if Tenkan > Kijun then Color.GREEN else if Tenkan==Kijun then Color.LIGHT_GRAY else Color.RED);
Alert(showAlerts && Tenkan crosses above Kijun, concat("Conversion Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && Tenkan crosses below Kijun, concat("Conversion Down @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Chikou", if Chikou[kijun_period] > CloudTop[kijun_period] then Color.GREEN else if Chikou[kijun_period] > CloudTop[kijun_period] then Color.RED else Color.LIGHT_GRAY);
Alert(showAlerts && Chikou[kijun_period] crosses above CloudTop[kijun_period], concat("Chikou Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && Chikou[kijun_period] crosses below CloudTop[kijun_period], concat("Chikou Down @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Cloud", if SpanA[-kijun_period] > SpanB[-kijun_period] then Color.GREEN else if SpanA[-kijun_period]==SpanB[-kijun_period] then Color.LIGHT_GRAY else Color.RED);
Alert(showAlerts && SpanA[-kijun_period] crosses above SpanB[-kijun_period], concat("Bullish Cloud @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && SpanA[-kijun_period] crosses below SpanB[-kijun_period], concat("Bearish Cloud @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Trade : " + if close > CloudTop then "Long" else if close < CloudBottom then "Short" else "N/A", if close > CloudTop then Color.GREEN else if close < CloudBottom then Color.RED else Color.LIGHT_GRAY);
Alert(showAlerts && close crosses above CloudTop, concat("Price Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && close crosses above CloudBottom, concat("Price Down @ $", close), Alert.BAR, Sound.Bell);

plot UpSignal = if (Tenkan > Kijun and close > CloudTop and SpanA[-kijun_period] > SpanB[-kijun_period] and Chikou[kijun_period] crosses above CloudTop[kijun_period])
OR (Tenkan > Kijun and Chikou[kijun_period] > CloudTop[kijun_period] and SpanA[-kijun_period] > SpanB[-kijun_period] and close crosses above CloudTop)
OR (close > CloudTop and Chikou[kijun_period] > CloudTop[kijun_period] and SpanA[-kijun_period] > SpanB[-kijun_period] and Tenkan crosses above Kijun)
OR (Tenkan > Kijun and close > CloudTop and Chikou[kijun_period] > CloudTop[kijun_period] and SpanA[-kijun_period] crosses above SpanB[-kijun_period])
then close else Double.Nan;

plot DownSignal = if (Tenkan < Kijun and close < CloudBottom and SpanA[-kijun_period] < SpanB[-kijun_period] and Chikou[kijun_period] crosses below CloudBottom[kijun_period])
OR (Tenkan < Kijun and Chikou[kijun_period] < CloudBottom[kijun_period] and SpanA[-kijun_period] < SpanB[-kijun_period] and close crosses below CloudBottom)
OR (close < CloudBottom and Chikou[kijun_period] < CloudBottom[kijun_period] and SpanA[-kijun_period] < SpanB[-kijun_period] and Tenkan crosses below Kijun)
OR (Tenkan < Kijun and close < CloudBottom and Chikou[kijun_period] < CloudBottom[kijun_period] and SpanA[-kijun_period] crosses below SpanB[-kijun_period])
then close else Double.Nan;


UpSignal.SetDefaultColor(Color.WHITE);
UpSignal.SetLineWeight(5);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);

AddChartBubble(showBubbles and UpSignal, close, if UpSignal then "SL: " + CloudBottom + ", T: " + (close + ((close - CloudBottom) * stopLossToTargetRatio)) else "N/A", if UpSignal then Color.LIME else Color.CURRENT);

DownSignal.SetDefaultColor(Color.WHITE);
DownSignal.SetLineWeight(5);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

AddChartBubble(showBubbles and DownSignal, close, if DownSignal then "SL: " + CloudTop + ", T: " + (close - ((CloudTop - close) * stopLossToTargetRatio)) else  "N/A", if DownSignal then Color.ORANGE else Color.CURRENT);
 
Hello everyone, I have modified the Ichimoku cloud to provide long and short entry signals based on the YouTube video
. I back tested few and seems to be working, there are some instances where it provides false signals, I will look into eliminating them. If anyone wants to check it out, here is the code


Code:
# Ichimoku Long and Short entry signals based on Youtube video https://www.youtube.com/watch?v=KE_SAzserLE
# By arv06

# For Long Entry - Tenkan should be above Kijun, Chikou should be above the cloud, price should be above the cloud and cloud in front of 26 candles should be green (bullish)

# For Short Entry - Tenkan should be below Kijun, Chikou should be below the cloud, price should be below the cloud and cloud in front of 26 candles should be red (bearish)

input tenkan_period = 9;
input kijun_period = 26;
input showLabels = yes;
input showAlerts = no;
input showBubbles = yes;
input stopLossToTargetRatio=2;

plot Tenkan = (Highest(high, tenkan_period) + Lowest(low, tenkan_period)) / 2;
plot Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
plot SpanA = (Tenkan[kijun_period] + Kijun[kijun_period]) / 2;
plot SpanB = (Highest(high[kijun_period], 2 * kijun_period) + Lowest(low[kijun_period], 2 * kijun_period)) / 2;
plot Chikou = close[-kijun_period];

Tenkan.SetDefaultColor(Color.GREEN);
Tenkan.SetLineWeight(2);

Kijun.SetDefaultColor(Color.RED);
Kijun.SetLineWeight(2);

SpanA.SetDefaultColor(Color.WHITE);
SpanB.SetDefaultColor(Color.YELLOW);

Chikou.SetDefaultColor(Color.MAGENTA);
Chikou.SetLineWeight(2);

DefineGlobalColor("Bullish", Color.DARK_GREEN);
DefineGlobalColor("Bearish", Color.RED);
AddCloud(SpanA, SpanB, globalColor("Bullish"), globalColor("Bearish"));

def CloudTop = if SpanA > SpanB then SpanA else SpanB;
def CloudBottom = if SpanA > SpanB then SpanB else SpanA;

AddLabel(showLabels, "Price", if close > CloudTop then Color.GREEN else if close==CloudTop then Color.LIGHT_GRAY else Color.RED);
Alert(showAlerts && close crosses above CloudTop, concat("Price Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && close crosses below CloudBottom, concat("Price Down @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Conversion", if Tenkan > Kijun then Color.GREEN else if Tenkan==Kijun then Color.LIGHT_GRAY else Color.RED);
Alert(showAlerts && Tenkan crosses above Kijun, concat("Conversion Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && Tenkan crosses below Kijun, concat("Conversion Down @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Chikou", if Chikou[kijun_period] > CloudTop[kijun_period] then Color.GREEN else if Chikou[kijun_period] > CloudTop[kijun_period] then Color.RED else Color.LIGHT_GRAY);
Alert(showAlerts && Chikou[kijun_period] crosses above CloudTop[kijun_period], concat("Chikou Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && Chikou[kijun_period] crosses below CloudTop[kijun_period], concat("Chikou Down @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Cloud", if SpanA[-kijun_period] > SpanB[-kijun_period] then Color.GREEN else if SpanA[-kijun_period]==SpanB[-kijun_period] then Color.LIGHT_GRAY else Color.RED);
Alert(showAlerts && SpanA[-kijun_period] crosses above SpanB[-kijun_period], concat("Bullish Cloud @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && SpanA[-kijun_period] crosses below SpanB[-kijun_period], concat("Bearish Cloud @ $", close), Alert.BAR, Sound.Bell);

AddLabel(showLabels, "Trade : " + if close > CloudTop then "Long" else if close < CloudBottom then "Short" else "N/A", if close > CloudTop then Color.GREEN else if close < CloudBottom then Color.RED else Color.LIGHT_GRAY);
Alert(showAlerts && close crosses above CloudTop, concat("Price Up @ $", close), Alert.BAR, Sound.Bell);
Alert(showAlerts && close crosses above CloudBottom, concat("Price Down @ $", close), Alert.BAR, Sound.Bell);

plot UpSignal = if (Tenkan > Kijun and close > CloudTop and SpanA[-kijun_period] > SpanB[-kijun_period] and Chikou[kijun_period] crosses above CloudTop[kijun_period])
OR (Tenkan > Kijun and Chikou[kijun_period] > CloudTop[kijun_period] and SpanA[-kijun_period] > SpanB[-kijun_period] and close crosses above CloudTop)
OR (close > CloudTop and Chikou[kijun_period] > CloudTop[kijun_period] and SpanA[-kijun_period] > SpanB[-kijun_period] and Tenkan crosses above Kijun)
OR (Tenkan > Kijun and close > CloudTop and Chikou[kijun_period] > CloudTop[kijun_period] and SpanA[-kijun_period] crosses above SpanB[-kijun_period])
then close else Double.Nan;

plot DownSignal = if (Tenkan < Kijun and close < CloudBottom and SpanA[-kijun_period] < SpanB[-kijun_period] and Chikou[kijun_period] crosses below CloudBottom[kijun_period])
OR (Tenkan < Kijun and Chikou[kijun_period] < CloudBottom[kijun_period] and SpanA[-kijun_period] < SpanB[-kijun_period] and close crosses below CloudBottom)
OR (close < CloudBottom and Chikou[kijun_period] < CloudBottom[kijun_period] and SpanA[-kijun_period] < SpanB[-kijun_period] and Tenkan crosses below Kijun)
OR (Tenkan < Kijun and close < CloudBottom and Chikou[kijun_period] < CloudBottom[kijun_period] and SpanA[-kijun_period] crosses below SpanB[-kijun_period])
then close else Double.Nan;


UpSignal.SetDefaultColor(Color.WHITE);
UpSignal.SetLineWeight(5);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);

AddChartBubble(showBubbles and UpSignal, close, if UpSignal then "SL: " + CloudBottom + ", T: " + (close + ((close - CloudBottom) * stopLossToTargetRatio)) else "N/A", if UpSignal then Color.LIME else Color.CURRENT);

DownSignal.SetDefaultColor(Color.WHITE);
DownSignal.SetLineWeight(5);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

AddChartBubble(showBubbles and DownSignal, close, if DownSignal then "SL: " + CloudTop + ", T: " + (close - ((CloudTop - close) * stopLossToTargetRatio)) else  "N/A", if DownSignal then Color.ORANGE else Color.CURRENT);
Thank you!

Try TOS indicator "HeikinAshiDiff" this one is good also.
 
Last edited:
I tried to make a scan for price above cloud and lagging line breaking cloud also, but not seeing results.
what is wrong with it?

close from 1 bars ago crosses Ichimoku()."Span A" and close from 1 bars ago crosses Ichimoku()."Span B" and Ichimoku()."Chikou" from 1 bars ago crosses above Ichimoku()."Span A" and Ichimoku()."Chikou" from 1 bars ago crosses above Ichimoku()."Span B"
 
@pegasis yes, scanners exists. But from reading through the thread, Ichimoku scanner scripts have been problematic for quite a while.

You can certainly try the shared links and see if you have different results than the posters in this thread.
You can try TOS support to find out why Ichimoku scanners are a problem.
 
Last edited:
Anyone able to figure out how to create a scanner to scan the symbols that cross the cross. I have been trying with SPA A and SPAN B of the scripts provided in this forum , but could not not able to get desired results. Thanks.
 
Dear everyone,
How do I write the scan when the Lagging span is crossing above or below the cloud? I'm trying to check in both Thinkorswim or Tradingview.
Can you pls. help with this requirement? Tried to refer the Ben's original post , couldn't get it.
 
If I copy the ichimoku script and make a new script, it doesn't automatically expand the chart to the right.
I know I can go on settings and change that but is there any thing to put in the script to have it done automatically

Thanks
 
If I copy the ichimoku script and make a new script, it doesn't automatically expand the chart to the right.
I know I can go on settings and change that but is there any thing to put in the script to have it done automatically

Thanks
No, there isn't :(
 

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
353 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