Solved

Add Horizontal line to stock chart

Posted on 2011-02-25
2
1,218 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 300 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
NEED LOOK FOR NUM 23 29
Excel -  lookup two values and return a value 3 30
Permutacion of 2 numbers COUNT 8 21
Problem to macro 5 22
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

751 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