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

One Trade Per Side

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

    One Trade Per Side

    I would like to include a condition for a strategy to take one trade per side. How can I do this? Thanks.

    #2
    Hello, thanks for writing in.

    A strategy can only be long or short, not both at the same time. Is this your question?

    Chris L.NinjaTrader Customer Service

    Comment


      #3
      No. Want the strategy to take one long and one short. Not to continue taking trades after one trade is executed. One trade per side. Thanks.

      Comment


        #4
        Hello, thanks for the clarification. You can use boolean variables to control if a condition should trigger or not. E.g. set up two boolean variables, one for the first long position and one for the first short position, then set this so true once the strategy triggers EnterLong/EnterShort. I attached my script for reference.

        Attached Files
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thank you for the help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by 00nevest, Today, 02:27 PM
          0 responses
          1 view
          0 likes
          Last Post 00nevest  
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Started by Fitspressorest, Today, 01:38 PM
          0 responses
          2 views
          0 likes
          Last Post Fitspressorest  
          Started by Jonker, Today, 01:19 PM
          0 responses
          2 views
          0 likes
          Last Post Jonker
          by Jonker
           
          Started by futtrader, Today, 01:16 PM
          0 responses
          9 views
          0 likes
          Last Post futtrader  
          Working...
          X