thinkScript Price Level Drawn on Chart

vince92615

New member
How to make this following simple script?
  • past 10 days daily open/close price level ( Including daily highest and lowest ) So total 4 price lines for each day
I am having little bit hard time to keep drawing those price levels on all my watchlist and deleted the price level that more than 10 days. I will there is a simply study be able to help me
 
Here
Code:
input aggregationPeriod = AggregationPeriod.DAY;
input length = 1;
input displace = -1;
input showOnlyLast10Period = yes;

plot DailyHigh;
plot DailyLow;
plot DailyOpen;
plot DailyClose;
if showOnlyLast10Period and !IsNaN(close(period = aggregationPeriod)[-10]) {
    DailyHigh = Double.NaN;
    DailyLow = Double.NaN;
    DailyOpen = Double.NaN;
    DailyClose = Double.NaN;
} else {
    DailyHigh = Highest(high(period = aggregationPeriod)[-displace], length);
    DailyLow = Lowest(low(period = aggregationPeriod)[-displace], length);
    DailyOpen = Highest(Open(period = aggregationPeriod)[-displace], length);
    DailyClose = Lowest(Close(period = aggregationPeriod)[-displace], length);
}

DailyHigh.SetDefaultColor(GetColor(4));
DailyHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
DailyLow.SetDefaultColor(GetColor(4));
DailyLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
DailyClose.SetDefaultColor(GetColor(4));
DailyClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
DailyOpen.SetDefaultColor(GetColor(4));
DailyOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
 
@YungTraderFromMontana Thank you so much. Here is something a little bit different showed on my chart

-Price lines should be extended all the way to the right. (so should be total 40 price lines all the time to the right)
daily open, close, daily high, low * 10

-delete the 4 price line (daily open/close, daily high/low) from day 1 starting on day 11. so always keep the nearest 10-days prices line all time


So it there anyway you can help me update this? I would really appreciate it
 
@vince92615 Only the most current lines can be extended all the way to the right. In this case, there should only be 4.

Edit: Since this is being plotted on a day to day basis, they won't be extended all the way. The lines will stop before the next trading period.
 
@vince92615 Only the most current lines can be extended all the way to the right. In this case, there should only be 4.

Edit: Since this is being plotted on a day to day basis, they won't be extended all the way. The lines will stop before the next trading period.

but is it possible at least show 10 days ?
when i plug in this study and, most the price line only show for 1 day when i open 6mo/ 1d timeframe
 
You know when you manually click the price line drawing on TOS, click the price point and it will automatically have price line drawing all the way to the right with the price. Basically I need something exactly like that instead manually drawing on each ticker and deleting the old one. So When I start my today trading, it will show past 10 days open, close, high and low level.

Yellow price line was by this study. But I was hoping something like the price level I manually did at the bottom of the pic. So while opening the different timeframe I was able to see past couples day open/close and high low price level

zlTZtcl.png
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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