Follow Line Indicator For ThinkOrSwim

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

I'm not sure where I obtained this code from. Input parameter BbPeriod is set to '6' in this case rather than'21'. According to my initial observations, this is producing signals that are more accurate than the original BB period length (i.e '21')
 
Just a general Thank You to the people who put this all set up together. I have to say it has been working overall quite well in the Nasdaq. I vary my time frames as I am still working which suites me best, but overall this is becoming a real go to. Those of us that are less technical really do appreciate those on this site with the incredible skills to create these in a way that is approachable. Cheers!
 
Great Info. I've got these indicators in TOS now and also the Follow Line Indicator. Thanks to you guys. I'm using it to scalp E-mini S&P Futures. (I would put a screen shot but I am new to forum and haven't figured out how to do that yet) I want to use these indicators on a 5 minute candlestick chart but can't get the settings right. It lines up on a 15 minute chart but not on the 5. Anyone got this setup on a 5 minute chart yet?
can you share the code for your setup

http://tos.mx/N05l77W
These are all the indicators you mention on a 5 minute chart. It seems to work well enough-if not can you please be specfic?
I downloaded this setup....is this all you use to scalp es minis....if so how are you determining your entries exits etc
 
can you share the code for your setup


I downloaded this setup....is this all you use to scalp es minis....if so how are you determining your entries exits etc
I find that using a Multi time frame set up can be useful to this as well. The example I am posting is for a 5/15 minute pairing for both Follow Line and the Hull 55. Learning from my last post, I have turned all the paint candle functionality off, the individual user can decide which indicator/time frame will do that if desired.

Review the MTF discussion in this link to be sure to use it correctly:

https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/

I like the upper chart as simple as possible, so I placed the higher time frame into the lower studies section. Easy to change if desired.

The BbPeriod is 21, which is the initial value provided. Some have used a setting of 6 instead. Again, that is best left up to the individual trader. Would love to hear others results with the two.

The video does a good job of describing how to use this in terms of entries and stop outs.

http://tos.mx/Gv5sbFI

I do sometimes use slightly lower time frames as well, but in my view the 1 minute can get too choppy.

Oh, and I trade the QQQ myself. I use some other tools as well but this is really becoming a go to for me personally.
 
Last edited:
Liking the look of this setup. I have been running with Confirmation Candles. However looking for a simpler setup that gives buy and sell signals right on chart to use along with some other indicators I use that should work really well.

What post has the final script that was moved to TOS from trading view.

Thanks
 
Liking the look of this setup. I have been running with Confirmation Candles. However looking for a simpler setup that gives buy and sell signals right on chart to use along with some other indicators I use that should work really well.

What post has the final script that was moved to TOS from trading view.

Thanks
There is no "final" script. There are several scripts of several flavors that posters have provided that fit their style of trading.
If your question is which scripts are most true to the video of the Tradingview indicators
It is this setup:
Shared Chart Link: http://tos.mx/N05l77W Click here for --> Easiest way to load shared links
This setup includes the FollowTheLine Indicator as well as its companions.
Be aware that both the Hull Suite and the Follow The Line want to paint the chart candles.
You have to chose which one that you want to use by following the directions found here:
https://usethinkscript.com/threads/follow-line-indicator-for-thinkorswim.9789/page-3#post-100424
 
do I wait for a bar close when I get all three signals in alinement or should I get in immediately on the trade, can anyone share their experiences with these signals and what time frames they use, greatly appreciated, thank you :)
 
Can someone add an alert to the Follow the Line indicator to ding whenever there is an arrow signal....please and thank you


# Follow Line Indicator
# Coverted to ToS from TV by bigboss. Original © Dreadblitz

input BbPeriod = 21;
input BbDeviations = 1;
input UseAtrFilter = yes;
input AtrPeriod = 5;
input HideArrows = no;

def BBUpper=SimpleMovingAvg(close,BBperiod)+stdev(close, BBperiod)*BBdeviations;
def BBLower=SimpleMovingAvg(close,BBperiod)-stdev(close, BBperiod)*BBdeviations;

def BBSignal = if close>BBUpper then 1 else if close<BBLower then -1 else 0;

def TrendLine =
if BBSignal == 1 and UseATRfilter == 1 then
max(low-atr(ATRperiod),TrendLine[1])
else if BBSignal == -1 and UseATRfilter == 1 then
min(high+atr(ATRperiod),TrendLine[1])
else if BBSignal == 0 and UseATRfilter == 1 then
TrendLine[1]
else if BBSignal == 1 and UseATRfilter == 0 then
max(low,TrendLine[1])
else if BBSignal == -1 and UseATRfilter == 0 then
min(high,TrendLine[1])
else if BBSignal == 0 and UseATRfilter == 0 then
TrendLine[1]
else TrendLine[1];

def iTrend = if TrendLine>TrendLine[1] then 1 else if TrendLine < TrendLine[1] then -1 else iTrend[1];

plot buy = if iTrend[1]==-1 and iTrend==1 and !HideArrows then TrendLine else Double.NaN;
buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
buy.SetDefaultColor(Color.GREEN);
buy.SetLineWeight(3);

plot sell = if iTrend[1]==1 and iTrend==-1 and !HideArrows then TrendLine else Double.NaN;
sell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
sell.SetDefaultColor(Color.RED);
sell.SetLineWeight(3);

plot tline = TrendLine;
tline.AssignValueColor(if iTrend > 0 then CreateColor(33,150,243) else CreateColor(255,82,82));
tline.SetLineWeight(2);
 
Can someone add an alert to the Follow the Line indicator to ding whenever there is an arrow signal....please and thank you


# Follow Line Indicator
# Coverted to ToS from TV by bigboss. Original © Dreadblitz

