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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X