Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem to submit 2 buy orders at the same time for different profit targets

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

    Problem to submit 2 buy orders at the same time for different profit targets

    Hi Everyone,

    I am having a problem that I believe it is simple but I can't solve it with my knowledge. I already saw videos on youtube but it is not working for me.

    I have a buy/sell strategy that when triggered the NT must buy or sell 2 contracts. I gave a name for each buyorder as bellow:

    EnterLong(1,@"buy1")
    EnterLong(1,@"buy2")

    When the conditions are reached the NT open only one order buying only one contract instead of 2 that would be open. I reaaly don't know what is wrong since the profit target for the order buy1 is working well but the second order was never been executed at the same time of the buy1 order.

    On the default properties page I already set the Entries per Direction to 1 and 2 none working. The entry handling option I already set All Entries and Unique Entries and no worked as well. I really don't know why the NT doen't buy 2 contrats when the conditions are true.

    lease someone could help me with that?

    Thank you in advance.

    Alexandre

    #2
    Hello Alexandre,

    Thanks for your post.

    You are correct that you would use separate signal names and would then need to change Entries Per Direction to allow for the additional entries.

    Something we have to keep in mind is that if we reload the NinjaScript with F5, we won't pass through State.SetDefaults, so it is possible the script is not loading those new settings. You could consider removing and re-adding the strategy to ensure State.SetDefaults is reached with your new defaults.

    I have also attached a working example for your comparison. Multi step breakevens are also demonstrated here.

    We look forward to assisting.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    19 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    119 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    63 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X