Average time chart
Author: The_Viper
Creation Date: 1/31/2014 4:35 PM
profile picture

The_Viper

#1
How can I divide a stock (or index) into sections, overlay them, average them and then plot them on the same chart with a percent vertical scale? Say in t = total time period, n = number of sub-time periods.

For example; WMT, t=10yrs, n=10. So the plot would show year 1, year 2 … through year 10 (10 graphs so far). Next calculate the average of the 10 graphs and add it to the same chart drawn with a bold wider line. So there would now be 11 graphs on one chart with a percent vertical scale.

Thanks for you help
profile picture

The_Viper

#2
I looked at the "WealthScript Techniques | Relative Performance Chart" as you suggested in an earlier post. Great suggestion, as this file gives y axes in percent and allows multi charts to be displayed.

string[] benchMarkSymbols = {Bars.Symbol, "INTC", "AAPL", "SPY" };
Color[] colors = {Color.Green, Color.Blue, Color.Red, Color.Black }

I would like to select a group of stocks which I can chart without “hard coding” each stock symbol into the file. When I select a group of stocks, I do not see the pricepane, it only appears when I select one symbol and then the price pane displays all “hard coded” symbols. Can one do this?
profile picture

Eugene

#3
QUOTE:
When I select a group of stocks, I do not see the pricepane, it only appears when I select one symbol and then the price pane displays all “hard coded” symbols.

When you select a group of stocks, this is Multi-Symbol (portfolio backtest) mode. The example strategy works in both MSB and SSB (single-symbol mode) if you click "Execute".

QUOTE:
I would like to select a group of stocks which I can chart without “hard coding” each stock symbol into the file.

Since you didn't specify how exactly Wealth-Lab should recognize the group of stocks, you could, for example, see "Another solution" in the same KB article you're referring to, or use Input for interactivity.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).