Ichimoku Cloud LONG and SHORT indicators

This simple script uses 4 rules from Ichimoku Cloud indicator to marks position entry points.

The idea is that by entering a long position just when these 4 criteria are met, you can capture a 2-3% plus move within the next few days:
1. The conversion line is above the base line
2. The price is above the clouds
3. The lagging span is above the clouds
4. The rightmost cloud is green

The same 4 criteria but inverted will indicate a short entry.

In order to avoid 'stale' entries which can lead to chasing, we want the price and conversion line crossovers to be recent, within the past few days. Ideally we want to enter before close on the day the entry signal is given so that we can capture any potential gap up (or down if short). Often the price will make a nice move the next day or day after. If any of the criteria become invalidated, or if after 4-5 days there hasn't been significant movement, then it was a false alarm.

This script will show the basic Ichimoku Cloud indicators, plus labels for bearish and bullish price and conversion line crossovers as well as LONG and SHOT indicators to show when the entry criteria have been met.
Release Notes: This update makes the indicators respect any changes in the displacement value in the Inputs.
Remove from Favorite Scripts Add to Favorite Scripts


Nice one Thank you !!
Hi, thanks for this great script , wondering where you are checking this point " 3. The lagging span is above the clouds" . How i can convert this into strategy ? I would like to conversion line crossover baseline and lagging span is higher than current close price, conversion line,base line and the cloud . Could you pls help me writing on this .
ragnarok628 Dream2025
@Dream2025, sorry, this site keeps eating my replies... not sure whats up, trying one more time:

last phrase of line 66 is the lagging span over cloud check; lagging span price is same as close price but timeshifted back 26 periods, and the leadingLines that define the cloud are timeshifted ahead 26 periods. So comparing current close to cloud from 52 periods ago is comparing the lagging span to the cloud at the tip of the lagging span.

To make a strategy, just modify longCondition and shortCondition to whatever you want your entry criteria to be, then drop something like this at the bottom:

if (longCondition)
strategy.entry("long", strategy.long)
if (shortCondition)
strategy.entry("short", strategy.short)

this will keep you long until it signals short, and vice versa so unless that's what you want, you'll also need to set strategy.exit() for "long" and "short".

hope that helps!
Dream2025 ragnarok628
@ragnarok628, Thanks for the quick reply , i will try to setup the strategy condtion
Thank You !
Great script thank you @ragnarok628 much appreciated. I may have a play with code as struggling to read labels :)
IamDobby IamDobby
@ragnarok628 I have seen some really good past back test results with this.
I was just wondering is it possible to have the long and short alert when all criteria is met as that is the most important
+1 Reply
ragnarok628 IamDobby
@IamDobby, If I understand what you're asking, you want the long/short to trigger just on having the 4 conditions met currently, disregarding how recently that came to be? That's easily doable but it would turn this into more of a "go/no go" indicator than something that identifies good entries. Currently it's picky about labeling long and short entries in that it wants the conversion crossover and cloudbreak to have happened recently (while also respecting the other two conditions but not being concerned with recency for those); this avoids having it signal in situations such as in the midst of a long bullish run, where the price action has been over the cloud and the cloud has been green for a long time, but you get a brief conversion/base crossunder and then crossover. I think that should arguably be more of an exit signal as the run might be out of gas soon, and in either case that wouldn't fit the strategy i'm going for. The strategy I'm using this for is about catching the pop that I expect to happen when the price breaking cloud and conversion/baseline crossover happen close together in time.

all that said though, if ppl would find it useful to have a version of this indicator that just throws up 'bullish', 'bearish', or 'neutral' on the chart, it's simple enough that i wouldn't mind cranking that out real quick.
Killakie ragnarok628
@ragnarok628, sorry, im new. but this will alert me right?
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out