Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 1
|
I would like to plot the number of stocks (or percent of stocks ) in an index such as russel 3000 that made a new 6mo high ten days ago and closed today higher than 10 days ago. I need help writing the Real Code
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Add the following RealCode Rule (or Condition in SF5):
If Price.Last(10) > Price.MaxHigh(125,11) AndAlso Price.Last > Price.Last(10) Then Pass
Then right-click on the Rule and select Create Custom Index (it's called a Market Indicator in SF5). You will be able to choose the desired WatchList and if you want Count Passing or Percent Passing when creating the Custom Index.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/24/2005 Posts: 48
|
This realcode indicator does not work for me in SF5. I right-clicked on the screen then selected add new indicator and entered the line of code. The errors are
1. Overload resolution failed because no accessible "Last" accepts this number of arguments
2. Name Pass is not declared
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
My apologies. You need to create a RealCode Rule (or Condition in SF5), not a RealCode Indicator. Please try it again.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/24/2005 Posts: 48
|
Thanks. I assume you mean a RealCode CONDITION in SF5?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Yes.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |