Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars.FirstBarOfSession opening price 1 min vs 1000 volume charts

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

    Bars.FirstBarOfSession opening price 1 min vs 1000 volume charts

    I put the following code in a 1 min chart and a 1000 vol chart. See attached screenshot showing an open of 12230 in the 1 min chart on the left and 12228 in the volume chart on the right. Both charts use the same template with 9:30 9:30 session times

    I use the code to pick up the session opening price...which needs to be exactly the same in both intervals. I get the prices shown in the screenshot instead.

    Shouldn't FirstBarOfSession give the same open regardless of minute or volume chart?

    if ( Bars.FirstBarOfSession ) {
    openingPrice = Open[0];
    Print ("volume chart....Open[0] = "+Open[0]);
    }
    Attached Files

    #2
    Not necessarily when you use Volume charts. It depends on how the prior data's volume stacks up. Try it with a "blank" chart. Blank as in no prior sessions; just the single day you want to view. In that scenario you should have the exact same number.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh

      How can I replay a chart with no data prior to 9:30? And when will that ever occur in real time?

      Tried a blank chart in replay with no prior day however with data prior to 9:30 and same problem...i.e. 12228 instead of 12230. It seems to be a compromise with volume charts.

      I could add a 1 min interval series to the strategy and pickup the open that way; however, it seems to me that at 9:30:01 the chart should start/reset with 0 volume and plot a new bar...i.e. not wait until it has 1000 volume in the last bar of the prior session. Otherwise there can be a large error....since in low volume the open will not occur until much later than 9:30:01

      Comment


        #4
        This is the nature of volume charts. If you limit the session begin/end time it will effectively filter out the data before and after and not include it. If there are still discrepancies it could be attributed to different data server feeds. e.g. data provider may be supplying you on a different server for volume as opposed to the minute data.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          ok...thanks Josh

          I added a 1 min period to the strategy to pickup the open correctly when I run it in a vol chart

          works fine...and i can leave the session times at 9:30 AM 9:30 AM

          your suggestion works fine for charts with 9:30AM to 4:00PM or 9:30 AM to 9:29 AM...i.e. same open as a 1 min chart 12230....since I do not know what session times users will run, i will use the 1 min period code workaround

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by dibDab, Today, 07:33 AM
          0 responses
          2 views
          0 likes
          Last Post dibDab
          by dibDab
           
          Started by hamdan, Yesterday, 05:57 PM
          2 responses
          37 views
          0 likes
          Last Post hamdan
          by hamdan
           
          Started by NIncash, 09-21-2022, 02:20 PM
          3 responses
          36 views
          0 likes
          Last Post NIncash
          by NIncash
           
          Started by brenthilburn, Today, 06:19 AM
          0 responses
          6 views
          0 likes
          Last Post brenthilburn  
          Started by Atlant, Yesterday, 06:26 AM
          2 responses
          12 views
          0 likes
          Last Post Atlant
          by Atlant
           
          Working...
          X