Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

can't see my EntryOrders in NinjaTrader's platform

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

    can't see my EntryOrders in NinjaTrader's platform

    Hello,
    I tried to place orders, but I can't see these orders in executions tab or orders tab on the platform NinjaTrader.
    Code:
    namespace NinjaTrader.NinjaScript.Strategies
    {
        public class GridL :  Strategy
        {
                      protected override void OnStateChange()
            {
              
                if (State == State.SetDefaults)
                {
                    Description                                = @"GridL";
                    Name                                    = "GridL";
                    Calculate                               = Calculate.OnPriceChange;
                    EntriesPerDirection                     = 1;
                    EntryHandling                           = EntryHandling.AllEntries;
                    IsExitOnSessionCloseStrategy            = true;
                    ExitOnSessionCloseSeconds               = 30;
                    IsFillLimitOnTouch                      = false;
                    MaximumBarsLookBack                     = MaximumBarsLookBack.TwoHundredFiftySix;
                    OrderFillResolution                     = OrderFillResolution.Standard;
                    Slippage                                = 0;
                     StartBehavior                           = StartBehavior.ImmediatelySubmitSynchronizeAccount;
                    TimeInForce                             = TimeInForce.Gtc;
                    TraceOrders                             = false;
                     RealtimeErrorHandling                   = RealtimeErrorHandling.StopCancelClose;
                     StopTargetHandling                      = StopTargetHandling.PerEntryExecution;
                    BarsRequiredToTrade                     = 0;
               
                }
                else if (State == State.Configure)
                {
                         }
            }
     
            private Order entryOrder = null;
         
                     protected override void OnBarUpdate()
            {
                           if (entryOrder == null && Close[0] > Open[0]){ 
                
                          EnterShort(2, "myEntryOrder");
                     Print("Execution : close=" + Close[0] + " Open="+Open[0] + " at " + "dateTime="  + DateTime.Now.ToString("HH:mm:ss.fff"));
              
                    }
            
                    else{
                         Print("close=" + Close[0] + " Open="+Open[0]);
                    }
                   }
         
                      
    protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string nativeError)
            {
     
                if (entryOrder != null && entryOrder == order)
                {
                             entryOrder = order;
    
                    if (order.OrderState == OrderState.Cancelled && order.Filled == 0)
                    {
                               entryOrder = null;
                    }
                }
            }
             
        }
    }

    #2
    Hello,
    Testing this on my end I do see the orders submit.
    Can you verify that you have the enabled box checked for the strategy?
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thanks
      yes it's enabled

      Comment


        #4
        Hello,
        Do you see your prints in the Output window?
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          Yes i can see my print message,
          I don't know whether because of synchronization of strategy or ..

          Comment


            #6
            Hello,
            What instrument and interval are you testing this on?
            Are you backtesting or testing this with a live data feed?
            Cody B.NinjaTrader Customer Service

            Comment


              #7
              Hello,

              ES 06-16
              with a live data feed
              in input :
              Enabling NinjaScript strategy 'GridL/74967680' : On starting a real-time strategy - StartBehavior=ImmediatelySubmit EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=False SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On price change IsUnmanaged=False MaxRestarts=4 in 5 minutes
              Last edited by soma8; 05-19-2016, 08:23 AM.

              Comment


                #8
                Hello,
                I have tested this on my end and I do see a historical order submitted.
                Do you see any historical orders submitted?
                Cody B.NinjaTrader Customer Service

                Comment


                  #9
                  Hello,
                  No i can't see any orders in submitted historical

                  Comment


                    #10
                    Hello,

                    I wanted to confirm, are you accessing the Strategy Performance report to check for historical orders by right clicking in the chart or on the strategy in the control center, then going to Strategy Performance -> Historical?

                    Do you see the historical trade listed in this report?

                    I look forward to being of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by bortz, 11-06-2023, 08:04 AM
                    47 responses
                    1,603 views
                    0 likes
                    Last Post aligator  
                    Started by jaybedreamin, Today, 05:56 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post jaybedreamin  
                    Started by DJ888, 04-16-2024, 06:09 PM
                    6 responses
                    18 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by Jon17, Today, 04:33 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post Jon17
                    by Jon17
                     
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post Javierw.ok  
                    Working...
                    X