Registered User Joined: 10/7/2004 Posts: 26
|
Is it possible, and if so can you please show me the correct code, that would enable me to plot:
An indicator that would plot as a histogram on an intra day chart
The percent of stocks in the NASD 100 that are higher than their daily close of the prior day
thank you
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I would create the following RealCode Rule:
Static PrevClose As Single
Static Trigger As Boolean
If isFirstBar Then
PrevClose = Single.NaN
Trigger = False
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
PrevClose = Price.Last(1)
Trigger = True
End If
If Trigger = True Then
If Price.Last > PrevClose Then
Pass
End If
Else
SetIndexInvalid
End If
- Then right-click on the Rule and select Create Custom Index.
- Select Nasdaq 100 Component Stocks | Next.
- Percentage Passing | Next.
- Adjust Calculation Settings as desired and select Finish.
- Left-click on the Custom Index to bring up the Main tab of the Edit window.
- Change the Plot Style to Bar and select OK.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|