Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

adding dataseries/instruments

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

    adding dataseries/instruments

    Hello,

    I´m adding Add("NQ 09-18", PeriodType.Range, 8); to a script that should trigger entries in ES. Since I added the NQ for checking conditions it occurs now that there are entries not only in ES but also in NQ. How do I avoid this please and to specify entries in ES.

    if(conditions ES and conditons NQ...)
    {entryOrderS1=EnterShort(1,"S1");}

    How to avoid entries in NQ please?

    Thank you!
    Tony
    Last edited by tonynt; 08-04-2018, 05:22 AM. Reason: typing error

    #2
    Hello Tonynt,

    Thank you for writing in.

    You should specify the bar index in the enter short call.

    Please see the last syntax at the following link which includes BarsInProcessIndex,


    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello AlanP,

      thank you for your reply. So the "EnterShort(int barsInProgressIndex...." is determining which instrument/dataseries is triggered. I didn´t see this, I was focused on the example below where is only the signal name. Thank you for showing up.

      Another question please: I attach a screenshot where you can see that in the log-tab the profit-target is updating all the time. But I have a bool in onbarupdate so that profit target is updated only when a condition change is true. Why is it updating all the time? (I have different scripts running so I´m afraid thousands of lines in log will cause issues maybe)


      Thank you!
      Tony
      Attached Files

      Comment


        #4
        Hello tonynt,

        Without the full code we're unable to test on our end.

        If you'd like to upload the full code I can take a look and see if anything jumps out. Or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

        I look forward to your reply.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        637 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        571 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X