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

stopping an automatic reversal

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

    stopping an automatic reversal

    Hello,
    In my strategy I trade with 2 contracts, one for short gains and one for long runs. The strategy is based on reversals. The exit condition for the 1st position at times coincides with the reversal conditions (which will open 2 opposing positions). When this happens, by default, both the original 1st and 2nd positions exit and reverse. My desire is to exit the 1st position, open two new positions in the opposite direction, and keep the original 2nd position alive until its exit conditions are met. Is there a way to override the default reversal feature?
    Thanks

    #2
    CaptainAmericaXX,

    Can you please clarify the Reversal Feature you are using? Is this in an ATM Strategy you had created?

    Or did you mean something else?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Sorry for the confusion. I believe a default feature of NT is using the Enter() to reverse positions. So if I had were entering on a CrossAbove() with and EnterLong() I would exit on a CrossBelow() with and EnterShort(). So I could just have Enter() and no Exit() if I wanted to go back and forth.
      That's what is going on (unintentionally) with my strategy. The Enter conditions happen to be the same as the exit condition for one position in certain situations. So NT is automatically reversing both positions and not allowing the 2nd position to continue on.

      Comment


        #4
        Hello,

        Do these positions have unique strings or are they using the same strings?

        If you would want to separate the two positions, you would want to use special strings/tags to identify each order.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Yes they are uniquely named.

          Comment


            #6
            CaptinAmerica,

            It's not clear from your description when exit method you are using for the first and second position. Are you just using enter short?

            Would you mind posting a snippet of your code?
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            4 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            20 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X