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.
|
![](/image.aspx?url=http%3a%2f%2fvideos.worden.com%2fforums%2favatars%2fbruceavatar.gif&width=100&height=100)
![](/images/ranks/WordenWing.gif) 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
|
![](/image.aspx?url=http%3a%2f%2ftcnet.tcnet.info%2fhermes2%2fimages%2finc%2fuser%2f103.jpg&width=100&height=100)
![](/images/ranks/WordenWing.gif) Administration
Joined: 9/18/2004 Posts: 3,522
|
.
Ken Gilb (Kuf) Chief Software Engineer - Worden Brothers Inc. Try/Catch - My RealCode Blog
|