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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            168 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            322 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            247 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            350 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X