Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Testing OHLC, pivots and session breaks

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

    #46
    Got it, thanks. We'll look into.

    Comment


      #47
      Some suggestions for the Pivot Indicator

      Thanks again for the new Pivots Indicator which is really useful. After checking it I have a few suggestions - maybe not all of them are correct as I am just a C#/NinjaScript beginner. All points refer to the CalcfromIntraDayData mode:

      - False Pivots returned - Line 104: What does dailyBars.GetBar(Time[0].AddSeconds(-1).Date)) return, if Time[0] is on a Saturday or Sunday? This can easily happen on intraday charts. False values for Pivots disappeared after I had added a condition that excluded Saturdays and Sundays. What about holidays?

      - The Narrow Lines Monday Problem - Line 109: Monday pivots can be calculated from Saturday or Sunday data. To make sure that Monday pivots are always calculated from Friday intraday data I added “&& Time[0].AddSeconds(-1).Date != currentDate && marketTime.Date.DayOfWeek != DayOfWeek.Saturday & currentDate.DayOfWeek != DayOfWeek.Sunday” in the Daily Line.

      - Test for historical backfill - Line 113: firstPeriod condition of previous indicator version should be maintained for CalcfromIntraDayData to prevent calculation of false Pivots if historical data is insufficient.

      - RoundUpTimeToPeriodTime - Line 290: Would “if (pivotRange == PivotRange.Weekly) return time.AddDays(6 - Convert.ToInt16(time.DayOfWeek)).Date;” work as well?

      Comment


        #48
        Hi Harry !

        1) False Pivots returned
        This assignment is not used, when type is CalcFromIntraDayData, because existsDailyData can only be true for DailyData, and when there are >= 1 bar.

        But you may be right for type DailyData. I'll look into that.

        2) The Narrow Lines Monday Problem
        In chart properties, you can set the ExcludeWeekend property to true. This resolves the Satday & Sunday problem.

        3) Test for historical backfill
        Sorry, don't know what you mean with 'firstPeriod condition. And in which version ?

        4) RoundUpTimeToPeriodTime
        Unfortunately we can not comment on the correct of your code. We suggest using our code if you want to be sure.

        Thanks for your feedback,
        Christian
        ChristianSenior Software Developer

        Comment


          #49
          Hi Christian,

          (1) Of course, only for DailyBars method.

          (2) You would not want to exclude week-end data,
          - because for ES/ER2 etc. the Sunday afternoon session is part of the normal Monday session
          - if you are located further East (depends on your local time zone) the Friday evening session might leak into Saturday

          (3) Can't find it either. haven't collected the version. When Pivots are calculated form IntraDayData the first calculation of Pivots would yield false values, because calculated from incomplete period. For example if you have intraday backfill going back for 2 months until mid-december, monthly pivots should show up only from February 1, but not January 1. This problem is only specific to CalcfromIntradayData, does not occur with DailyBars...

          But again congratulations for the DailyBars method. That did solve my problem - and I do not need other charting software to check Pivots, I feel safe with NT now!

          Comment


            #50
            Hi Harry !

            1) We changed the implementation, so that on missing daily data, the data from the last valid day backwards is taken.

            Kind regards and thanks,
            Christian
            ChristianSenior Software Developer

            Comment


              #51
              Originally posted by Harry View Post
              Dierk, I have a live account with IB. You cannot connect to IB live accounts during the week-end before Sunday 12 pm ET.

              I am also using a simulation account that I created within my live account and which I use for testing. Live and simulation account have the same market data.


              Hi Harry,

              does this mean you are able to download historical data from IB during weekends? Could you please explain how you created this simulation account at IB? Thanks in advance.

              Comment


                #52
                Hi Joerg,

                you can usually download historical data from IB on Sundays after 6 PM Central European Time. To create a simulation account, go to account mananagement of your live account, login and then select Trading Access -> Paper Trading.

                Comment


                  #53
                  NT does not support IB paper trading account since TWS has some issues there.

                  Comment


                    #54
                    DailyBars option of NT 6.5.10 Pivot Indicator

                    NT occasionally hangs, when I am setting the Pivot indicator (modified version) to DailyBars. I just saw that the latest version of the NT pivot indicator has been modified. Here is my question: If intradayBarTime (line 111) is a Sunday or Holiday (may happen because local PC time would be different from exchange time), what would be the value for dailyBar (line 112)?

                    Comment


                      #55
                      Hi Harry !

                      1) Can you please send me (christian AT ninjatrader DOT com) your 'Logs and Traces' via the Mail to support function, and point me to a timestamp, where one of these hangups occured ?

                      2) Do you recall the steps you did, when this happened ? Or better, can you provide me with a reproducable scenario ?

                      3) To your question: the if block starting with line 114-122 will make sure, that the right dailyBar is used here. This will be the last day for which a daily bar is set.

                      Kind regards,
                      Christian
                      Last edited by NinjaTrader_Christian; 03-27-2008, 08:20 AM. Reason: send too fast
                      ChristianSenior Software Developer

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by yertle, Yesterday, 08:38 AM
                      7 responses
                      28 views
                      0 likes
                      Last Post yertle
                      by yertle
                       
                      Started by bmartz, 03-12-2024, 06:12 AM
                      2 responses
                      21 views
                      0 likes
                      Last Post bmartz
                      by bmartz
                       
                      Started by funk10101, Today, 12:02 AM
                      0 responses
                      5 views
                      0 likes
                      Last Post funk10101  
                      Started by gravdigaz6, Yesterday, 11:40 PM
                      1 response
                      9 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by MarianApalaghiei, Yesterday, 10:49 PM
                      3 responses
                      11 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Working...
                      X