Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Real Code problem for x.avg(14) Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
reevescn
Posted : Saturday, November 6, 2010 4:24:34 PM
Registered User
Joined: 1/26/2005
Posts: 6
I've tried to write and Indicator, which I can't get to work:

'#Period=userinput.Integer=14
Static X as Single
Static Y as SIngle
Dim Y1 as Single
Dim Yad As Single
Static Z as Single
Static Z1 as Single
If CurrentIndex>Period Then
X=(Price.High+Price.Low+Price.Close)/3
Y=X-X.AVG(period)
Y1=System.Math.Abs(Y)
Yad=Y1.Avg(period)
End If
If Yad>0 Then
Z=Y/Yad
Z1=(Z/3)*200
Else
Plot=Z1
End If

Error
"AVG" is not a member of Single.
I would appreciate your help correcting this code to run as a realcode indicator.
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.