Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

How to compare the % change of a stock to the % change of the market Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
shsouther
Posted : Wednesday, November 18, 2009 1:37:32 PM
Registered User
Joined: 11/13/2009
Posts: 23
I have been working at this in bits and pieces in the RealCode forum, but being new to StockFinder, my overall approach could be inefficient to what the platform is capable of.
What I am trying to accomplish is to look at the % change in price over a period of time for a stock and compare it to the % change in price of the market (NYSE) for the same period.
What I have done is to add the “Price History NYSE” to my chart, and an indicator “%Delta 5 Day” that I created.
“%Delta 5 Day” is simply – “plot = (price.Close(0) - price.Close(5)) / price.Close(0) * 100”. It correctly charts for the parent stock. I am having difficulty applying it to the NYSE price history as a child plot. Once I do I will need to take the difference between the two to show me how the stock is performing relative to the NYSE. Although I might need to create a separate indicator for each,  will want to look at other period in addition to the 5 Day period.
What is the recommended approach to what I am trying to accomplish?
Thanks.
Bruce_L
Posted : Wednesday, November 18, 2009 2:28:24 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
There are lots of ways to just about everything in StockFinder. I'm not sure I would necessarily recommend one particular approach over another in this case. One option would be to just add a Rate of Change (Percent) Indicator and a Rate of Change (Percent) of Indicator to your Price History NYSE as a Child Indicator and then Drag and Drop them onto each other and select Create Indicator | Difference.

Another option might be to Drag and Drop your Price History NYSE Indicator into the Code tab of the RealCode Editor to create something similar to the first line of the following RealCode Indicator:

'# PfS = indicator.PriceforSymbol
'# Period = UserInput.Integer = 5
If CurrentIndex >= Period Then
    Plot = 100 * (Price.Last / Price.Last(Period) - _
        PfS.Value / PfS.Value(Period))
Else
    Plot = Single.NaN
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
shsouther
Posted : Wednesday, November 18, 2009 3:25:20 PM
Registered User
Joined: 11/13/2009
Posts: 23
Thanks Bruce.  I am gaining on it.  I tried something similair to what you suggested  but I was getting error because I use "close" rather than "value".

Can I include more than one "plot" in the RealCode to create more plot in the indicatior?
Bruce_L
Posted : Wednesday, November 18, 2009 4:17:04 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
RealCode Indicators can currently only output one Line or Bar. The ability to output a Bar gives you the option of outputting up to four individual values however. For example, the following RealCode would duplicate a standard Price Bar:

OpenValue = Price.Open
HighValue = Price.High
LowValue = Price.Low
Plot = Price.Last

While you could display all of the Values using a single RealCode Indicator by using the OHLC Bar Plot Style, this will not produce multiple Line Plots on its own. You would need to extract these Values by using another Indicator (such as a RealCode Indicator with this Indicator Dragged and Dropped into it or a Block Diagram based Indicator with a Bar Open, Bar High or Bar Low Block).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.