Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninja crashes with an strategy with multiple instruments

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

    Ninja crashes with an strategy with multiple instruments

    Hi,

    I was testing an strategy with two instruments and it always crashed when I used it on a chart while connected and also with history data.

    I suposed it was anything wrong in my code but after several tests and differents codes I can prove it's a problem with multiinstruments strategy and order handling problem of NT.

    Please try this two examples with a history chart (not strategy analizer) of not less than three months 5 minutes bars:

    1.- With only one instrument

    protected override void Initialize()
    {
    y=10;
    ExitOnClose=false;
    }


    protected override void OnBarUpdate()
    {
    if (y==x) {
    EnterLong(0, 1, "IN1." + counter);
    x=0;
    counter++;
    }
    x++;
    }

    and before running this strategy modify the parameter Entries per direction = 100, it works fine but:

    2.- try the same with:

    protected override void Initialize()
    {
    y=10;
    ExitOnClose=false;
    Add("YC 12-10", BarsPeriod.Id, BarsPeriod.Value);
    }


    protected override void OnBarUpdate()
    {
    if (BarsInProgress == 1) return;
    if (y==x) {
    EnterLong(0, 1, "IN1." + counter);
    EnterShort(1, 1, "IN2." + counter);
    x=0;
    counter++;
    }
    x++;
    }


    and before running this strategy modify the parameter Entries per direction = 100

    It crashes when running a new plotted bar (live)

    It seems there's an internal variable within NT that gets outbounded when trading with several instruments, could you test it?

    Thank you very much
    Last edited by joanNT; 01-13-2011, 05:25 AM.

    #2
    joanNT, thanks for providing your scenario here - I could reproduce on my end, we will look into matters.

    Thanks

    Comment


      #3
      joanNT - the YC 12-10 would not be tradable anymore - do you see the same issue when changing the added expiry to 03-11?

      Comment


        #4
        Hi Bertrand,

        Thanks for your reply, yes I've just tested again and as could you see on the attached image the instruments used are YW 03-11 and YC 03-11 (just look to the title bar on the error displayed image)
        Attached Files

        Comment


          #5
          Joan, thanks - could you please contact me via Help > Mail to Support and check to include your diagnostic trace / log files? Are you on NT7 R2 here?

          Comment


            #6
            Of course Bertrand, which is your email or may I send it to generic email support?

            Comment


              #7
              If you could email using Help > Mail to Support and put attn Bertrand in the subject would be great.

              Comment


                #8
                done, thank you.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                42 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                124 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                64 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                41 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                46 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X