How to add a comparative index to a symbol chart?
Author: wphill
Creation Date: 10/13/2009 2:13 PM
profile picture

wphill

#1
A version of this is dropping MCO as a customer indicator onto the .spx chart,

but I would like to have the reverse...the option of dropping in any comparative index to line it up as an external symbol for visual examination. .spx would do.

I think that at one time someone coded this as a strategy...in wlab 4 version.
profile picture

Eugene

#2
Dropping an external symbol, or an indicator based on its data, that's unlikely. But you can easily code this with GetExternalSymbol(), there are dozens of examples:

External Symbol with Indicator
Plotting 2 symbols on the same chart
Create strategy using one instrument's price actio
Need an Alert created when DJI SPX & IXIC have all moved up or down by 1% during the trading day

...and so forth.
profile picture

wphill

#3
Thanks, I was able to adapt what I needed.
profile picture

micksonmatch

#4
Hi I am able to get 2 symbols each with their own pane on a chart. For some reason it always includes the current symbol my chart is pointing to so I actually have 3 symbols each with their own pane.

I am wanting to achieve having 2 symbols on one pane, which I have been able to achieve how do I get the symbols to scale according to pricing on their own Y-axis (left and right)?

Lastly is there code lurking out there that measures relative performance, so I can add say 5 symbols and they measure performance off a common base say 100?

Thanks
profile picture

micksonmatch

#5
I have found the relative performance code:
http://www2.wealth-lab.com/WL5WIKI/kbChartRelativePerformance.ashx
profile picture

Eugene

#6
QUOTE:
I am wanting to achieve having 2 symbols on one pane, which I have been able to achieve how do I get the symbols to scale according to pricing on their own Y-axis (left and right)?

The current symbol can't be removed from the chart but you can follow a workaround in this FAQ:

I want to chart an indicator, but without the stock price. Can I hide the PricePane?
profile picture

micksonmatch

#7
Thanks Eugene I had success with the hiding part. See image below.

QUOTE:
I am wanting to achieve having 2 symbols on one pane, which I have been able to achieve how do I get the symbols to scale according to pricing on their own Y-axis (left and right)?


I am still not sure about this how would I get assuming this chart wasnt representing % but rather price AAPL on say the left Y-axis and MSFT on the right Y-axis

profile picture

Eugene

#8
I don't think that multiple Y axes are possible.
profile picture

micksonmatch

#9
Is there another way to have 2 symbols in one pane but look proportional if say 1 is trading around $100 and the other $10.
profile picture

micksonmatch

#10
If it is of any assistance the code for the above chart is:

CODE:
Please log in to see this code.
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).