Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT ver.7 /Interactive Brokers FX session times wrong

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

    NT ver.7 /Interactive Brokers FX session times wrong

    Hi,

    I am comparing the IB chart for an FX pair with the NT chart using the 'Forex' session template. Times set it in are as specified by IB for their FX.

    However when i use this template to generate NT charts, it has big gaps and appears incorrect.
    When I use the NT '24/7' session template, I see the data.

    Please advise how to correctly set the 'Forex' template,
    Thanks

    #2
    Our Forex session template would cover times from 5PM EST Sunday to Friday 5 PM EST - which are the official FX spot session times - you could customize the template according to your needs or create a different one via Tools > Session Manager.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      I agree that these are the correct FX session times specified in the 'Forex' template.
      However, please pull up 2 AUDJPY charts. one with the NT 'Forex' session template and one with the 'Default 24/7 'session.

      I am seeing gaps in the 'Forex' session data where there should be prices. I should be getting data from 5pm Sun-5pmFri

      My pc clock is set to Exchange time and my IB TWS is correctly configured.
      NT7 is the only application that is giving me this nonsensical price series.

      Thanks and regards

      Comment


        #4
        I'll check into here, when exactly are you seeing the gaps on your charts?

        Have you tried with a cleaned up cache (just empty those subfolders with NT7 being closed down - MyDocuments\NinjaTrader 7\db\cache).
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi Bertrand,

          Restarting Ninja seems to have resolved the gaps for the 'Forex' session chart.
          Obviously, I it is easier to see these error with only 5days of lookback. Is there any way of verifying the integrity of say 6mths of 1 min data? If i was to backtest with these gaps in my data present my results would be completely erroneous.
          IB data even without the process of loading into NT persistent store is of questionable quality.
          Can you recommend an alternative data source for high granularity intraday data?

          Thanks

          Comment


            #6
            Great to hear this resolved the gap issues for you - our preferred 3rd party datasource for NT7 would be Kinetick - www.kinetick.com
            BertrandNinjaTrader Customer Service

            Comment


              #7
              On the subject of Multi timeframe, I have a 1min strategy with secondary Daily Bar series.
              At the start of a new Daily session(5.01pm), I want to reset variables.


              Add(PeriodType.Day, 1);
              if (BarsInProgress == 1)
              {
              //reset variables here
              }

              Doesn't seem to work.

              Is the only alternative to run a check on each minute bar?

              Thanks

              Comment


                #8
                Yes, you would need to reset on the finer series to 'catch' the 5:01 timestamp.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Using the following hardcoded test is obviously not good practice
                  if (Times[0].ToString().Contains("5:16:00 PM"))

                  Is there a way to request the the start time of the named session from within ninjascript?

                  Thanks

                  Comment


                    #10
                    Yes, you could access the session begin and end times via NinjaScript for NT7 -

                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks, I'm using the Bars.FirstBarOfSession test

                      A question about Backtesting vs Realtime:-
                      For backtesting , I generate levels at start of session, set (OnBarClose = true) then test whether High of minute Bar>=level.
                      This is obviously satisfactory for backtesting but for live I would want to enter at market at first tick touch at or above the level. Aside from the increased CPU usage what other issues might I have by setting the OnBarClose = false

                      Alternatives might be setting/re-setting limit orders when new level targets are regenerated but i would prefer avoiding amending orders.

                      Thanks again

                      Comment


                        #12
                        Ok, good - correct the CPU load would be heavier in this case, you also should keep in mind that if you reference indicators in your script they should not contain any CalculateOnBarClose setting in their Initialize(), you would want to set this solely from the calling strategy.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          so for example, if I had a 1 minute strategy that referenced the ATR of a secondary Daily Bar Series:-
                          Add(PeriodType.Day, 1);
                          double DailyATR = ATR(BarsArray[1],atrLookback)[1];
                          double lastDailyClose = Closes[1][0];

                          where i wanted to check if the intraday tick/price had touched the lastDailyClose+DailyATR

                          and where the daily bars and reciprocal indicators are required to calculate onBarClose=true to give values at the end of each completed daily session.

                          Is there a way to allow just the primary Bar Series to be evaluated onBarClose=false?

                          Thanks

                          Comment


                            #14
                            You would have to set your CalculateOnBarClose setting to false and then in the BarsInProgress setting that you do not wish to have it calculated via a false setting you would add logic to filter it so you only process the closing ticks.

                            Code:
                            if (BarsInProgress == 1 && FirstTickOfBar)
                            {
                                 /* Do something. Note that the FirstTickOfBar is the same event as the closing of the bar. When using this method you need to offset the [] indexing back one to the bar that just closed otherwise you will be accessing the new bar. So [0] should be [1] to get the bar that just closed. */
                            }
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Hi Josh,

                              Attached is a basic test strategy.

                              I want to run it against 1 minute FX data with 'Forex' session template times(start/end@5pmEST).
                              Stop-In is the previous Daily Close + Daily ATR(50).

                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:35:00 PM, DailyATR=0
                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:36:00 PM, DailyATR=0
                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:37:00 PM, DailyATR=0
                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:38:00 PM, DailyATR=0
                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:39:00 PM, DailyATR=0
                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:40:00 PM, DailyATR=0
                              lastDailyClose(0) at 10/11/2010 5:00:00 PM, MinuteBarTime=10/12/2010 2:41:00 PM, DailyATR=0

                              I'm obviously missing something important.

                              Thanks and regards
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by funk10101, Today, 09:43 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post funk10101  
                              Started by pkefal, 04-11-2024, 07:39 AM
                              11 responses
                              37 views
                              0 likes
                              Last Post jeronymite  
                              Started by bill2023, Yesterday, 08:51 AM
                              8 responses
                              44 views
                              0 likes
                              Last Post bill2023  
                              Started by yertle, Today, 08:38 AM
                              6 responses
                              26 views
                              0 likes
                              Last Post ryjoga
                              by ryjoga
                               
                              Started by algospoke, Yesterday, 06:40 PM
                              2 responses
                              24 views
                              0 likes
                              Last Post algospoke  
                              Working...
                              X