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 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.

    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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rajendrasubedi2023, Today, 09:50 AM
            2 responses
            13 views
            0 likes
            Last Post rajendrasubedi2023  
            Started by geddyisodin, Today, 05:20 AM
            4 responses
            28 views
            0 likes
            Last Post geddyisodin  
            Started by geotrades1, Today, 10:02 AM
            2 responses
            8 views
            0 likes
            Last Post geotrades1  
            Started by ender_wiggum, Today, 09:50 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by bmartz, Today, 09:30 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Erick  
            Working...
            X