Registered User Joined: 1/14/2006 Posts: 436
|
Bruce
When I use the following code, I get either a 0 or a 5 result for the Plot Variable PRLCount. I am looking for a result between 0 and 5. Do you know what I am doing wrong? Thanks... Dan
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.1 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:PRLCount
'|*** Example: plot = price.close - price.close(1)
'|******************************************************************
Dim PRLCount As Integer = 0
Static PeriodDef(6) As Integer
If isFirstBar Then
PeriodDef(1) = 3
PeriodDef(2) = 5
PeriodDef(3) = 8
PeriodDef(4) = 10
PeriodDef(5) = 12
PeriodDef(6) = 15
End If
For i As Integer = 1 To 5
If price.close >= Price.XAVG(PeriodDef(1)) Then
PRLCount += 1
End If
Next
Plot = PRLCount
|
Registered User Joined: 1/14/2006 Posts: 436
|
Bruce
Never mind. I found my error.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I am happy to read you were able to figure it out on your own.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Administration
Joined: 9/18/2004 Posts: 3,522
|
.
Ken Gilb (Kuf) Chief Software Engineer - Worden Brothers Inc. Try/Catch - My RealCode Blog
|