Registered User Joined: 7/19/2010 Posts: 23
|
see page 42 of realcode reference. i can not use "price.bar.closevalue", i must use "price.bar.value"?
<WBIGuid("a34b6e6d-e94b-4fb9-bc1f-525e376edf8e"),FriendlyName("RealCodeIndicator"),BlockTemplateEmptyMethodOnly()> _
Public partial Class RealCodeIndicator
Inherits RealCodeIndicator_base
Sub New
MyBase.AutoLoop = False
End Sub
Public Overrides Function Plot() As System.Single
'****** how do i pick up close price from bar data in my class??
For i As Integer = 0 To price.count - 1
Dim xcls As Single = price.bar.value(i)
Dim openx As Single = price.bar.openvalue(i)
Dim highx As Single = price.bar.highvalue(i)
Dim lowx As Single = price.bar.lowvalue(i)
' Dim closex As Single = price.bar.closevalue(i)
addtoOutput(price.Bar.datevalue(i), xcls)
'MyBase.AddToOutput(price.bar.datevalue(i), _
'price.bar.OpenValue(i), price.bar.highValue(i), _
'price.bar.lowvalue(i), price.bar.value(i))
Next
|

 Administration
Joined: 9/18/2004 Posts: 3,522
|
Price.bar.value is the correct syntax.
Ken Gilb (Kuf) Chief Software Engineer - Worden Brothers Inc. Try/Catch - My RealCode Blog
|
Registered User Joined: 7/19/2010 Posts: 23
|
on your blog is the entry "importing market data with the marketdatareader class"
the entry i want to study?
|

 Administration
Joined: 9/18/2004 Posts: 3,522
|
That would be the entry to read if you want to import data.
Ken Gilb (Kuf) Chief Software Engineer - Worden Brothers Inc. Try/Catch - My RealCode Blog
|