• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Sell Limit orders not appearing in Orders window

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

    Unmanaged Sell Limit orders not appearing in Orders window

    Hello everyone,

    I am currently programming an automated strategy using unmanaged ordrs to be able to place Sell and Buy limit ordres in the same time.

    My problem is that the initial sell limit order never appears on the "orders" window of NinjaTrader, despite the fact that the logs indicates me no errors and after that, the limit price of the trade is logged, trade status is "working" and I can sucessfully update the limite price.

    Ths problem does not appear on the buy limit, and no problems too if I open manually a sell limit.

    I am using Ninja 7.4, with a Zenfire feed from a Mirrus demo account.
    Issue is appearing on live execution with simulated datafeed or zenfire one.

    Backtests are fine and sell limit order appears on the report with no problems.

    This issues begins to drive me crazy so I would be very grateful if someone would have a clue on what happens.

    Many thaks!

    #2
    Hello,

    Thanks for that information.

    When you run the strategy live is it going to a green state in the control center strategies tab indicating it is active.

    Also, If you add TraceOrders = True in the Initialize Method you will be able to trace the orders to see what is happening.

    http://www.ninjatrader-support.com/H...aceOrders.html


    Please let me know the trace output from here if there is any.

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      Thank you for your help.

      Yes the strategy goes green and I activated the trace. The trace reports the order creation wihtout any errors. I will be able to send the logs only later.
      The state of the ghost trade printed in logs is "working"...

      Comment


        #4
        Hello,

        THanks for that, and we are sure this is a live order not a historical order correct?

        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment


          #5
          Actually you maybe touch a interesting point here.
          I launch the strategy via the Strategy window. Whre can we be sure it is executing on live data and not historical one.
          I am not using Strategy Analyser here (and it is working on the analyseer by the way).

          Thanks

          Comment


            #6
            Hello,

            It is seemless from historical to live. The strategy actually would not know the difference. You would just need to check the order times in the output window. If the order time is less then the start time of the strategy -> Historical. Vice Versa.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment


              #7
              Here are some traces at the sell and buy limit order opening :

              Code:
              Place init orders
              01/04/2011 13:20:07 Entered internal SubmitOrder() method at 01/04/2011 13:20:07: Action=Sell OrderType=Limit Quantity=1 LimitPrice=1.4259 StopPrice=0 OcoId='' Name='Strat1ShortLimitI'
              Working
              01/04/2011 13:20:07 Entered internal SubmitOrder() method at 01/04/2011 13:20:07: Action=Buy OrderType=Limit Quantity=1 LimitPrice=1.3979 StopPrice=0 OcoId='' Name='Strat1LongLimitI'
              Opening Long Limit order: 1.3979
              Opening Short Limit order: 1.4259
              The working status and limit prace are taken through the trade object, indicating that the trade is successfully entered.

              Comment


                #8
                Hello,

                RIght but what was the starting time of the strategy. It should time stamp the time at the top of the output window when you enable the strategy.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  I run it yesterday, so this data are indeed past data.

                  Comment


                    #10
                    Hello,

                    Ok if you run it again today can you please post the start times and order times of the strategy it is here we will be able to identify they are historical orders.

                    Which we most likely will. At that point you simply need to wait for a live order to be submitted. Also you will want to make sure you read up on this document.

                    Strategy Position vs. Account Position:
                    http://www.ninjatrader-support2.com/...ead.php?t=4033
                    1st solution:
                    You can include the following statement in your code to avoid the strategy to be calculated on historical data.
                    // Only run on real-time data
                    if (Historical)
                    return;
                    Add the statement to the top of OnBarUpdate()
                    2nd solution:
                    You can set 'On starting a real-time strategy' to 'Wait until flat before executing live'.
                    This option can be found at Tools-->Options-->Strategies-->NinjaScript-tab.
                    3rd solution, would be submitting manual orders to sync the strategy and account positions described in the link
                    4th solution, would be to enable Sync account position to true.
                    http://www.ninjatrader.com/support/h..._positions.htm
                    BrettNinjaTrader Product Management

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by sledge, Today, 06:11 PM
                    1 response
                    8 views
                    0 likes
                    Last Post sledge
                    by sledge
                     
                    Started by Bionian, Today, 02:46 PM
                    2 responses
                    9 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by rwilliam, Today, 01:54 PM
                    1 response
                    19 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by franco12364, Today, 11:27 AM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by YevhenShynkarenko, Today, 11:48 AM
                    4 responses
                    27 views
                    0 likes
                    Last Post NinjaTrader_ChrisL  
                    Working...
                    X