Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not submiting orders

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

    Strategy not submiting orders

    I am testing my strategy live today.
    On the action block, I have the following lines to print an arrow and enter the trade.
    if (shortstuff blah)
    {
    DrawArrowDown("My down arrow" + CurrentBar, 0, High[0] + 2 * TickSize, Color.Orchid);
    EnterShort(DefaultQuantity, "S2S");
    }

    This worked in historical testing , other than the 1 bar lag. (will be nice to have that intrabar backtester !)

    But today, in real time I'm seeing the arrow print, but no orders.
    And there's only one spot in my code that will draw an arrow, so I know it's a valid entery.

    If I stop/restart the strategy , both the arrows and signals are there.

    The live account is with IB, non is sim mode, and I' verified I can place oders via a DOM I started.

    Very confused !


    Attached screenshot of YM

    Attached Files

    #2
    imported post

    This means the EnterShort() method is being entered but being ignored. You can enable TraceOrder = true in the Initialize() method which will trace info why this method is being ignored. This will help you in debug.

    There is a known bug with Beta 10 where if TraceOrders is true and you have SetStop/Target called in Initialize() you will get an exception.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      I set my stops dynamically in OnBarUpdate as per http://ninjatrader.mywowbb.com/forum20/1521.html

      I have turned on that trace and will let you know

      Comment


        #4
        imported post

        Ok, have trace
        Attached in word doc in zip file

        Pls let me know if want to look at the strategy and I'll pm it to you.
        Attached Files

        Comment


          #5
          imported post

          Sorry Zoltran,

          Misunderstanding, I did not mean that I would debug. The TraceOrder property is there also for users to debug to understand why a strategy may not behave as you expect.

          That being said, I took a look at your file. I suspect that when you run your strategy, you are already in a position? You can check on the Strategies tab in the Control Center window. You have a setting that says "WaitUntilFlat" before executing live. If your strategy is not flat at first run, NT will wait until its flat before executing.

          Could this be the case?

          Ray
          RayNinjaTrader Customer Service

          Comment


            #6
            imported post

            Didn't expect you to debug ! Just suggested looking at my code if you wanted to understand why

            I;m just wanting to understand why it wasn't placed.

            However the strategy IS flat...
            Attached Files

            Comment


              #7
              imported post

              Can you try the following:

              ES 10 second chart, 4 days lookback
              Run your strategy live on Sim101 account
              --> Confirm that orders do not execute

              Then try

              Same as above except under Tools > Options > Strategies, set "Immediately submit live..."
              --> Do order execute or same behaviour as above

              Ray
              RayNinjaTrader Customer Service

              Comment


                #8
                imported post

                Ok, will do.. but I will need to modify my strat so it will make trades on a 10sec chart...

                On my existing charts, I added an Email and Alert
                Curiously, they do not execute either.

                if (condition)
                {
                DrawArrowUp("My up arrow" + CurrentBar, 0, Low[0] + -2 * TickSize, Color.Yellow);

                EnterLong(DefaultQuantity, "S2L");
                Alert("S2Long", NinjaTrader.Cbi.Priority.High, "Reached Breakout", "C:\\Data\\SOUNDS\\cowbell.wav", 10, Color.Lime, Color.Black);
                SendMail("[email protected]", "[email protected]", "Trade Alert", "Buy ");
                }

                So the apearance is that nothing after the drawarrow is executed.

                Comment


                  #9
                  imported post

                  Emails and alerts only trigger in real-time, they are ignored against historical data. I suspect that there may be some issue when you have WaitTilFlat set.

                  I will check here as well.

                  Ray
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    imported post

                    Zoltran,

                    Disregard further tests. I can confirm an issue related to the setting "Wait until flat...". Thanks for your patience and co-operation. Will have this resolved for the next update.

                    Ray
                    RayNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    558 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    324 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    545 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    547 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X