Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set up instrument and data series

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

    Set up instrument and data series

    Hi everybody,

    I'm programming a strategy specific a instrument and I'm boring to set up data series each time I run this.

    Click image for larger version

Name:	10.08.jpg
Views:	1
Size:	105.5 KB
ID:	898795

    I want to know if is possible to set up in a strategy the instrument and period time (see the attached file) in the Initialize() section.

    Thank,

    Michele

    #2
    Hello Michele,

    Thank you for your note.

    It is not possible to assign the primary bar series in the code, however you can assign a secondary bar series and have your code and orders run on this secondary bar series alone.

    For an example of using multiple instruments in a NinjaScript Strategy please go to your NinjaTrader Control Center > Tools > Edit NinjaScript > Strategy > SampleMultiInstrument > OK.

    For information on using Multiple Instruments in your NinjaScript code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Hi Patrick,
      Thank you for your quick response.
      If, unfortunately, isn't possible to set up instruments and data series what is the parameter DataSeriesConfigurable?
      Bye,
      Michel

      Comment


        #4
        Hello Michele,

        Thank you for your response.

        The DataSeriesConfigurable property sets the Strategy so that you cannot configure the Data Series information but still allows you to change the instrument.
        You can test this by adding DataSeriesConfigurable = false; to your Strategy's Initialize() method > compile the code > then go to your Strategy tab on your NinjaTrader Control Center > right click > New Strategy > select your Strategy > you will notice the "Price Based On", "Type", and "Value" in the Data Series section are no longer listed for selection but the instrument is.
        Then change the DataSeriesConfigurable to true and retest, you will see the difference here as the "Price Based On", "Type", and "Value" are now available to select again.

        For information on DataSeriesConfigurable please visit the following link: http://www.ninjatrader.com/support/h...nfigurable.htm

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        666 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        377 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X