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

Type Input for Optional Symbol

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

    Type Input for Optional Symbol

    First I am not attempting to trade 2 symbols. Only 1 symbol traded. I wish to have a user input Box for Symbol to be Traded

    This will be used for instance for a Strategy to Meet conditional logic of ES but then Trade the Symbol of this User input.

    Which could be ES 09-20, or MES 09-20, or any symbol enter into this input

    1st need the type input box to use fo rthis
    2nd how to have the order entry acquire that input

    Thanks


    #2
    Hello DTSSTS,

    While using a hardcoded instrument in AddDataSeries() is supported, using inputs in AddDataSeries() is not.

    From the help guide:
    "Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner."
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      OK SO if i wish to chart conditions on NQ 09-20 but submit EnterLong on MNQ 09-20 in the strategy how do i place that symbol into the order entry
      thanks

      Comment


        #4
        Hello DTSSTS,

        Add a series with AddDataSeries().

        AddDataSeries("MNQ 09-20", BarsPeriodType.Minute, 1);

        Place the order to BarsInProgress 1.

        EnterLong(1, 1, string.Empty);
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          EnterLong(1, 1, string.Empty);

          what part of this identifies the MNQ 09-20

          and can that be done from strategy builder
          Last edited by DTSSTS; 08-31-2020, 09:25 AM.

          Comment


            #6
            Hello DTSSTS,

            Below is a link to the help guide on EnterLong().
            https://ninjatrader.com/support/help.../enterlong.htm
            https://ninjatrader.com/support/helpGuides/nt8/barsinprogress.htm


            The 1 as the BarsInProgressIndex submits the order to the added series added with AddDataSeries().

            Unfortunately, no, the Strategy Builder does not allow for orders to be submitted to an added series. The script would need to be unlocked.
            Last edited by NinjaTrader_ChelseaB; 08-31-2020, 09:43 AM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              ok i can unlock later and do this, but the reason i am asking about what identifies the MNQ is that i will add several data series and then us the strategy to have ability to trade several optional symbols

              Thanks for the help

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Aviram Y, Today, 05:29 AM
              0 responses
              1 view
              0 likes
              Last Post Aviram Y  
              Started by quantismo, 04-17-2024, 05:13 PM
              3 responses
              25 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by ScottWalsh, 04-16-2024, 04:29 PM
              7 responses
              34 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by cls71, Today, 04:45 AM
              0 responses
              6 views
              0 likes
              Last Post cls71
              by cls71
               
              Started by mjairg, 07-20-2023, 11:57 PM
              3 responses
              216 views
              1 like
              Last Post PaulMohn  
              Working...
              X