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

PerfChart Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
rlb1987
Posted : Wednesday, January 19, 2011 11:03:36 AM
Registered User
Joined: 1/2/2008
Posts: 41

I would like to create chart like a custom PerfChart with up to 10 ticker symbols in StcokFinder, something like http://stockcharts.com/freecharts/perf.html?[MARK]. Could you help me with this question?
Thanks in advance

Bruce_L
Posted : Wednesday, January 19, 2011 12:46:45 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
If you replace everything below the Inherits line in the Class tab of the RealCode Editor for a RealCode Indicator with the following:

    Sub New
        AutoLoop = False
        '#RECALC_ON_ZOOM_SCROLL
        '# Symbol = UserInput.String = "COMPQX"
    End Sub
    Public Overrides function Plot() as System.Single
        Dim customSymbol As PriceScripting
        customSymbol = PriceData(Symbol)
        Dim Basis As Single = customSymbol.Bar.Value(customSymbol.IndexForDate( _
            ActiveChart.ZoomStartDate)) / 100
        For i As Integer = customSymbol.IndexForDate(ActiveChart.ZoomStartDate) To _
            customSymbol.IndexForDate(ActiveChart.ZoomEndDate)
            AddToOutput(customSymbol.Bar.DateValue(i), _
                customSymbol.Bar.OpenValue(i) / Basis - 100, _
                customSymbol.Bar.HighValue(i) / Basis - 100, _
                customSymbol.Bar.LowValue(i) / Basis - 100, _
                customSymbol.Bar.Value(i) / Basis - 100)
        Next
    End Function
End Class

You should be able to add as many of these Indicators to the same Pane and Scale as you want while Editing each of the Indicators to use a different Symbol.

Working with Indicators
RealCode for Real People: Indicators

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rlb1987
Posted : Tuesday, January 25, 2011 11:09:26 AM
Registered User
Joined: 1/2/2008
Posts: 41
Thanks, but it did not work. Could you do it in a chart and share the chart?
Bruce_L
Posted : Tuesday, January 25, 2011 2:34:37 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You should be able to Open an attached Indicator directly into a running copy of StockFinder 5 (and save it from within StockFinder 5 if desired). You could also Save it to the \My Documents\StockFinder5\(Your Username)\My Indicators\ folder and then load it like you would any other Indicator (or Copy and Paste it there from wherever it Saves if you can't specify the destination directory when Saving).

It has the RealCode Indicator above on the Chart ten times. Each with a different Symbol setting and Legend adjusted to match as well.

Attachments:
PerfChart.sfIndRC - 13 KB, downloaded 585 time(s).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rlb1987
Posted : Wednesday, January 26, 2011 1:17:15 PM
Registered User
Joined: 1/2/2008
Posts: 41
Thank very much!
Bruce_L
Posted : Wednesday, January 26, 2011 1:29:35 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
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.