input BbPeriod = 21;
input BbDeviations = 1;
input UseAtrFilter = yes;
input AtrPeriod = 5;
input HideArrows = no;

def BBUpper=SimpleMovingAvg(close,BBperiod)+stdev(close, BBperiod)*BBdeviations;
def BBLower=SimpleMovingAvg(close,BBperiod)-stdev(close, BBperiod)*BBdeviations;

def BBSignal = if close>BBUpper then 1 else if close<BBLower then -1 else 0;

def TrendLine =
if BBSignal == 1 and UseATRfilter == 1 then
max(low-atr(ATRperiod),TrendLine[1])
else if BBSignal == -1 and UseATRfilter == 1 then
min(high+atr(ATRperiod),TrendLine[1])
else if BBSignal == 0 and UseATRfilter == 1 then
TrendLine[1]
else if BBSignal == 1 and UseATRfilter == 0 then
max(low,TrendLine[1])
else if BBSignal == -1 and UseATRfilter == 0 then
min(high,TrendLine[1])
else if BBSignal == 0 and UseATRfilter == 0 then
TrendLine[1]
else TrendLine[1];

def iTrend = if TrendLine>TrendLine[1] then 1 else if TrendLine < TrendLine[1] then -1 else iTrend[1];

plot buy = if iTrend[1]==-1 and iTrend==1 and !HideArrows then TrendLine else Double.NaN;
buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
buy.SetDefaultColor(Color.GREEN);
buy.SetLineWeight(3);

plot sell = if iTrend[1]==1 and iTrend==-1 and !HideArrows then TrendLine else Double.NaN;
sell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
sell.SetDefaultColor(Color.RED);
sell.SetLineWeight(3);

plot tline = TrendLine;
tline.AssignValueColor(if iTrend > 0 then CreateColor(33,150,243) else CreateColor(255,82,82));
tline.SetLineWeight(2);
https://usethinkscript.com/threads/follow-line-indicator-for-thinkorswim.9789/page-2#post-90045
 
What is the best setting for intra-day trading on the 2 or 5 min chart for the /ES

This indicator was created on Tradingview here:
https://www.tradingview.com/script/29iYBNku-Follow-Line-Indicator/
for trading bitcoin on the hourly chart

Other platforms have methodology for optimizing indicators for use on other timeframes and with other instruments but unfortunately, ToS does not.
1. You need to put the indicator on your chart many many times.
2. Change the colors of the plots so you can tell the difference between the many many versions.
3. Then it is relatively easy; through extrapolation and interpolation; to see which gets you closer to what you want your strategy to look like.

You need to be methodical in your testing of the inputs to determine which ones moving you closer to your goal.
 
Last edited:
I want to thank all our members who contributed to making this indicator. I have used this for scalping options in a 5-minute time frame and have had great success with it. No stragerdy is 100% win rate. With this strategy, you are way Green if your RR is 1:2. This is my absolute go-to when I scalp. I love the simplicity of the system. Once again, Thank you 🍻
 
Here is an MTF version
Code:
# Follow Line Indicator MTF
# Coverted to ToS from TV by bigboss. Original © Dreadblitz
input period        = AggregationPeriod.FIFTEEN_MIN;
input BbPeriod      = 21;
input BbDeviations  = 1;
input UseAtrFilter  = yes;
input AtrPeriod     = 5;
input HideArrows    = no;

def h = high(period=period);
def l = low(period=period);
def c = close(period=period);

def ATR = MovingAverage(AverageType.WILDERS, TrueRange(h, c, l), AtrPeriod);


def BBUpper=SimpleMovingAvg(c,BBperiod)+stdev(c, BBperiod)*BBdeviations;
def BBLower=SimpleMovingAvg(c,BBperiod)-stdev(c, BBperiod)*BBdeviations;

def BBSignal = if c>BBUpper then 1 else if c<BBLower then -1 else 0;

def TrendLine =
    if BBSignal == 1 and UseATRfilter == 1 then
        max(l-ATR,TrendLine[1])
    else if BBSignal == -1 and UseATRfilter == 1 then
        min(h+ATR,TrendLine[1])
    else if BBSignal == 0 and UseATRfilter == 1 then
        TrendLine[1]
    else if BBSignal == 1 and UseATRfilter == 0 then
        max(l,TrendLine[1])
    else if BBSignal == -1 and UseATRfilter == 0 then
        min(h,TrendLine[1])
    else if BBSignal == 0 and UseATRfilter == 0 then
        TrendLine[1]
    else TrendLine[1];

def iTrend = if TrendLine>TrendLine[1] then 1 else if TrendLine < TrendLine[1] then -1 else iTrend[1];
 
plot buy = if iTrend[1]==-1 and iTrend==1 and !HideArrows then TrendLine else Double.NaN;
buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
buy.SetDefaultColor(Color.GREEN);
buy.SetLineWeight(3);

plot sell = if iTrend[1]==1 and iTrend==-1 and !HideArrows then  TrendLine else Double.NaN;
sell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
sell.SetDefaultColor(Color.RED);
sell.SetLineWeight(3);

plot tline = TrendLine;
tline.AssignValueColor(if iTrend > 0 then CreateColor(33,150,243) else CreateColor(255,82,82));
tline.SetLineWeight(2);
Great indicator. How would we be able to scan with this?
 
Great indicator. How would we be able to scan with this?
The ToS app does not allow for the use of MTF scripts in the scan hacker.
When setting up a scan, the first criteria is the timeframe.
It then filters your conditions on that timeframe.
If it encounters other timeframes in the script, it will throw an error:
Secondary timeframes not allowed.
 
Last edited:

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
297 Online
Create Post

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