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 NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X