Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Basics: Position Reversing

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

    Basics: Position Reversing

    Hello,

    how do i prevent the ninja trader from reversing an open position?

    Once in the market i want the position either to hit the stop or the target.

    Is there a way to solve this basic problem with the strategy wizard?

    thanks in advance

    #2
    Hello Schubert,

    Welcome to the NinjaTrader Support Forums.

    That will depend on what order entry method(s) you are using. If you are using the Managed Approach and use the Enter() method for example, when you are "long" then an Enter() method is called to go "short" NinjaTrader will close out of the "long" position and enter a "short" position.

    If you want to setup a stop loss you can use the SetStopLoss() method, and if you wanted to get out of a position without reversing position you can use the Exit() method. You may read the following link for more information on the different Order Methods from our Help Guide.

    http://www.ninjatrader.com/support/h...er_methods.htm

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JC View Post
      Hello Schubert,

      Welcome to the NinjaTrader Support Forums.

      That will depend on what order entry method(s) you are using. If you are using the Managed Approach and use the Enter() method for example, when you are "long" then an Enter() method is called to go "short" NinjaTrader will close out of the "long" position and enter a "short" position.
      This is the Problem. :-)

      While i am in a long or short position i want the the ninja trader to ignore all other buy oder sell signals.

      While i am in a position i just want the ninja trader to wait until the long or short position hits the stop or the target.

      Then the ninja trader is allowed to open a new long or short position and follows the approach described above again.

      thank your for your help :-)

      Comment


        #4
        Just check to make sure you're flat before any execution calls:

        if (Position.MarketPosition == MarketPosition.Flat)
        //execution

        Comment


          #5
          got it.

          thank you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bmartz, 03-12-2024, 06:12 AM
          5 responses
          32 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          13 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by cls71, Today, 04:45 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X