Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Any idea what I've got wrong here?

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

    #16
    In some cases that "next bar" is seven days later. That is not logical.

    Comment


      #17
      Suggest you print timestamps from each BarsInProgress so you know when the next update occurs for that particular instrument and try to correlate the two.

      You should also try the expanded signature for order placement that contains the BarsInProgress parameter.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Sounds logical. How do I do that?

        Comment


          #19
          Inside your if (BarsInProgress == x) statements, just add a line at the top.

          Print(BarsInProgress + " " + Time[0]);

          Then you can look for the output in the Output Window.
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            OK, I will insert the Print statement. But how do I do the "expanded signature for order placement" that you referred to?

            Comment


              #21
              Instead of just going ExitLong("signal") you can use this:

              ExitLong(int barsInProgressIndex, int quantity, string signalName, string fromEntrySignal)
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                I think you have solved the problem! Not exactly sure why, but changing the ExitLong() and ExitShort() to your extended version seems to have fixed the problem. The only anomaly I saw in the Output was this little sequence:

                This is the Entries:
                /8/2009 11:00:00 PM Entered internal PlaceOrder() method at 6/8/2009 11:00:00 PM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='ESS' FromEntrySignal=''
                1 6/8/2009 11:00:00 PM
                6/8/2009 11:00:00 PM Entered internal PlaceOrder() method at 6/8/2009 11:00:00 PM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='ZBS' FromEntrySignal=''

                And this is the exits:

                6/10/2009 12:30:00 PM Entered internal PlaceOrder() method at 6/10/2009 12:30:00 PM: Action=BuyToCover OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='XESS' FromEntrySignal='ESS'
                6/10/2009 12:20:00 PM Entered internal PlaceOrder() method at 6/10/2009 12:20:00 PM: Action=BuyToCover OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='XZBS' FromEntrySignal='ZBS'
                1 6/10/2009 12:30:00 PM
                6/10/2009 12:30:00 PM Entered internal PlaceOrder() method at 6/10/2009 12:30:00 PM: Action=BuyToCover OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='XZBS' FromEntrySignal='ZBS'
                6/10/2009 12:30:00 PM Ignore order amendment: Action=BuyToCover OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName=XZBS' FromEntrySignal='ZBS' Reason='Order already has this stop price/limit price/quantity'

                This is on the very first order of the test period and seems to be the only time I get a statement that an order was ignored. Does it mean anything of significance?

                Comment


                  #23
                  Well it says the order amendment was ignored because price/quantity is the same so there should no reason of concern I would think.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by helpwanted, Today, 03:06 AM
                  1 response
                  8 views
                  0 likes
                  Last Post sarafuenonly123  
                  Started by Brevo, Today, 01:45 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post Brevo
                  by Brevo
                   
                  Started by aussugardefender, Today, 01:07 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post aussugardefender  
                  Started by pvincent, 06-23-2022, 12:53 PM
                  14 responses
                  242 views
                  0 likes
                  Last Post Nyman
                  by Nyman
                   
                  Started by TraderG23, 12-08-2023, 07:56 AM
                  9 responses
                  385 views
                  1 like
                  Last Post Gavini
                  by Gavini
                   
                  Working...
                  X