Detrended Price Oscillator (DPO) of SPX as timing signal?
Author: jjkottke
Creation Date: 6/1/2015 11:11 PM
profile picture

jjkottke

#1
Is there a method or an example of using an indicator, (such as DPO) on an external symbol (Such as SPX) ? Or...what would the code look like?

Thanks,
Jim K.
profile picture

Eugene

#2
An indicator accepting a DataSeries or a Bars object (that is, any indicator) can be applied to an external symbol. The idea is to pass the "handle" of the DataSeries/Bars object (DataSeries in case of DPO) to the indicator. There are numerous examples if you search the forum:

Technical Indicators on External Symbol's Pane
External Symbol with Indicator

For example, you defined DPO of the current Bars symbol (let's say Google) being charted as:

CODE:
Please log in to see this code.


And the DPO of Microsoft would be:

CODE:
Please log in to see this code.


Background:

* WealthScript Programming Guide: 1) Indicators > Indicators of Secondary Symbols; and 2) DataSeries > Accessing Secondary Symbols
profile picture

jjkottke

#3
Eugene:
Thanks for the info. It's just what I needed!

Jim K.
profile picture

Eugene

#4
Glad to have helped.
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).