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 gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by Kaledus, Today, 01:29 PM
        2 responses
        8 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        13 responses
        45 views
        0 likes
        Last Post frankthearm  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        56 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X