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 elirion, Today, 01:36 AM
      0 responses
      3 views
      0 likes
      Last Post elirion
      by elirion
       
      Started by gentlebenthebear, Today, 01:30 AM
      0 responses
      4 views
      0 likes
      Last Post gentlebenthebear  
      Started by samish18, Yesterday, 08:31 AM
      2 responses
      9 views
      0 likes
      Last Post elirion
      by elirion
       
      Started by Mestor, 03-10-2023, 01:50 AM
      16 responses
      391 views
      0 likes
      Last Post z.franck  
      Started by rtwave, 04-12-2024, 09:30 AM
      4 responses
      34 views
      0 likes
      Last Post rtwave
      by rtwave
       
      Working...
      X