Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cant enable strategy

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

    Cant enable strategy

    When clicking the "enable" checkbox in the "strategies" tab of the control center I get the following message (which I used to get before with no consecuences)

    "Although you have order confirmation enabled, orders generated by a strategy will be submitted without confirmation."

    After the message box closes the strategy unchecks itself thus not allowing me to run it. Please help.

    Thanks in advance!

    #2
    To disable this message, please go to Tools--> Options--> uncheck "confirm order placement".

    For more information to why the strategy is not enabling, please check the "Log" tab of the Control Center for errors from that strategy.
    MatthewNinjaTrader Product Management

    Comment


      #3
      The log states the following:

      Error on calling 'OnBarUpdate' method for strategy 'Test2/032d8ff3a62748f5b556a8e76cfea1c4': You must use the overload that has a 'BarsInProgress' parameter when calling the BarsSinceEntry() method in the context of a multi-time frame and instrument strategy.

      Comment


        #4
        You will need to specify the BIP you're referencing in your BarsSinceEntry() methods:


        BarsSinceEntry(0, mySignalName, 1)

        MatthewNinjaTrader Product Management

        Comment


          #5
          i kind of follow but I dont. I had built a strategy that was working on timeframe A, now I added a timeframe B to it. I guess all the BarsSinceEntry I used are aplying to the original timeframe A and i guess you are telling me that since I added a timeframe B I now mut clarify to NT which timeframe to apply BarsSinceEntry to? if that is the case could you elaborate on your code, I dont follow how to apply it to my strategy, this is the first time I am trying to code multiple timeframes and not sure if doing it right anyway.

          Comment


            #6
            Hello,

            Yes, you now need to specify what series the orders were entered on.

            My code was only to serve as an example. You will need customize it to match your code.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Thanks Matt, I used "BarsSinceEntry()" through my code without any parameters inside the brackets. Having trouble following your example even after reading the link you kindly provided.

              So in: BarsSinceEntry(0, mySignalName, 1)

              The "0" stands for the main timeframe?
              What does "mySignalName" stand for or what should I change it to?
              What does the "1" do?

              Comment


                #8
                Yes 0 is the main timeframe. To reference the second time frame, you'd use "1".

                signal name is the tag you used for the entry order.

                The last int checks the last entry. You can use 0 to reference the most recent entry

                BarsSinceEntry(int barsInProgressIndex, string signalName, int entriesAgo)
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  ok, clear on #1 and #3

                  On #2: "signal name is the tag you used for the entry order." what is a tag?

                  Comment


                    #10
                    It is a User defined signal name identifying the order generated.

                    For example if you use EnterLong() you can specify EnterLong("myLongSignal");

                    And then for BarsSinceEntry, you can call that by using BarsSinceEntry(0, "myLongSignal", 0);
                    MatthewNinjaTrader Product Management

                    Comment


                      #11
                      I did not give any names to the signals. I just used

                      EnterLong(DefaultQuantity,
                      "");

                      I just want to keep it simple, do I HAVE TO give the signal a name now that I am watching multiple timeframes?

                      Comment


                        #12
                        Yes, you're going to have to give them unique signal names to track them. This should make it easier to debug and track your orders and it is suggested you name your orders.
                        MatthewNinjaTrader Product Management

                        Comment


                          #13
                          Cannot enable strategy

                          I have multibroker license to one IB Advisor account and another normal IB account. All the advisor account strategies can be enabled, but the other account shows no connection name in the control center strategies tab,,, and cannot fire. I see under the accounts tab the value within that second account.... and get in the log

                          Requested market data is not subscribed.Error&DTB/FUT/Deep 354

                          Market data is subscribed for account 2. Any ideas why this is?

                          Regards and thx

                          Comment


                            #14
                            Everington,

                            Do you have two open connections or just the one connection?

                            Do you see the instrument in particular update on the TWS side?
                            Cal H.NinjaTrader Customer Service

                            Comment


                              #15
                              Thanks for the rapid reply. Yes I have two open connections to IB. Yes the instrument updates on TWS for both accounts. Regards

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              647 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              369 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              108 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              572 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              573 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X