Announcement

Collapse
No announcement yet.

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?

    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

        Comment


          #5
          Thank you for the help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          80 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          40 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          63 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          63 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X