# Is it possible to plot a vertical line at daily highs and lows ?

#### TopDog

##### New member
VIP
Hi,
Can someone help me with coding ? I want to plot a vertical line with a label at daily highs and lows.. Intraday highs and lows for futures

Solution
what do you have so far?
here is 1 way
use 2nd agg to get the high and low of the day. then set a variable true when it matches a value from a candle.

Code:
``````def agg = AggregationPeriod.DAY;
def dayhigh = high(period = agg);
def daylow = low(period = agg);

def hi = ( dayhigh == high);
def lo = ( daylow == low);

https://tlc.thinkorswim.com/center/...tants/AggregationPeriod/AggregationPeriod-DAY

( i hope this works. i'm away and typing on my cell)

if you just want vertical lines on the current day, this could be added with AND to the time trigger of addverticalline.
# find if today is current day
istoday = GetDay() ==...
what do you have so far?
here is 1 way
use 2nd agg to get the high and low of the day. then set a variable true when it matches a value from a candle.

Code:
``````def agg = AggregationPeriod.DAY;
def dayhigh = high(period = agg);
def daylow = low(period = agg);

def hi = ( dayhigh == high);
def lo = ( daylow == low);

https://tlc.thinkorswim.com/center/...tants/AggregationPeriod/AggregationPeriod-DAY

( i hope this works. i'm away and typing on my cell)

if you just want vertical lines on the current day, this could be added with AND to the time trigger of addverticalline.
# find if today is current day
istoday = GetDay() == GetLastDay();

( hi and istoday)

what do you have so far?
here is 1 way
use 2nd agg to get the high and low of the day. then set a variable true when it matches a value from a candle.

Code:
``````def agg = AggregationPeriod.DAY;
def dayhigh = high(period = agg);
def daylow = low(period = agg);

def hi = ( dayhigh == high);
def lo = ( daylow == low);

https://tlc.thinkorswim.com/center/...tants/AggregationPeriod/AggregationPeriod-DAY

( i hope this works. i'm away and typing on my cell)

if you just want vertical lines on the current day, this could be added with AND to the time trigger of addverticalline.
# find if today is current day
istoday = GetDay() == GetLastDay();

( hi and istoday)
Thank You.. exactly what I need...

87k+ Posts
429 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?