Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to produce custom OHLC bars?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to produce custom OHLC bars?

    Let's say I have four data series that I *somehow* compute:


    Code:
    DataSeries opens = new DataSeries(this, MaximumBarsLookBack.Infinite);
    DataSeries highs= new DataSeries(this, MaximumBarsLookBack.Infinite);
    DataSeries lows= new DataSeries(this, MaximumBarsLookBack.Infinite);
    DataSeries closes= new DataSeries(this, MaximumBarsLookBack.Infinite);
    Now, how do I merge those into an OHLC bar and plot it as a custom indicator in a separate panel?

    Thanks!

    #2
    molecool, you can take a look at the value charts implementations shared here for ideas how to realize this - http://www.ninjatrader.com/support/f...ead.php?t=7605
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Please try again ;-)

      ValueCharts indicator does not seem to work in the NT7:

      "Unable to create instance of 'NinjaTrader.Indicator.ValueCharts'. Most likely there is no default constructor defined, or the default constructor does not work correctly: Exception has been thrown by the target of an invocation."

      Comment


        #4
        molecool, that might be the case as it would use unsupported methods - here's another one that should chart fine - http://www.ninjatrader.com/support/f...uechart&desc=1

        The regular HeikenAshi implementation might help you as well by providing a starting point.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          molecool, that might be the case as it would use unsupported methods - here's another one that should chart fine - http://www.ninjatrader.com/support/f...uechart&desc=1

          The regular HeikenAshi implementation might help you as well by providing a starting point.
          @NinjaTrader_Bertrand: This indicator you mention does not update anymore as soon as I have chart properties set to "Equidistant Bar Spacing = False". Any idea how to fix this ?

          Comment


            #6
            That could be the case Ronny, unfortunately I would not be familiar with the custom code used.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by andrewtrades, Today, 04:57 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            6 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            8 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X