Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with orders

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

    Problems with orders

    Hello I have a problem using my strategy.

    Usually when i start the strategy and the indicators are setted in a specific trend it submittes cover orders (as buy to cover) as if it filled an entry order that in reality the strategy has not launched. So I'm forced to close manually the position and restart the strategy...but also in this case sometimes it begins with new cover orders not calculating that I have closed the position.
    How can I solve this problem?
    I need, when I start my strategy, that it starts everytime with no existing position (these positions don't compare in the window "position" of NinjaTrader), but with an entry order (as I programmed in my strategy). It always must begin with a flat position.

    Thank You.

    #2
    Go to Tools->Options->Strategies->NinjaScript Strategies and select the "Wait until flat before executing live" option.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your answer. I tried as you suggested but definitely strategy doesn't submit any order. In my strategy I wrote "if marketposition is flat then submit an entry order" but with the option you suggested doesn't work anymore.

      Comment


        #4
        Are you saying your strategy is no longer making any trades? It is completely blank now?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Yes exactly.

          Comment


            #6
            Please check for errors in your Control Center logs. Changing this setting should have no bearing on whether your strategy makes trades or not. All simulated trades on historical data should occur regardless of the setting.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I checked the Log and i don't have any error message.

              Comment


                #8
                pragma,

                Would you mind emailing me your strategy so I can test it on my end? josh.peng [at] ninjatrader [dot] com. Thanks.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  ok done, thanx

                  Comment


                    #10
                    I've replied to your email.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Josh I installed again NT and this time it works well, but just if the strategy is in flat position.

                      Otherwise I have a problem when the strategy starts with an order filled that I cannot see in positions. In this case the strategy doesn't send any order because it's not flat. How can i do to flat the strategy and the opened positions (I cannot see them in positions) ?

                      Thanx

                      Comment


                        #12
                        pragma,

                        With the setting I told you to set earlier it will not trade until you are flat. The strategy will run in simulated mode until it reaches a flat state then the next trade after that will be a live trade. You probably won't see the position because it is internally simulated. If it will show up anywhere it will show up in the Positions tab.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Ok Josh, I'll try it...I'll let you know if it works, thanx.

                          Comment


                            #14
                            Hi Josh I tried but it doesn't work. The strategy doesn't send any order...I'll let it go for more than one hour and it never sent orders.

                            Comment


                              #15
                              Here. In your code add something like DrawDot() when your strategy should make an enter long or an enter short. That way you know if your strategy should have traded.

                              Also use TraceOrders = true and leave your Output Window open. This way you will know for sure when your strategy should trade and if it doesn't you will know a reason from the trace logs.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by WHICKED, Today, 12:56 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post WHICKED
                              by WHICKED
                               
                              Started by Spiderbird, Today, 12:15 PM
                              2 responses
                              10 views
                              0 likes
                              Last Post Spiderbird  
                              Started by WHICKED, Today, 12:45 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post WHICKED
                              by WHICKED
                               
                              Started by FrazMann, Today, 11:21 AM
                              2 responses
                              6 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Started by rjbtrade1, 11-30-2023, 04:38 PM
                              2 responses
                              80 views
                              0 likes
                              Last Post DavidHP
                              by DavidHP
                               
                              Working...
                              X