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
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by frankthearm, Yesterday, 09:08 AM
    14 responses
    47 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by gentlebenthebear, Today, 01:30 AM
    2 responses
    13 views
    0 likes
    Last Post gentlebenthebear  
    Started by Kaledus, Today, 01:29 PM
    2 responses
    8 views
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by PaulMohn, Today, 12:36 PM
    2 responses
    16 views
    0 likes
    Last Post PaulMohn  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    2 responses
    56 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Working...
    X