Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/21/2004 Posts: 84
|
I am trying to convert a RealCode indicator from SF4 to SF5; I am missing some process tho.
The indicator plots the "dip" (recent low) of the upper Keltner Band.
In SF4, I plotted the Keltner Band, made a 1moving average of it, then clicked and dragged it to the RealCode (already plotted) shown below:
'# MA = indicator.MovingAverage.3
Static Dip As Single
If isFirstBar Then
Dip = Single.NaN
Else If MA.Value > MA.Value(1) AndAlso _
MA.Value(1) < MA.Value(2) Then
Dip = MA.Value(1)
End If
Plot = Dip
This worked great in SF4, but not SF5. I am thinking that the "# MA = indicator.MovingAverage.3" statement is the problem. It appears to reference another MA that I have plotted.
Any ideas to try would be appreciated. Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In StockFinder 5, you no longer need to do the 1-Period Moving Average trick. You can just Drag and Drop the Keltner Channels into the RealCode Editor (which will automatically create the '# KCTop and '# KCBottom lines):
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Keltner Dip
'|******************************************************************
'# KCTop = chart.KeltnerChannels.0
'# KCBottom = chart.KeltnerChannels.1
Static Dip As Single
If isFirstBar Then
Dip = Single.NaN
Else If KCTop.Value > KCTop.Value(1) AndAlso _
KCTop.Value(1) < KCTop.Value(2) Then
Dip = KCTop.Value(1)
End If
Plot = Dip
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/21/2004 Posts: 84
|
Thanks Bruce !
I guess I'm too set in the old version work arounds, since this method is more straight forward & logical. :)
This worked well, but when I dragged the plotted indicator into the price chart, it plotted the indicator with a different price scale. Do I use the "Edit Scale" function in "Edit" to get the indicator scale to sync with the Price scale ? Please advise. Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Right-click on the Indicator and select Scaling | Scale With | Price.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/21/2004 Posts: 84
|
Super ! Thanks Bruce. it's look'in great now. Take Care.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |