Cloud Overlay Indicator v2 & v3 for ThinkOrSwim

Townsend

Townsend

Active member
VIP
I've been using Cloud Overlay v3 for a while. Works real good! Here's a 5 minute chart. Basically it's just a 2 moving averages drawn as a single cloud. What makes it so versatile is how you can use different moving averages for different situations. In this example I have 30 and 90 Weighted moving average for the long term signal. And a 20 and 60 Hull moving average for the short term signal. It's pretty simple, but effective, especially if you like moving averages. Easily switch between moving average types: Simply, Exponential, Weighted, Wilders, & Hull.

Originally I wrote this as a multi-time-frame indication, but turns out, I find this simplified version more useful. Especially since it works on tick and range charts. Where the multi-time frame version does not. I'll also include the code for the multi-time frame version below.



Code:
## Cloud Overlay v3, 3-2020, Paul Townsend
## works on tick and range charts.
input fastLength = 30;
input slowLength = 90;
input smooth = 4;
input averageType = AverageType.hull;

def price = hl2;

plot fastAvg = MovingAverage(averageType, price, fastLength);
plot slowAvg = MovingAverage(averageType, price, slowLength);
fastAvg.hide();
slowAvg.hide();
fastAvg.setlineWeight(3);
slowAvg.setlineWeight(3);

fastAvg.assignValueColor(color.white);
slowAvg.assignValueColor(color.orange);

addcloud(fastAvg,slowAvg,color.cyan,color.magenta);
addlabel(yes,fastLength + "/" + slowLength,color.white);


Below is the code for multi-time frame version which does NOT work on tick and range charts.
Code:
## Cloud Overlay v2, 2-2020, Paul Townsend
## multi-time frame version does NOT works on tick and range charts.

input usePeriod = aggregationperiod.five_MIN;
input fastLength = 30;
input slowLength = 90;
input smooth = 4;
input averageType = AverageType.hull;

def price = open(period = usePeriod);

plot fastAvg = MovingAverage(averageType, price, fastLength);
plot slowAvg = MovingAverage(averageType, price, slowLength);
fastAvg.hide();
slowAvg.hide();
fastAvg.setlineWeight(3);
slowAvg.setlineWeight(3);

fastAvg.assignValueColor(color.white);
slowAvg.assignValueColor(color.orange);

addcloud(fastAvg,slowAvg,color.cyan,color.magenta);
addlabel(yes,"OL=" + useperiod/60000,color.white);
 
Last edited:
Townsend

Townsend

Active member
VIP
Oh... In case you want to see what the multi-time frame version looks like. Here's a 3 minute chart with a 5 minute cloud overlay AND a 10 minute cloud overlay. In addition to setting the time-frame of the cloud, you can also adjust the length of both the short and long periods. See source code above.
 
technicallydreaming

technicallydreaming

Member
That's amazing. Multi time frame setups are tough for me to keep up with. This makes it easier to think about. Appreciate it.
 
Townsend

Townsend

Active member
VIP
This good for day trading?

Yes. Actually... once a trend channel starts, it's fairly easy to predict where the next top of bottom bounce will be. I like to use the Andrew's Pitchfork to drawing tool to see early trend channel lines. And... I've found, that tick and range charts are much more accurate in predicting the exact level of these bounces. So... I don't use the multi-time frame version because that one doesn't work with tick and range charts.
 
lrc11239

lrc11239

Member
VIP
This is a very simple and awesome tool!!! thanks!!
 
E

ext99k

Member
@Townsend Thanks for posting, looks great! Can you please explain how to interpret this, or at least, how you do... and when there might be a buy and sell signal? Possible to add orders to code for backtesting? Thank you!
 
Townsend

Townsend

Active member
VIP
@ext99k Basically I use the Weighted moving average to assess the trend. The Wilders moving average to assess the long term trend. AND the Hull moving average to give me a heads up as to when the immediate trend is about to change, as it always turns down first.

For best results, you will need to tweak the code yourself. In my current version, (which I'm not posting), I've gotten rid of the clouds completely as they only change color when two line cross, which is well after both have turned down. Instead I color the line itself cyan or magenta, depending on whether it's going up or down. This way, as soon as the lines turn down, the color changes and I see the trend change.

ALSO, as the various lines change color and cross, they form repetitive patterns. Pay attention to these as they tend to imply the quickness and or validity of the impending trend change.
 
P

pkcfc

New member
VIP
This is an amazing indicator, thanks @Townsend. Really complements well with the other indicators I'm using.
 

Similar threads

Top