I would like to write codes to display several charts on the same screen.
The charts would be for different periods of the same stock, or the same period of different stocks, or different periods of different stocks. Since my intention is to compare charts, I would like to have the Y-axis to be a percentage instead of value.
How do I do this?
Size:
Color:
1. CreatePane to plot your symbol comparisons
2. GetExternalSymbol for each symbol you're interested in
3. Calculate the DataSeries
4. Plot them in the pane created in #1
There's always a primary symbol and the scale of its axis can't be changed (except to make it bigger with SetPaneMinMax), so you have to do this in another pane.
Size:
Color:
Thank you, Cone, for your fast response.
My primitive understanding of "pane": it's a horizontal chart. I'm using a laptop, and most of laptop these days have wide screens, which means I will end up with a bunch of short-and-wide charts. This is not going to be easy for my eyes. Is there any way that I can draw 2 or 3 charts side by side with one another?
Size:
Color:
I forgot another question.
It seems that this "CreatePane" method can only allow me to display data series of the same time frame. Is there a way to specify different beginning date and ending date for each chart?
Size:
Color:
QUOTE:
Is there any way that I can draw 2 or 3 charts side by side with one another?
Not in the same chart window, but you can click Window > Tile Vertically
QUOTE:
Is there a way to specify different beginning date and ending date for each chart?
Click on the chart to put it in focus, and set the data range using the Data Loading (Data Range) Control atop the Data Panel. If any of these terms are "Greek" to you, then please see User Guide > Reference > Data Panel
Size:
Color:
Thanks.
These are "manual" methods for drawing charts side by side, and having a set beginning and ending date. I'm looking for an automated way to draw all these charts. Can they be done by "codes"? If yes, how?
Size:
Color:
Let's start over. You want to put some comparisons on the same chart with the same scaling. What are the symbols and how do you want to compare them? Be precise, because code is precise.
Size:
Color:
The codes should be able to display multiple charts on the same screen, not just one chart. One chart for one symbol and one period. The y-axis should be the percentage gain since the first open of the chart.
An example of daily charts:
INTC, AAPL, SPY for the last 4 weeks. These 3 charts should be side-by-side.
GLD , gdx , gdxj for the last 2 weeks. These 3 charts should be side-by-side.
Size:
Color:
Okay, when you say "multiple charts", your really mean "multiple plots" in the same chart pane. Just click on a symbol with 4 weeks of data.
CODE:
Please log in to see this code.
Size:
Color:
Found this thread to answer my question about "compare charts" and the code works fine as posted.
Two questions please;
When I add additional symbols to the compare chart I get the following error; "Runtime error, index was outside the bounds of the array"
Symbol data is fine and any combo of 3 tickers works. Am I doing something wrong or is this a limitation of the software?
2nd question; Are chart enhancements planned for future release that will upgrade this capability, like Fidelity active trader pro that has nice symbol compare capabilities?
Thanks, Bill
Size:
Color:
QUOTE:
Am I doing something wrong or is this a limitation of the software?
Certainly you're doing something wrong:
Errors | Strategy >
Index was out of rangeQUOTE:
Are chart enhancements planned for future release that will upgrade this capability,
None that I'm aware of. Wealth-Lab is primarily a systematic backtesting/trading platform, and a charting package in the second place. What's wrong with doing it via code?
Size:
Color:
Eugene, thanks! Figured it out, needed colors assigned to added symbols!
You asked, "What's wrong with doing it via code?" Nothing just the process a little more time consuming.
Is there a place where color options are listed (correct format/text) ?
Size:
Color:
You're welcome.
QUOTE:
Is there a place where color options are listed (correct format/text) ?
Yes, there are lists and color tables of .NET colors. (Don't forget about transparency effects with Color.FromArgb). Just google for something like ".NET Color table" - there's nothing Wealth-Lab specific, that's why you won't find it in User/WealthScript Guides.
Size:
Color:
Thanks Eugene!
I actually like the WL multi-symbol-compare charts once I've used them! A nice feature is that when you put the cursor on the symbol line it gives you the ticker name! This is nice since 50% of all men are somewhat colorblind.
Size:
Color: