• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Open Multiple Simultaneous Trades?

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

    Open Multiple Simultaneous Trades?

    Is there a way to open multiple simultaneous trades in NinjaTrader? I have a strategy that pulls in multiple instruments using the ADD method, and I would like to be able to open multiple trades simultaneously. Is this possible?

    Code:
    protectedoverridevoid Initialize()
    {
    Add("GOOG", PeriodType.Day, 1);
    Add("EBAY", PeriodType.Day, 1);
     
    CalculateOnBarClose = true;
    }
    protectedoverridevoid OnBarUpdate()
    {
    if (SMA(Close,10)[0] > SMA(Close,50)[0] && SMA(Close,10)[1] < SMA(Close,50)[1])
    {
    EnterLong();
    }
    if (SMA(Close,10)[0] < SMA(Close,50)[0] && SMA(Close,10)[1] > SMA(Close,50)[1])
    {
    ExitLong();
    }
    }
    
    This is an example of the code I am using to open positions, and it is only allowing one open position at a time.

    Thanks

    #2
    I found something called "EntriesPerDirection" that I was able to set to some arbitrarily high number to remove the limit on the number of simultaneous open orders. This appears to have done the trick!

    Comment


      #3
      Correct, great. It goes 'hand in hand' with http://www.ninjatrader.com/support/h...=EntryHandling
      BertrandNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by mtamaku, Today, 04:48 PM
      0 responses
      3 views
      0 likes
      Last Post mtamaku
      by mtamaku
       
      Started by NickyD, Today, 04:00 PM
      0 responses
      5 views
      0 likes
      Last Post NickyD
      by NickyD
       
      Started by Binarytrader, Today, 03:54 PM
      0 responses
      5 views
      0 likes
      Last Post Binarytrader  
      Started by jjanguda, 05-19-2015, 01:13 PM
      15 responses
      1,376 views
      0 likes
      Last Post Eric M.
      by Eric M.
       
      Started by morrnel, Today, 01:13 PM
      1 response
      16 views
      0 likes
      Last Post NinjaTrader_Jim  
      Working...
      X