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

only new trade when flat

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

    only new trade when flat

    I’m new to strategy development.

    I’m looking for a simple way to only have one position open at a time. I don’t want to the reverse the position based on entry criteria, only take a new position if the previous one has hit my stop or profit. What is the best method to prevent this or check for no open position?

    Thanks in advance,


    Nick

    #2
    Hello bobajob78,

    Thanks for opening the thread.

    EntriesPerDirection can be used to limit how many different times you may enter into a position in a single direction.

    You may also check if the Strategy is in a flat position before entering by checking Position.MarketPosition.

    EntriesPerDirection - https://ninjatrader.com/support/help...rdirection.htm

    Position.MarketPosition - https://ninjatrader.com/support/help...etposition.htm

    Please let us know if you have any additional questions.
    JimNinjaTrader Customer Service

    Comment


      #3
      sorry - i need to move this to Ninja 7 area

      Comment


        #4
        thanks Market Position will probably do it. Until I get into complex multiposition strategies I guess!


        thanks.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fwendolynlpxz, Today, 05:19 AM
        0 responses
        3 views
        0 likes
        Last Post fwendolynlpxz  
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        28 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        8 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        11 views
        0 likes
        Last Post rocketman7  
        Working...
        X