Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SubmitOrderUnmanaged automatically unchecks itself

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

    SubmitOrderUnmanaged automatically unchecks itself

    Hi everyone,

    I am trying to use SubmitOrderUnmanaged and I guide with https://ninjatrader.com/support/help...orderunmanaged .htm

    but I dont know why it doesnt work it to me.

    I already have:
    • IsUnmanaged = true; → In setdefault
    • I am using Calculate.OnBarClose
    • Without multitimeframes, just normal way
    I am trying to use the simple syntax:

    SubmitOrderUnmanaged(int selectedBarsInProgress, OrderAction orderAction, OrderType orderType, int quantity)

    Code:
    protected override void OnBarUpdate()
    {
    if (isTrigger)
    {
    SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Market, 1, 0, 0, string.Empty, string.Empty);
    }

    When you should make the entry, the strategy is automatically unchecked and then the program makes a sound.​

    in the other hand, when I used this in the strategy, it works good

    Code:
    protected override void OnBarUpdate()
    {
    if (isTrigger)
    {
    /// Stop Loss
    double stopLossPrice = High[0] + StopLossTicks * TickSize;
    SetStopLoss(CalculationMode.Price, stopLossPrice);
    
    /// Entry
    EnterShort();
    }
    }

    My interest to use ​SubmitOrderUnmanaged is because I would like to have double SL using 1 entry... but when I use setstoploss X2 it doesnt work properly, I guess they plus each other

    When I try to use SubmitOrderUnmanaged to make SL, it doesnt work neither. For that reason first at all I am trying to make the simple way, with the simple syntax

    Thanks

    #2
    Hello FaaZer,

    Are there errors on the Log tab of the Control Center when enabling the strategy?
    If so, what is the full error message?

    "I already have: IsUnmanaged = true; → In setdefault"

    Try setting this in State.Configure.

    If you modify the defaults, you would need to remove the instance of the strategy from the chart or strategies tab of the control center and add a new instance to pull the new defaults.

    Below is a link to an example (ProfitChaseStopTrailUnmanagedExample) of an unmanaged strategy.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    80 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X