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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 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
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X