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
    Chris L.NinjaTrader Customer Service

    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) , "");
        Print("First Entry Hit");
              }
        
               // Set 2
              if (trade conditions)
              {
                EnterLong(Convert.ToInt32(DefaultQuantity) , "");
        Print("Second Entry Hit");
              }
        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.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by RT001, Yesterday, 03:47 PM
        3 responses
        26 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by johnMoss, Yesterday, 10:40 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by torch2k, Today, 06:24 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by WalterSkinner, Yesterday, 02:37 PM
        4 responses
        23 views
        0 likes
        Last Post WalterSkinner  
        Started by Fer123, Yesterday, 04:57 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jim  
        Working...
        X