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

Stop order submitted when employ strategy

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

    Stop order submitted when employ strategy

    When I install a strategy into a chart I immediately get a stop loss order before any other order has been placed. I've written strategies before but never encountered this. I am exiting the strategy either from the chart or by clicking the "flatten everything" and getting the same behavior on subsequent installs of the strategy...

    #2
    it's all better now

    Things get messed up in the local environment here. I deleted all my work via windows explorer, kept what i needed in a Word dodument, restarted NT and rewrote the strategy via the wizard + paste from Word and now it seems fine...

    Comment


      #3
      Glad it's resolved for you.

      Comment


        #4
        it's back again....

        this strategy is doing it again. When I install it, whether I use the sim101 or IB simulation account it places a stop order far from the market.... it is always at the same price.

        I moved the
        "SetStopLoss(CalculationMode.Ticks,Stopticks);"

        statement to the Initialize section of the code and it's the same....

        I replaced the "Stopticks" variable with the number 10 and now it places a stop order 10 ticks below the market upon deployment...

        Comment


          #5
          The strategy starts up, places a stop order and with no order, including that stop order, filled, when I click on the strategy button in control center, it says the strategy is short one contract [my default amount in the strategy]. This is immediately after starting up NT...

          the strategy tab reports unrealized p&l when no order has been filled, the account is flat and the strategy thinks it is short a contract....

          I took NT and TWS back to the previous versions and it's still the same problem...
          Last edited by maxpi; 12-10-2007, 02:34 PM.

          Comment


            #6
            This is correct behaviour.

            See this tip for more info.

            RayNinjaTrader Customer Service

            Comment


              #7
              I understand how the account position can be different from the strategy position, I don't understand why the strategy would have a stop order in place when it had not executed.

              Comment


                #8
                When you run a strategy, it calculates the current strategy's position and submits any outstanding orders for this virtually managed position. If you do not wish orders to be submitted, select the "Wait until flat" option under Tools > Options >Strategies > NinjaScript.
                RayNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by samish18, Today, 12:20 PM
                0 responses
                1 view
                0 likes
                Last Post samish18  
                Started by thread, 04-15-2024, 11:58 PM
                3 responses
                48 views
                0 likes
                Last Post Georg1o
                by Georg1o
                 
                Started by leojimenezp, 04-20-2024, 05:49 PM
                4 responses
                47 views
                0 likes
                Last Post leojimenezp  
                Started by nicthe, Today, 09:24 AM
                1 response
                5 views
                0 likes
                Last Post nicthe
                by nicthe
                 
                Started by samish18, Today, 10:13 AM
                0 responses
                6 views
                0 likes
                Last Post samish18  
                Working...
                X