Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MultiBar and Orders

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

    MultiBar and Orders

    Hello

    I have a multibar Strategy running on FDAX 12-10. And am getting orders sent by the base bar cancelled by the slower bars.
    I've written a very basic strategy to isolate the problem.

    I've read the documentation and don't quite understand why this is happening.

    Very basic strat :
    Code:
     protected override void Initialize()
            {
                 CalculateOnBarClose = true;
    			Add(PeriodType.Minute,5);
    			TraceOrders=true;
            }
    
            protected override void OnBarUpdate()
            {
    			
    		
    			
    			if(BarsInProgress != 0) 
    			return;
    			
    			if(Position.Quantity > 0)
    			{
    				ExitLongLimit(Position.AvgPrice+10);
    			}
    			else
    				EnterLong(1);
    			
            }
    This is running on FDAX 12-10 1minute bar.

    The target order is sent at the bar, and every 5minute bar the order is cancelled !

    #2
    Hello zark.be,

    The order is canceled because of the multiseries context. Since you are returning out when BIP != 0, this order is canceled every 5 minutes and then resubmitted the following bar. If you want to keep the order alive, you can remove this return statement. ExitLongLimit condition will be submitted then within Bip = 1 context.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      In my real strategy, i only need those data for various Indicators that i reference.
      Is there another way of doing it ?

      I'd like to avoid running my strat with anything other than Bip O for various reasons

      Comment


        #4
        You could also let your strategy orders run with liveUntilCancelled set to true - this would mean they persist past the OnBarUpdate() expirations you ran into - http://www.ninjatrader-support.com/H...LongLimit.html

        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
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 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