Supertrend Indicator by Mobius for ThinkorSwim

can you share a link to this scanner?
shared scan link: Click here for --> Easiest way to load shared links

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

Its working great.. U always rocking...

"Paris: Here's SuperTrend MTF for those interested, from my archives - complete with notes posted at the time the study was released"

# SuperTrend Multiple Time Frames
# Mobius
# V03.01.2016

# I pulled this study down from MyTrade for a reason. It wasn't
# plotting correctly with the multiple aggregations. And like
# all studies with secondary aggregations it tends to replot the
# higher ones. I decided to think about it some more and this is
# where I am with the ST MTF study now.
# It's still squirrely and blinks a lot. Using declare Once_Per_Bar
# does some bad things to it. I was considering making intra
# aggregation higher time frames. A pain to do but it gives more
# control over how it plots.
# Row 6 is supposed to be the output for all aggregations and the
# signal line. After hours when data isn't moving it's steady and
# has good signals. But since it's after hours, totally useless
# for any intraday trading.

declare lower;

input agg1 = AggregationPeriod.Five_Min;
input agg2 = AggregationPeriod.Ten_Min;
input agg3 = AggregationPeriod.Fifteen_Min;
input agg4 = AggregationPeriod.Thirty_Min;
input agg5 = AggregationPeriod.Hour;
input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;

script ST{
input agg = AggregationPeriod.Five_Min;
input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;
def Fh = FundamentalType.High;
def Fl = FundamentalType.Low;
def Fc = FundamentalType.Close;
def Fhl2 = FundamentalType.HL2;
def h = Fundamental(Fh, period = agg);
def l = Fundamental(Fl, period = agg);
def c = Fundamental(Fc, period = agg);
def hl = Fundamental(Fhl2, period = agg);
def ATR = MovingAverage(AvgType, TrueRange(h, c, l), nATR);
def UP = hl + (AtrMult * ATR);
def DN = hl + (-AtrMult * ATR);
def S = if c < S[1]
        then Round(UP / tickSize(), 0) * tickSize()
        else Round(DN / tickSize(), 0) * tickSize();
plot ST = if c > S then 1 else 0;
def cl = close;
def x = isNaN(cl[2]) and !isNaN(cl[3]);
def FirstAgg = ST(agg = agg1, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FirstAggPlot = if isNaN(cl)
                    then double.nan
                    else 1;
FirstAggPlot.AssignValueColor(if FirstAgg == 1
AddChartBubble(x, 1, (agg1/1000/60) + " min", color.white, yes);
def SecondAgg = ST(agg = agg2, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot SecondAggPlot = if isNaN(cl)
                     then double.nan
                     else 2;
SecondAggPlot.AssignValueColor(if SecondAgg == 1
AddChartBubble(x, 2, (agg2/1000/60) + " min", color.white, yes);
def ThirdAgg = ST(agg = agg3, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot ThirdAggPlot = if isNaN(cl)
                    then double.nan
                    else 3;
ThirdAggPlot.AssignValueColor(if ThirdAgg == 1
AddChartBubble(x, 3, (agg3/1000/60) + " min", color.white, yes);
def FourthAgg = ST(agg = agg4, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FourthAggPlot = if isNaN(cl)
                     then double.nan
                     else 4;
FourthAggPlot.AssignValueColor(if FourthAgg == 1
AddChartBubble(x, 4, (agg4/1000/60) + " min", color.white, yes);
def FifthAgg = ST(agg = agg5, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FifthAggPlot = if isNaN(cl)
                    then double.nan
                    else 5;
FifthAggPlot.AssignValueColor(if FifthAgg == 1
AddChartBubble(x, 5, (agg5/1000/60)+ " min", color.white, yes);
plot Six = if isNaN(cl)
           then double.nan
           else 6;
Six.AssignValueColor(if FirstAgg and
                        SecondAgg and
                        ThirdAgg and
                        FourthAgg and
                     else if !FirstAgg and
                             !SecondAgg and
                             !ThirdAgg and
                             !FourthAgg and
# End Code ST MTF
1-4-1 so far, Mikey likes it

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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