Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

barnumberoforder x 2

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

    barnumberoforder x 2

    Hello,

    I´m using barnumberoforder for cancelling limitentryorder after a certain number of bars. This works fine.

    But when I want to use this for another setup with limitentry, that might be working the same time(!), I dont find a solution. How can I have another "2nd" barnumberoforders for another setup with limitentryorder to start counting from the moment this limit is working?

    I tried to assign another variable but cant find a logic that makes sense.

    Thank you
    Tony

    #2
    Hello Tony,

    You will need a separate variable for each order to track each order separately.

    You could also use an array.

    The logic will likely be the same, just referencing the correct variable name.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      thank you for your reply. I think I´m not experienced enough in coding to understand what you mean. "BarnumberofOrder" is a certain "vocabular" no? Can I use "BarnumberofOrder2" and doing the same? Will Ninjatrader accept and count "BarnumberorOrder2"? If so, its easy of course. Otherwise I dont know how you mean.

      Thank you!
      Tony

      Comment


        #4
        Hello Tony,

        Yes, BarnumberorOrder2 is a valid name for a variable.

        private int barnumberorOrder2 = 5;
        Print( barnumberorOrder2 );

        You can also use an array.

        private int[] barnumberorOrder = new int[2];
        barnumberorOrder[1] = 5;
        Print( barnumberorOrder[1] );
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        147 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X