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

EntriesPerDirection in unmanaged strategies

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

    EntriesPerDirection in unmanaged strategies

    Hello,

    I am developing a multi-instrument strategy that should be able to execute several orders in different instruments at the same time.

    I read posts that explain how to use EntriesPerDirection with managed orders but nothing related with unmanaged strategies.

    Is it posible to manage multiple simultaneous orders in unmanaged strategies? Do you have any sample?

    Thanks

    #2
    Hello guillembm,

    From my understanding you are correct; EntriesPerDirection and EntryHandling does not apply to unmanaged strategies.

    Included with NinjaTrader 7 are the SampleMultiInstrument and SampleMultiTimeFrame that demonstrate adding additional data series and using BarsInProgress to determine which series is processing.

    You can also specify which series you would like to place an order to by using the overload for the entry order that includes barsInProgress.
    For example:
    For example if an added series of AAPL is added, we can place an order to that barsInProgress even when the primary series is processing.

    In Initialize():
    Code:
    Add("AAPL", PeriodType.Minute, 1);
    In OnBarUpdate():
    Code:
    if (CurrentBars[0] < 1 || CurrentBars[1] < 1)
    {
    return;
    }
    
    if (BarsInProgress == 0)
    {
    SubmitOrder([B]1[/B], OrderAction.Buy, OrderType.Market, 1, 0, 0, string.Empty, string.Empty);
    }
    Image the chart is a MSFT chart. This would place an order to AAPL when the MSFT bar is closing.

    SubmitOrder(int barsInProgressIndex, OrderAction orderAction, OrderType orderType, int quantity, double limitPrice, double stopPrice, string ocoId, string signalName)

    Below are publicly available links to the help guide.



    Last edited by NinjaTrader_ChelseaB; 11-05-2017, 12:45 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks,

      this is more or less what I was asking for. I can conclude that in the unmanaged approach I need to specify nothing in Initialize() to be able to process several orders simultaneously.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kujista, Today, 05:44 AM
      0 responses
      6 views
      0 likes
      Last Post kujista
      by kujista
       
      Started by ZenCortexCLICK, Today, 04:58 AM
      0 responses
      9 views
      0 likes
      Last Post ZenCortexCLICK  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      172 responses
      2,281 views
      0 likes
      Last Post sidlercom80  
      Started by Irukandji, Yesterday, 02:53 AM
      2 responses
      18 views
      0 likes
      Last Post Irukandji  
      Started by adeelshahzad, Today, 03:54 AM
      0 responses
      11 views
      0 likes
      Last Post adeelshahzad  
      Working...
      X