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

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 Fitspressorest, Today, 01:38 PM
      0 responses
      2 views
      0 likes
      Last Post Fitspressorest  
      Started by Jonker, Today, 01:19 PM
      0 responses
      2 views
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      6 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,791 views
      0 likes
      Last Post aligator  
      Started by Jimmyk, 01-26-2018, 05:19 AM
      6 responses
      844 views
      0 likes
      Last Post emuns
      by emuns
       
      Working...
      X