Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by itrader46, Today, 10:22 AM
    0 responses
    3 views
    0 likes
    Last Post itrader46  
    Started by NM_eFe, Today, 10:13 AM
    0 responses
    2 views
    0 likes
    Last Post NM_eFe
    by NM_eFe
     
    Started by hdge4u, Yesterday, 12:23 PM
    1 response
    10 views
    0 likes
    Last Post hdge4u
    by hdge4u
     
    Started by 1001111, Today, 09:45 AM
    0 responses
    4 views
    0 likes
    Last Post 1001111
    by 1001111
     
    Started by DTSSTS, 01-28-2024, 12:07 PM
    11 responses
    558 views
    0 likes
    Last Post bmo111
    by bmo111
     
    Working...
    X