Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

reference time shifted + schedule limit order (DAY or GTC) orders

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

    reference time shifted + schedule limit order (DAY or GTC) orders

    Hi,

    I am trying for months to start an automatic trading system on Nasdaq stocks through IB (Interactive Brokers) platform.

    I'm currently testing a NinjaTrader strategy (with kinetick datas) which presents a big problem : when I backtest this strategy through NinjaTrader 7 with a real time Kinetic connexion, the result of the backtest under NinjaTrader 7 is NOT EQUAL to the result of the same NinjaTrader strategy with the same settings and the same real time Kinetic datas when connected with IB simulated account platform. I cannot understand why.

    There are a lot of questions that need answer...

    Can anybody help me to answer these 2 first questions :

    1) Data time : how can I FIX THE REAL MARKET HOURS in data history (and prevent their translation in french local time - I am a french man wanting to trade the US Market) ? ... if I move to another country under other time zone, all my history is false !

    2) Orders limits functions : what means GTC or DAY expiration, and NinjaTrader's corresponding documentation ?

    Thank you all in advance for your Help

    Hypsis

    #2
    Hello hypsis,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    When the results do not match, are you connecting to Interactive Brokers or Kinetick first?

    1. The time stamp of the bars at their close is going to be your PC time. To change this you need to change your PC's time. Changing the PC time and/or region should not effect the true time stamp of the bars as they will adjust to the new PC time appropriately. If this is not what you are seeing then please detail what is occurring.

    2. Time In Force is something that is universal and you will want to contact your broker for information on the Time In Force they support for the order types they support.
    In general, GTC means Good Til Cancel (meaning until you cancel the order) and DAY means the order is good until the close of the session.

    I look forward to your response.

    Comment


      #3
      Hello, Patrick
      Thank you for your quick and kind answer.
      All my connections begin by Kinetick first, then in a second time IB after waiting the little window Kinetick turn green

      Comment


        #4
        hypsis, thanks for the reply - then in this setup case all data would be coming from Kinetick. For the downloaded data we would not recommend shifting the timezone on the PC, if you need to - please download a fresh set of data and redo your cache.

        When comparing backtest results to realtime ones we generally would expect slight discrepancies, here's a page going over the more common reason why -



        The IB demo / paper account in particular in known to have random updates to a degree per our testing.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks for your answer, Bertrand.

          In the same range of problems, I have an error message that I find it difficult to understand :
          "Error on calling 'OnBarUpdate' method for strategy 'MercureV1r2Vente/868b79077a4942bf8dc250f6cfe76103': 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".
          Could you explain to me what it means exactly ?

          Comment


            #6
            Hi again, Bertrand
            My question concerns the "strategy activation colour code" : when a strategy is activated, the colour turns GREEN.
            But for reasons I don't understand, within a same instrument list, the strategy applied becomes sometimes WHITE or YELLOW, depending of the day and the instrument.
            Could you explain me what happens ?

            Comment


              #7
              Hi hypsis, for the log error you've seen on accessing an invalid bar index, I would highly suggest to read through this tip here - http://www.ninjatrader.com/support/f...ead.php?t=3170

              The various strategy state colors are explained here in our helpguide - https://www.ninjatrader.com/support/...egies_tab2.htm

              It's tied to how you start up the strategy in terms of managing a potential position the script would have coming from historical data.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Bertrand View Post
                Hi hypsis, for the log error you've seen on accessing an invalid bar index, I would highly suggest to read through this tip here - http://www.ninjatrader.com/support/f...ead.php?t=3170

                The various strategy state colors are explained here in our helpguide - www.ninjatrader.com/support/helpGuides/nt7/strategies_tab2.htm
                .
                hi,

                i've read these two sections but what if "accessing an invalid bar index" appairs only when i try to enable a strategy on few instruments (between 100) and in the same time this strategy refuse to be enabled (stay in white) on these few instruments ?

                thank

                Comment


                  #9
                  How much data do you load for those instruments? If they don't enable correctly, I would look to increase the loaded data range to ensure the BarsRequired could be fulfilled for all series.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Bertrand View Post
                    How much data do you load for those instruments? If they don't enable correctly, I would look to increase the loaded data range to ensure the BarsRequired could be fulfilled for all series.
                    hello bertrand,

                    i need :
                    - 1 bar in one minute serie
                    - 1 bar in five minutes serie
                    - 50 bars in day serie

                    in DaytoLoad parameter, i put 55
                    in BarsRequired parameter, i put 5

                    is it correct ?

                    thanks

                    Comment


                      #11
                      hypsis, the DaysToLoad would not be based on business / trading days, but calendar days so if you need 50 day bars > I would increase it to makeup for the weekends.
                      BertrandNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by algospoke, Yesterday, 06:40 PM
                      2 responses
                      19 views
                      0 likes
                      Last Post algospoke  
                      Started by ghoul, Today, 06:02 PM
                      3 responses
                      14 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      44 views
                      0 likes
                      Last Post jeronymite  
                      Started by Barry Milan, Yesterday, 10:35 PM
                      7 responses
                      20 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      10 responses
                      180 views
                      0 likes
                      Last Post jeronymite  
                      Working...
                      X