Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multi-instrument strat only executing first of two longs

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

    multi-instrument strat only executing first of two longs

    I have a 5-minute chart with FAS as the primary data series, and ES 06-13 as the secondary series. The idea is to develop a strategy that takes a long on both FAS and ES if certain conditions are met.

    In addition to the two data series on the chart, the strategy also has this line in the initialize section:
    Add("ES 06-13", PeriodType.Minute, 5);

    When I run the strategy, I'm only getting a long order for FAS (the primary).

    Here the relevant snippet within the OnBarUpdate:

    if (BarsInProgress == 0
    && ToTime(Time[0]) >= TimeStart
    && ToTime(Time[
    0]) <= TimeEnd
    etc...)
    {
    EnterLong(
    0, 200, "enterLongFAS"); //this executes OK
    EnterLong(
    1, 1, "enterLongES"); //this does NOT execute
    }

    Any help is appreciated... thanks!
    Last edited by rrasche98; 05-07-2013, 02:28 PM.

    #2
    Hello rrasche98,

    Thank you for your note.

    This is likely due to the EntryHandling used for the Strategy.

    Please set the following in your Initialize() method and advise if this resolves the matter:
    Code:
    			EntriesPerDirection = 1;
    			EntryHandling = EntryHandling.UniqueEntries;
    For information on EntryHandling please visit the following link: http://www.ninjatrader.com/support/h...ryhandling.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      That worked. Awesome! Thanks for the lightning quick response.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      60 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X