# Plot Horizontal Lines Relative to Open

##### New member
I would like to plot two horizontal lines on a chart. Both lines are 0.2 percent above and below the day's open. Any help that you could provide would be greatly appreciated. I'm an old retired engineer trader that doesn't know much about ThinkScript. Thank you.

Solution
I would like to plot two horizontal lines on a chart. Both lines are 0.2 percent above and below the day's open. Any help that you could provide would be greatly appreciated. I'm an old retired engineer trader that doesn't know much about ThinkScript. Thank you.

this asks for a % number. then plots 2 lines, above and below the daily open price

Code:
``````#horz_per_lines

#ThinkScript to Plot Horizontal Lines Relative to Open

input line_per = 0.2;

def dayopen = open(period = aggregationperiod.day);
def top = dayopen + (line_per/100 * dayopen);
def bot = dayopen - (line_per/100 * dayopen);

plot zt = top;
plot zb = bot...``````
I would like to plot two horizontal lines on a chart. Both lines are 0.2 percent above and below the day's open. Any help that you could provide would be greatly appreciated. I'm an old retired engineer trader that doesn't know much about ThinkScript. Thank you.

this asks for a % number. then plots 2 lines, above and below the daily open price

Code:
``````#horz_per_lines

#ThinkScript to Plot Horizontal Lines Relative to Open

input line_per = 0.2;

def dayopen = open(period = aggregationperiod.day);
def top = dayopen + (line_per/100 * dayopen);
def bot = dayopen - (line_per/100 * dayopen);

plot zt = top;
plot zb = bot;
zt.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
zb.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
zt.SetDefaultColor(Color.light_gray);
zb.SetDefaultColor(Color.light_gray);
#``````

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