Registered User Joined: 6/22/2008 Posts: 65
|
This relates to the renko charts you created.
If you could please have a look at http://forums.worden.com/Default.aspx?g=posts&t=43583
I tried changing the name of the price plot on the renko charts to "price history" but this doesn't work, the charts come out blank. Is there a way to modify the renko charts so they use the name "price history" for the price instead of renko?
Thank you.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Try replacing everything below the Inherits line in the Class tab of a new RealCode Indicator called Price History (you won't be able to use this name if there is an existing Indicator called Price History) with everything below the Inherits line in the Class tab of the desired Renko Indicator.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 6/22/2008 Posts: 65
|
Is this what you meant?
<WBIGuid("7dda550c-e04e-40d1-a374-4b6666b6e7ba"),FriendlyName("RealCodeIndicator"),BlockTemplateEmptyMethodOnly()> _
Public partial Class RealCodeIndicator
inherits RealCodeIndicator_base
Sub New
MyBase.New
AutoLoop = False
End Sub
Public Overrides function Plot() as System.Single
'# BrickSize = UserInput.Single = 1
Dim Ratio As Single = 1 + BrickSize / 100
Dim First As Boolean = True
Dim Top As Single = Price.Bar.Value(0)
Dim Bot As Single = Price.Bar.Value(0)
For i As Integer = 0 To InputCount - 1
If First Then
Top = System.Math.Max(Top, Price.Bar.Value(i))
Bot = System.Math.Min(Bot, Price.Bar.Value(i))
If Top / Bot >= Ratio Then
If Top = Price.Bar.Value(i) Then
Bot = Top / Ratio
AddToOutput(Price.Bar.DateValue(i), Bot, Top, Bot, Top)
Else
Top = Bot * Ratio
AddToOutput(Price.Bar.DateValue(i), Top, Top, Bot, Bot)
End If
First = False
End If
Else
If Price.Bar.Value(i) >= Top * Ratio Then
Dim Fake As Integer = -(System.Math.Log(Price.Bar.Value(i) / Top) / System.Math.Log(Ratio))
While Price.Bar.Value(i) >= Top * Ratio
Bot = Top
Top = Top * Ratio
AddToOutput(Price.Bar.DateValue(i).AddSeconds(Fake), Bot, Top, Bot, Top)
Fake += 1
End While
Else If Price.Bar.Value(i) <= Bot / Ratio Then
Dim Fake As Integer = -(System.Math.Log(Bot / Price.Bar.Value(i)) / System.Math.Log(Ratio))
While Price.Bar.Value(i) <= Bot / Ratio
Top = Bot
Bot = Bot / Ratio
AddToOutput(Price.Bar.DateValue(i).AddSeconds(Fake), Top, Top, Bot, Bot)
Fake += 1
End While
End If
End If
Next
end function
End Class
If I got that right, the chart still doesn't auto draw horizontal lines from the candlechart. It would be nice not to have to manually re-draw the lines for renko charts, but it's not a big deal.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
That does look correct, so it would seem that there is something more than just the name of the Plot involved in getting the Drawing Tools to work with the Renko Charts like they do with the built in Price History.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 6/22/2008 Posts: 65
|
Bruce, with the new release, 5.033 the price and indicator panes comes up blank on the renko charts.
Could you please take a look.
|