Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Order not working

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

    Unmanaged Order not working

    When I add the following line to this code my order doesn't get submitted. Why does this happen?
    Code:
    
    if (CrossAbove(Close,emaFast,1))  ///<---this section here
     {
                    if (longEntry == null)  
                    {                  
                            SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Limit, 1, High[0]+2*TickSize,0, oco, "Long limit entry");
                    }
    }​
    If I simply remove it the order does submit fine.

    #2
    Hello r3n3v,

    If you add that condition and the order is not submitted that means the condition didn't become true. You would need to use prints to better understand what values the cross condition is seeing to get an idea of why that wasn't true.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    46 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X