Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator values for non-daily bars not consistent with daily bars?

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

    indicator values for non-daily bars not consistent with daily bars?

    Please give me your comments and thoughts on the following before I spend more time researching it.

    It appears [not absolutely sure yet] that indicator values for my non-daily bars are not consistent with those for daily bars.
    I am analyzing the Forex euro dollar/us dollar pair, five daily bars per week. I use “Bars.GetDayBar” in calculations for non-daily bars.

    Output window messages suggest that maybe indicator calculations for non-daily bars are not based on a five day week???

    #2
    Hello joemiller,

    Thanks for your post.

    It may be easier to demonstrate this.

    May I have the code you are using as well as the output from the output window?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      Attached are the indictor, strategy, day bar output and 6 hour bar output.
      I will continue to work on this and will alert you If I discover anything.
      Attached Files

      Comment


        #4

        Chelsea,
        Hold off on looking at the items I sent in the previous post. The Analyzer session template was not set to Default 24/5. However, setting the template to the correct value did not fix the problem, the original problem still exists [ie] a discrepancy between daily and non-daily bar indicators.
        I am trying to pretty up the printout to the output window just a bit to make it more user friendly and then will resend all the now useless files sent in the previous post.

        Comment


          #5
          The output windows show that Forex 6 hour bars are coming out 0000, 0600, 1200 and 1800 but they should be 1700, 2300, 0500 and 1100 and Mondays are not appearing in the file?

          Weekdays appearing in the day bar output file are making even less sense?
          Attached Files

          Comment


            #6
            Hello joemiller,

            Thank you for the files.

            I have opened a chart to the $EURUSD instrument using the Default 24/5 session and 360 minute bars.

            This chart shows the bars as ending at 6, 12, 18, and 24 hours.

            If the session break is at midnight 6 hours later would be 6:00 AM. Is there something in this code that should be causing the first bar to print at 5:00 AM instead of 6:00 AM?

            Is your PC time zone set to central time instead of eastern time?

            Also, regarding the day bars, using the default 24/5 template in the eastern time zone, the bars end at 24:00 causing the bars to show have the date of the next day. This causes my chart to show bars with dates tuesday - saturday.

            I am not seeing anything in the code that would prevent prints from happening during weekdays.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              best I can remember, the 0000, 0600, 1200, 1800/1700, 2300, 0500, 1100 issue did not appear until this last go-round. as you know, I'm sure, the forex day starts at 5:15pm in my eastern time zone, ending at 5pm the next day. Monday is defined as Sunday, 1715 to Monday 1700. I was pleased and impressed that NT therefore was giving me those kind of hourly bars until I sent stuff to you. I may have screwed up some code and/or controls somewhere? I will restore to my old files and run them again to check on my memory of the situation [ie] whether I was being presented with a day whose first bar was 1700 hours instead of midnight.

              However, I believe what I just sent to you demonstrates the indicator plot discrepancy.

              I made the bars 6 hours rather than 1 hour or 1 minute for ease of outlook file comparison.


              Comment


                #8
                Hello joemiller,

                The hours an instrument is open (and the session break time) is controlled by the session template.

                If you are using the Default 24/5 template, the session will begin and end at 24:00 and not 17:15.

                Please let me know which instrument you are using and which session template you have selected.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  thanks Chelsea.

                  Is there only one five day template [ie] is there a special one for the Forex or is that the only one I can use to filter out weekends for the Forex ?

                  Comment


                    #10
                    Hi joemiller,

                    There is Forex template that trades Sun - Thurs, 5PM - 5PM.

                    You can also create a custom session template with the days and hours you specify.

                    Please take a look at this tutorial video.
                    http://www.ninjatrader.com/support/m...n-Template.htm

                    Also, here is a link to the help guide on the Session Manager.
                    http://www.ninjatrader.com/support/h...on_manager.htm
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      The session template is now correctly specified to be ‘Forex’, as it formerly was before I created all this confusion.

                      Attached are indicator and strategy files and two output window files - one for Daily bars and one for 6 hour bars.
                      Output window file comparison demonstrates, I think, that indicator calculations for non-daily bars are not the same as for daily bars?
                      Attached Files

                      Comment


                        #12
                        Hi joemiller,

                        I can confirm the redlineTomorrow is different for the daily at 5:00 PM on 5/8 (1.2905) and the 6 hour at 5:00 PM on 5/8 (1.3101).

                        I recommend you print the values of all variables you are using on the indicator to see which value is different.

                        Also, be sure the get bar call is returning the same bar.

                        Let me know if you are able to track down where they are different.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          The Time frame Session template field is not present in the Strategy Analyzer Backtest slide out control panel for day bars. Could that possibly have any significance in the indicator discrepancies I am seeing for day bars vs minute bars? Like maybe time 0000 is used for day bar calculations and time 1700 for minute bars?
                          Last edited by joemiller; 08-06-2013, 05:34 PM.

                          Comment


                            #14
                            Hello joemiller,

                            Day bars are pre-shaped by the broker and have the instrument's session template forced applied. This cannot be overridden.

                            Instead, using 1440 minute bars is a substitute for allowing the session template to be changed and still have a "day" bar.

                            If you are using the Forex template with a day bar, this should start and end at 17:00.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Thanks Chelsea,
                              I am busily coding debug statements... what fun it is.

                              If doable, how can I make the value of an indicator appear in the Data Box?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              81 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              46 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              29 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              32 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              66 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X