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 aligator, Today, 02:12 PM
          0 responses
          2 views
          0 likes
          Last Post aligator  
          Started by Roman Hrabovskyi, Today, 01:46 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by The_Saint, Today, 12:44 PM
          0 responses
          17 views
          0 likes
          Last Post The_Saint  
          Started by 12VMan, Today, 12:43 PM
          0 responses
          11 views
          0 likes
          Last Post 12VMan
          by 12VMan
           
          Started by pvtrader, Today, 10:34 AM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X