Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders work in reply but not live data?

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

    Orders work in reply but not live data?

    Hi,

    I have a strategy that I have been working on, when I use the market replay data feed it seems to be successfully placing orders as expected.

    However when I use a realtime feed such as kinetick and select the simulation account it never places a trade. It is most definitely enabled.

    So it works in market replay but not realtime data... what am I missing here?

    cheers,
    brendan

    #2
    Hello,

    Thanks for the forum post and welcome to the NinjaTrader support forum.

    First steps here is to find out what code is running as you expect. Did you manually code this and can edit with the code editor or did you use the strategy wizard to create the strategy?

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      it has been manually coded. here is an extract. at this point in time i just want it to place mkt orders

      /// <summary>
      /// Place an order.
      /// </summary>
      /// <param name="shortOrder">True to short, false for long.</param>
      private void placeOrder(bool shortOrder)
      {
      Print(Time[0].ToLongTimeString() + " Place order = " + Position.AvgPrice + " Short = " + shortOrder);

      if (shortOrder)
      {
      currentOrder = EnterShort(DefaultQuantity, tcsSignal);
      ordersPlaced++;
      this.DrawArrowDown("Down" + this.CurrentBar, true, this.Time[0], Open[0], Color.FromKnownColor(KnownColor.Brown));
      }
      else
      {
      currentOrder = EnterLong(DefaultQuantity, tclSignal);
      ordersPlaced++;
      this.DrawArrowUp("Up" + this.CurrentBar, true, this.Time[0], Open[0], Color.FromKnownColor(KnownColor.Brown));
      }
      }

      /// <summary>
      /// Called on each bar update event (incoming tick)
      /// </summary>

      Comment


        #4
        Hello,

        Thanks for that.

        And do you get the arrows drawn on the chart? That you have programmed in?

        Do you have enough bars loaded in the chart for the strategy to run?

        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment


          #5
          No I do not see them printing, I am loading 20 days of data which should be ample.

          is there anything you know of that is different from market replay data and realtime?

          Comment


            #6
            no other difference I can think of.

            At this point we need to continue adding Print statements to debug where the problem is here.

            As we are not getting the execution logic to fire. So we need to add Print statements above this and continue to find what section is not firing.

            If you still having trouble with this please let me know.

            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            88 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            48 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            30 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            34 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            68 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X