DailyLines for Swing Trades in ThinkorSwim


Active member

I am not a coder but through cobbling together a basic indicator I have used at least 30 years and with the help of #Nube, #Korygill #BenTen and #JimmyMack I have what I need. Nothing fancy here. The code is below. Use if it is useful. As a swing trader since 1987, support and resistance lines has been my go to. I have included the picture of a chart with the indicator setup.



input aggregationPeriod = AggregationPeriod.DAY;
input showOnlyLastPeriod = yes;

plot DailyOpen = open(period = aggregationPeriod);


plot ystdClose = close(period = aggregationPeriod)[1];


plot DailyHigh = high(period = aggregationPeriod);


plot ystdHigh = high(period = aggregationPeriod)[1];


plot DailyLow = low(period = aggregationPeriod);


plot ystdLow = low(period = aggregationPeriod)[1];


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

Thanks....here is another one that is on my 1 minute trading chart. It displays 5 higher time frame moving averages. This one is also extremely useful. Below are 2 images of trading that took place today in one stock. This shows exactly how useful this indicator was. Again, the code is simple and cobbled together from another indicator or 2. The code is below the 2 images. With all the things you can do with Thinkscript, often the old standbys are the best. The EMAs used are 10,20,50,100,200. These are watched, can become targets as you will see in the 2 charts below, and will become areas of intense trading when reached.



# MTF Moving Average
input Period = aggregationPeriod.DAY;
input AvgType = averageType.EXPONENTIAL;
input L1 = 10;
input L2 = 20;
input L3 = 50;
input L4 = 100;
input L5 = 200;

plot AVG1 = MovingAverage(AvgType, close(period = Period), L1);
plot AVG2 = MovingAverage(AvgType, close(period = Period), L2);
plot AVG3 = MovingAverage(AvgType, close(period = Period), L3);
AVG3.SetDefaultColor(CreateColor(255, 153, 0));
plot AVG4 = MovingAverage(AvgType, close(period = Period), L4);
AVG4.SetDefaultColor(CreateColor(255, 102, 0));
plot AVG5 = MovingAverage(AvgType, close(period = Period), L5);
AVG4.SetDefaultColor(CreateColor(255, 51, 0));

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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