Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Erratic behaviour on some contracts

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

    Erratic behaviour on some contracts

    Dear Ninja Support,

    I am running without any issues a strategy on FDAX contract with a Zenfire/Mirrus Feed/Broker. Smulation is OK too.

    Globally the strategy places and moves long/short limit orders in same time. For that I am using unmanaged order handling.

    Everything is OK for the FDAX as an exeple. But if we choose the CAC40 on Matif we get several issues:
    - no orders placed in real time with Mirrus/Zenfire connection (only historical processing at the launch of the strategy but filtered out by my code)
    - orders appear with a simulation connextion instead of Mirrus but strategy does not move limit orders anymore

    In my code, I do not use any contract specific lines. I use TickSize as a measure of distance and they are the same for the FDAX and CAC.

    We get the same problem with the 6E on Globex.

    Would hou have any clues about what happens here.

    Thanks and Regards.

    #2
    AlgoNaute, it would be great if you could forward me your trace / log files via the Help > Mail to Support option in NT (Attn Bertrand), it would then check them for any insight.

    Do you get realtime data normally for your live connection and can you please try placing a manual limit order off the market so it would not fill but could be placed just for testing sakes - would this work without issue on your end?

    On which NT version and build are you working? Help > About would be the place to find out.

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks fr the assistance.

      Do you get realtime data normally for your live connection
      Yes

      and can you please try placing a manual limit order off the market so it would not fill but could be placed just for testing sakes
      It works. The strategy does not place orders because it does not receive real time OnBarUpdate. I filter out the history updates.

      - would this work without issue on your end?
      I test on a demo account so no problems.

      On which NT version and build are you working? Help > About would be the place to find out.
      Ninja 7.4. Last version up to date.

      I'll send the logs in a minute.

      Comment


        #4
        Thanks for the files and reply - I see a few issues:

        29/04/2011 00:19:41|3|128|Error on calling 'OnBarUpdate' method for strategy 'xxx/08a9e1e51b114b7db68786cccc17e80c': You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

        >> this would need to be checking in your code

        Next: for the 6E please use the 06-11 contract, not the 05-11 -> this would not exist.

        As I looked through your logs - I saw you always execute on the Sim101 account - if you would like to trade on the live account to your broker you would need to uncheck Global Sim Mode in the File menu then start the actual strategy instance on the selected live account (account dropdown when you start it up).
        Last edited by NinjaTrader_Bertrand; 04-29-2011, 06:50 AM.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks.

          My doubts are that I am using the following code;

          Code:
           protected override void OnBarUpdate()
                  {
                      try
                      {               
                          // Only run on real-time data
                          if (!modeBacktest && Historical) return;
                         //Print("real time data");
          I never get the print for this contract and though the error you spot needs solving, I do not see how it impacts our problem. But I''l fix it first.

          Comment


            #6
            Is this a Multi or Single series strategy you're working with?

            I feel you never see it printing for those contracts as the OnBarUpdate() is not called as there are to less bars on the series available to satisfy MinBarsRequired.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              In my init, I have a "Add(PeriodType.Tick, 1);" but I backtest and run on tick generally.

              Would it explain why it does not go through with Mirrus connexion and does for SImulation? Same problem if I put 1 as the minimum number of bars required.

              Comment


                #8
                No, with BarsRequired set this low it should run - my comment was geared towards the situation where a too high BarsRequired is not satisfied for all series involved in the script and hence OnBarUpdate() not called. The simulated feed does not have any history so it would work on the incoming realtime data only, so I think we're dealing with a data issue here - do you run from the chart directly or from the strategies tab?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  So it is working for 6E, FDAX but not for CAC with same strat and same parameters. Yes it is probably a data issue.

                  I am running from strategy tab. But when I launch it from the graph, I realize that it works...

                  Comment


                    #10
                    Ok, good to hear about the progress - are you sure you use the same parameters then, like DaysToLoad, Session template and BarsRequired?
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by habeebft, Today, 07:27 AM
                    1 response
                    11 views
                    0 likes
                    Last Post NinjaTrader_ChristopherS  
                    Started by AveryFlynn, Today, 04:57 AM
                    1 response
                    11 views
                    0 likes
                    Last Post NinjaTrader_Erick  
                    Started by Max238, Today, 01:28 AM
                    4 responses
                    37 views
                    0 likes
                    Last Post Max238
                    by Max238
                     
                    Started by r68cervera, Today, 05:29 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by geddyisodin, Today, 05:20 AM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Working...
                    X