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 Tim-c, Today, 03:54 AM
          0 responses
          3 views
          0 likes
          Last Post Tim-c
          by Tim-c
           
          Started by FrancisMorro, Today, 03:24 AM
          0 responses
          2 views
          0 likes
          Last Post FrancisMorro  
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,771 views
          0 likes
          Last Post Leafcutter  
          Started by Rapine Heihei, 04-23-2024, 07:51 PM
          2 responses
          31 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          945 views
          0 likes
          Last Post spwizard  
          Working...
          X