Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to plot candlestick for second instrument

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

    How to plot candlestick for second instrument

    I would like to get a candlestick plot for a secondary instrument (e.g. ^DJIA) in a second panel below the main price panel.

    I suppose I could design an indicator that produces a candlestick plot of the specified instrument, but that seems that there should be an easier way. If not, it seems that such an indicator would be a simple and useful addition to NinjaTrader.

    I know how to add the indicator to the new panel.

    Thanks,

    Mark

    #2
    Hello,

    Thanks for your note.

    You would have to use an indicator/strategy that used Add() in Initialize to add in the secondary data series to make it accessible.

    However NinjaTrader will use the secondary data series already in th chart if the Add() call matches up for efficiency. For example the instrument name and instrument type/interval must match.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Brett:

      Are you suggesting that something like

      Add("^DJIA", BarsPeriod.BasePeriodType, BarsPeriod.BasePeriodValue);

      should work? I have tried this and it executes OK, but nothing is added to the chart.

      What do I need to do to get a candlestick of it?

      Thanks,

      Mark

      Comment


        #4
        Originally posted by MarkThallman View Post
        I would like to get a candlestick plot for a secondary instrument (e.g. ^DJIA) in a second panel below the main price panel.

        I suppose I could design an indicator that produces a candlestick plot of the specified instrument, but that seems that there should be an easier way. If not, it seems that such an indicator would be a simple and useful addition to NinjaTrader.

        I know how to add the indicator to the new panel.

        Thanks,

        Mark
        Just use the configuration GUI to add another instrument, They do not even have to have the same plot type or period.
        Attached Files

        Comment


          #5
          Thanks, but I know how to do it manually. I want to be able to do it from within NinjaScript.

          Comment


            #6
            Hello,

            You will be unable to add a bar series as a second panel of the chart through NinjaScript since this is not supported. You would have to use the data series window. Also, the Add() will always add bar series in the background for processing.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            656 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            371 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            579 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X