Registered User Joined: 2/1/2010 Posts: 7
|
Today is Wed, Sept 15, 2010.For some time I've tried to make use of this, but have yet to understand it.I would have hoped that it meant: (stock open ABC 5 days ago - stock close ABC today)/stock open ABC 5 days ago = XAnd the same for an Index, like S&P 500, = YThen take (X/Y) * 100 to get the comparison.Evidently this is not even close.Like right now, Wed. 9/15 2:30pm. I thought the free stock charts' 5 day Price Trend vs Market bar showing the bar half full would be they both stock ABC and the Indexes have moved the same percent. But, as an example, DSX at .07 has done much worse than the S%P 500 comparison I've drawn on the same chart, and RMBS at .04 has done much better.I haven't got a clue why that would be.I went to StockFinder and trying to add that indicator/column to my charts and all I get is a blank data column. (That's my 2nd question)If the built in indicators wont give me what I want (the first formula I referred to above) could I get it using real code and refer to an index in that code, like the S&P?Thank you,Janaka
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
All questions, comments and suggestions related to FreeStockCharts.com should be addressed to:
feedback@freestockcharts.com
The 5-Day Price Trend vs Market Criteria is updated once a week (on Saturday) and is available in TeleChart (all versions) and StockFinder Platinum (a datasheet containing the Criteria is available in StockFinder Gold). You will not be able to use it as a Column or Indicator in StockFinder Gold.
You may wish to review the 5 and 30 Day Price Trend vs. Market article from TeleChart's Online Help Files for a description of how the Criteria is calculated.
price trend vs. market
Price Trend vs Market
Definitions of all built in scanning and sorting criteria
QUOTE (janaka) (stock open ABC 5 days ago - stock close ABC today)/stock open ABC 5 days ago = XAnd the same for an Index, like S&P 500, = YThen take (X/Y) * 100
You will need to edit the Indicator at least once to get the comparison symbol to be correct.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:ROC Ratio to Symbol
'|******************************************************************
'# Symbol = UserInput.String = SP-500
'# Period = UserInput.Integer = 5
Static customSymbol As PriceScripting
If isFirstBar Then
customSymbol = PriceData(Symbol)
End If
If customSymbol.Last <> customSymbol.Open(Period) Then
Plot = 100 * (Price.Last / Price.Open(Period) - 1) / _
(customSymbol.Last / customSymbol.Open(Period) - 1)
Else
Plot = Single.NaN
End If
To be blunt, the above has undesirable characteristics as an Indicator as a result of the Rates of Change of both the Active Symbol and Comparison Symbol crossing through zero. Taking either the Ratios of the Ratio of the Finish to Start:
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:ROC Ratio to Symbol
'|******************************************************************
'# Symbol = UserInput.String = SP-500
'# Period = UserInput.Integer = 5
Static customSymbol As PriceScripting
If isFirstBar Then
customSymbol = PriceData(Symbol)
End If
Plot = 100 * (Price.Last / Price.Open(Period)) / _
(customSymbol.Last / customSymbol.Open(Period))
Or the difference between the Rates of Change would probably be better.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:ROC vs Symbol Difference
'|******************************************************************
'# Symbol = UserInput.String = SP-500
'# Period = UserInput.Integer = 5
Static customSymbol As PriceScripting
If isFirstBar Then
customSymbol = PriceData(Symbol)
End If
Plot = 100 * (Price.Last / Price.Open(Period) - _
customSymbol.Last / customSymbol.Open(Period))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|