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 ozziyhtomit, Today, 01:37 PM
          5 responses
          12 views
          0 likes
          Last Post ozziyhtomit  
          Started by hellboy78, Today, 12:44 PM
          5 responses
          13 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by Option Whisperer, Today, 12:19 PM
          6 responses
          18 views
          0 likes
          Last Post Option Whisperer  
          Started by sdauteuil, Today, 11:30 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by Serac, Today, 10:38 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X