Archived: Supertrend Indicator by Mobius for ThinkorSwim

Status
Not open for further replies.
@BTExpress I don't think you did it correctly. Supertrend shouldn't be equal to 1 as a condition. Modify that specific scan > switch over to the thinkScript editor and then paste the given scanner code.

GUlliZ4.png
 

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

@BenTen you are an awesome person. I love how you are here to support us become better traders. I was adding the scan code as a study then scan on the plot variable instead of adding the scan code itself in the scan condition. Thank you.
 
I use the scanner each trading day. The code is written to show new signals

#plot SuperTrendUP = if ST crosses below close then 1 else 0;

plot SuperTrendDN = if ST crosses above close then 1 else 0;

If you want to show active signals use the following;

plot SuperTrendUP = if ST < close then 1 else 0;

plot SuperTrendDN = if ST >close then 1 else 0;
I tried each of those 4 statements at a time but didn't get any result. It didn't work.
 
@quarinteen You added a scanner into your chart. That's why it's not displaying correctly. Locate the indicator on the first page of this thread.
 
@DMS Trader Take a look at the bottom of your script, you should see the following:

Code:
AddChartBubble(close crosses below ST, low[1], low[1], color.Dark_Gray);
AddChartBubble(close crosses above ST, high[1], high[1], color.Dark_Gray, no);
 
@BenTen I am new here and thanks for this awesome indicator, my question is, what is the best time frame using this indicator?(2, 5 min)
Is it best works with small cap or large cap?

Attached are my script and screenshot, please advise if I need to adjust some settings for best results.

Code:
# Mobius
# SuperTrend
# Chat Room Request
input AtrMult = 1.0;
input nATR = 4;
input AvgType = AverageType.HULL;
input PaintBars = yes;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), nATR);
def UP = HL2 + (AtrMult * ATR);
def DN = HL2 + (-AtrMult * ATR);
def ST = if close < ST[1] then UP else DN;
plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
AssignPriceColor(if PaintBars and close < ST

                 then Color.RED

                 else if PaintBars and close > ST

                      then Color.GREEN

                      else Color.CURRENT);

def bullish = close crosses below ST;
def bearish = close crosses above ST;

# Alerts
Alert(bullish, " ", Alert.Bar, Sound.Chimes);
Alert(bearish, " ", Alert.Bar, Sound.Bell);

# End Code SuperTrend

d9tfyn9.png


thanks!
Sam
 
@HMB13 Just like most indicators, this one was not designed for a particular timeframe or market cap. You would have to play around with it and see which one works best for you.
 
Just FYI, This indicator works great when paired with the Leledc Port indicator. I use it on the 3,5,8 minute charts and scalp.
 
Hi BenTen, noticed AtrMult = 1.0 in study and .70 in scan. Are you using .70 in scan to get alerts earlier than the study so you can watch the stock and other indicators before you get in?
 
@xad I'm no longer using this indicator to trade. The 1.0 and 0.7 are just the length for the AtrMult variable. You can try them both and see which one provides better signals.
 
@geebeeaye Look for this in the code:

Code:
AssignPriceColor(if PaintBars and close < ST

                 then Color.RED

                 else if PaintBars and close > ST

                      then Color.GREEN

                      else Color.CURRENT);

Uncomment or delete it from your indicator.
 
I have one question on which type of moving average to choose for best performance 9 Ideally ) ?? since it shows us a choice in dropdown for simple, exponential, HULL...etc.
 
Status
Not open for further replies.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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