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.

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tsantospinto, 04-12-2024, 07:04 PM
            5 responses
            67 views
            0 likes
            Last Post tsantospinto  
            Started by cre8able, Today, 03:20 PM
            0 responses
            6 views
            0 likes
            Last Post cre8able  
            Started by Fran888, 02-16-2024, 10:48 AM
            3 responses
            48 views
            0 likes
            Last Post Sam2515
            by Sam2515
             
            Started by martin70, 03-24-2023, 04:58 AM
            15 responses
            115 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by The_Sec, Today, 02:29 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X