Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Add Horizontal line to stock chart

Posted on 2011-02-25
2
Medium Priority
?
1,299 Views
Last Modified: 2012-05-11
Hi,

I am using the the stock chart and I would like there to be a horizontal line across the chart with a y-axis of the opening price. In the end I want this to be in VBA but I think if someone can show how to do this manually I should be able to put it in loop of data that will produce many charts with a horizontal line starting at the day opening.

I have tried to add a new series to the chart but I'm using the Candle stick stock chart and the new series comes out as a vertical not horizontal line. I read about using a secondary horizontal axis but all the tutorials I find are in Excel 2003 and they donlt line up well with Excel 2007.

Any thoughts on how this is done?

I found this link on charts with horizontal lines but again they are in 2003 and I'm using a candle stick stock chart not a scatter chart.
http://www.tushar-mehta.com/excel/charts/straight_lines/

Thanks,
waffe
0
Comment
Question by:waffe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 42

Accepted Solution

by:
dlmille earned 1200 total points
ID: 34985065
Ok - I've never had to do this with a stock chart, but have had this type of problem, before.  for stock charts, you might look at the below utility, otherwise, I propose a "quick fix"

Utility:
For a price, there are utilities that may help : http://peltiertech.com/Excel/Charts/StockChartPlus.html

Quick Fix:
Apparently one can't combine a secondary axis line with a stock chart, so a utility like the above may prove useful ($$).  However, in a pinch, when I've had to do this, I create two charts, both with NO fill in the plot area, and I overlay one over the other, with the exact same scale settings.

See attached demonstration.  You'll want to have your VBA set the chart min/max to be the same on both charts.  I've done this quite a bit with other combinations I had to do but not stock charts...

Good luck!

Dave
sample-horiz-line-with-stock-cha.xlsx
0
 

Author Comment

by:waffe
ID: 34985196
Thanks, that will work perfectly!

I found that I could move the y-axis to the start of each opening but your concept will allow for more control over how the data is viewed.


0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question