Announcement

Collapse
No announcement yet.

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."
    https://ninjatrader.com/support/help...dataseries.htm
    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, 08: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, 08: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 WNorton, Today, 11:23 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Spencer  
              Started by stafe, Today, 10:43 AM
              0 responses
              8 views
              0 likes
              Last Post stafe
              by stafe
               
              Started by UltraNIX, Today, 09:13 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_ChrisL  
              Started by Tuxstuff215, Today, 06:32 AM
              1 response
              15 views
              0 likes
              Last Post NinjaTrader_ChrisL  
              Started by carlot, Today, 08:10 AM
              2 responses
              21 views
              0 likes
              Last Post carlot
              by carlot
               
              Working...
              X