Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Duplicate CurrentBar values on volume chart

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

    Duplicate CurrentBar values on volume chart

    I am working on a volume based chart (ES 03-09, 2000Vol, 12/17/2008)

    NOTE: See attached picture for reference.

    When there is more than 2000 contracts on 1 bar, the chart shows me
    multiple horizontal dashes. That makes sense.
    However, in my indicator, I printed out the date/time and CurrentBar #
    and I am seeing the same bar number being used for multiple bars on the
    chart.
    The print output below shows the CurrentBar value is 1289 for the
    bar ending at 8:52:15 and then there are two more bars, (presumably
    due to the high volume at this time) that have times 8:52:16 and 8:52:17.
    The problem is that Ninja draws two extra bars (OHLC is all same price) but
    they both have the same CurrentBar value: 1289.
    This does not seem right because each bar on the chart is supposed to
    have a unique bar number.

    I use IB as my data feed.

    Here is the print output:

    20081217:85215, [ES,Volume,2000], 1289
    20081217:85215, [ES,Volume,2000], 1289
    20081217:85215, [ES,Volume,2000], 1289
    20081217:85215, [ES,Volume,2000], 1289
    20081217:85215, [ES,Volume,2000], 1289
    20081217:85215, [ES,Volume,2000], 1289
    20081217:85216, [ES,Volume,2000], 1289
    20081217:85216, [ES,Volume,2000], 1289
    20081217:85216, [ES,Volume,2000], 1289
    20081217:85216, [ES,Volume,2000], 1289
    20081217:85216, [ES,Volume,2000], 1289
    20081217:85216, [ES,Volume,2000], 1289
    20081217:85217, [ES,Volume,2000], 1289
    20081217:85217, [ES,Volume,2000], 1289
    20081217:85217, [ES,Volume,2000], 1289
    20081217:85217, [ES,Volume,2000], 1289
    20081217:85217, [ES,Volume,2000], 1289

    What do you think?
    -Gary
    Attached Files

    #2
    Hi Gary, I would suggest you synch your PC clock and see if this issue persists...Thanks!
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Synch clock to what?

      What do you mean synchronize my clock?
      My clock gets synchronized with an internet time server regularly.

      BTW, this issue did not appear in real time.

      It does show up when in replay mode and the indicator gets called every tick.

      This is easy to recreate. I am attaching code.
      All you have to do is replay a volume chart on ES where the volume bar interval is low enough that every once in a while more volume than that amount occurs at once.
      Attached Files

      Comment


        #4
        Hi Gary, yes I meant synching up your PC clock - thanks for posting the test code, I will try to reproduce it here and let you know.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi Gary, I could not reproduce this behavior on 100 volume ES 03-09 chart - do you have a lot of load on your PC while testing this? Can you try a different datafeed? Or performance tips can reviewed here - http://www.ninjatrader-support.com/H...anceTips1.html
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Not much load - typically less than 20%.

            Did you retry in replay mode? That is when it shows up for me.


            BTW, the reason I know that something is fishy is because I have a
            different indicator that calls DrawLine(CurrentBar.ToString(),...).
            During these volume anomalies, since the indicator uses the CurrentBar
            technique to identify each line, the panel it draws on has a blank spot
            at those points. When the CurrentBar value is the same as previous bars,
            it is redrawing previous bars even though the Ninja has moved on to create
            new bars up in the price panel.

            Comment


              #7
              Just tried on a Market Replay and still can't reproduce. Please try resetting and repairing your database and using a fresh replay file.

              Code:
              20081126:134008, [YM,Volume,100], CurrentBar=8275, O=8699, H=8700,L=8699, C=8700, Vol=100
              20081126:134008, [YM,Volume,100], CurrentBar=8276, O=8700, H=8700,L=8700, C=8700, Vol=100
              20081126:134008, [YM,Volume,100], CurrentBar=8277, O=8700, H=8700,L=8700, C=8700, Vol=100
              20081126:134008, [YM,Volume,100], CurrentBar=8278, O=8700, H=8705,L=8700, C=8705, Vol=100
              20081126:134008, [YM,Volume,100], CurrentBar=8279, O=8705, H=8705,L=8697, C=8697, Vol=100
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by kujista, Today, 06:23 AM
              0 responses
              1 view
              0 likes
              Last Post kujista
              by kujista
               
              Started by traderqz, Yesterday, 04:32 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by f.saeidi, Today, 05:56 AM
              1 response
              4 views
              0 likes
              Last Post Jltarrau  
              Started by Jltarrau, Today, 05:57 AM
              0 responses
              4 views
              0 likes
              Last Post Jltarrau  
              Started by Stanfillirenfro, Yesterday, 09:19 AM
              7 responses
              52 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X