Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Number of contracts set in strategy

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

    Number of contracts set in strategy

    Hello,

    This is something I am trying to do in Strategy Builder (no code) without success. I want to build 2 separate conditions upon which a single Long order will submit per condition met. The conditions are unique. Not possible to satisfy both conditions at the same time. But, it's possible both to be true during the same time, just not at the exact time. That means, during execution there could be 0, 1 Long, or 2 Long positions. Then, there will be a single condition that would trigger exit of all Long positions. It would not be possible to have for example 2 Long positions and the exit 1 of them. The Long exit position condition will always satisfy all Long positions if met.

    I have tried many times but the only thing I have accomplished is to place only 1 Long position of quantity 2. Any help?

    thanks

    #2
    Hi space_trader, thanks for posting.

    Did you set your Entries Per Direction property to 2 in the strategy settings? The default setting of 1 would prevent the strategy from entering the second long position. If you did could you please Export the strategy and post it so I can have a look?

    Best regards,
    -ChrisL

    Comment


      #3
      hello Chris,

      That's right. I have tried all possible different settings combinations and didn't work. I have extracted and e-mail the strategy file to you (support request e-mail, subject: Number of contracts set in strategy).

      thanks

      Comment


        #4
        Hi, thanks for sending that in.

        It is using a third party indicator so I can not test on my machine. The next thing to do is add prints to make sure that your second entry condition is being hit e.g.

        Code:
        if (trade conditions)
              {
                EnterLong(Convert.ToInt32(DefaultQuantity) , "");
        [B]Print("First Entry Hit");[/B]
              }
        
               // Set 2
              if (trade conditions)
              {
                EnterLong(Convert.ToInt32(DefaultQuantity) , "");
        [B]Print("Second Entry Hit");[/B]
              }
        You can find the print statement in the Misc actions menu. If you do see the second entry and it's getting ignored double-check your entries per direction parameter, I noticed its still set to 1 by default, this can be changed in the general properties menu.

        Best regards.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        44 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        125 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X