Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volume, Ticks - what is what?

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

    Volume, Ticks - what is what?

    First: I'm looking the whole day (and night) for more informations - but i didn't find.

    For my understanding:
    volume = all shares per bar
    tick = is a trade, no matter how much shares

    Now i have a little Problem:
    I create an indicator (using OnMarketData() ) wich cumulates the upvolume and the downwolume per bar depending of bid and ask. Then i calculate the difference. The difference shold be smaller than the whole Volume of the bar. But.....
    Mu indicator shows values far greater than 10k (5 Minutes) and the standard NT-indicator oly shows values belov 10k.... Now is the question: what ist what?

    volume[0] = tick count of actual bar? or real volume (all shares traded on this bar)?
    e.volume = volume of last Tick, cumulated volume since begining of the bar, open interest, bid size ask size?????

    who brings light in my darkness?

    thank you.

    #2
    xenayoo, which instruments are you looking at while testing this? Since I'm not familier with your custom indicator code I could not comment on it and what exactly you arrived at in your calcs, but it might be helpful to print out the Volume[0] value with CalculateOnBarClose set to false (which updates this on each tick), then you can compare to the OnMarketData's volume output...

    Comment


      #3
      I work on ES with ZenFire.
      Here the core-code of my indicator:
      Code:
      protected override void OnBarUpdate()
      {
              // Use this method for calculating your indicator values. Assign a value to each
              // plot below by replacing 'Close[0]' with your own formula.
              if(FirstTickOfBar)
      	{
      		UpVolume = 0;
      		DownVolume = 0;
      	}
      	DeltaVolume = UpVolume + DownVolume;
              VolUp.Set(DeltaVolume > 0 ? DeltaVolume : 0);
              VolDown.Set(DeltaVolume < 0 ? DeltaVolume : 0);
      }
      protected override void OnMarketData(MarketDataEventArgs e)
      {
      	if(e.MarketDataType == MarketDataType.Ask)
      	{
      		UpVolume += (e.Volume);
      	}
      	if(e.MarketDataType == MarketDataType.Bid)
      	{
      		DownVolume -= (e.Volume); 	
      	}
      	LastVolume = e.Volume;
      }
      I want to cumulate real volume to UpVolume or Downvolume depending on if the last price = best did or best ask. I suppose, that i have to use something like
      Code:
      if(e.MarketDataType == MarketDataType.Last)
      but how do I differ the up-/down volume then? Yesterday i found a little codesnipped (with google) with 4 or 5 lines, but i didn't find it again.....
      Last edited by xenayoo; 02-23-2010, 09:03 AM.

      Comment


        #4
        xenayoo, thanks have you already looked at the BuySellVolume study we supply per default?



        You can review those sources in your NinjaScript editor...

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          xenayoo, thanks have you already looked at the BuySellVolume study we supply per default?



          You can review those sources in your NinjaScript editor...
          Thank you for that. Little Problem is: I can't print that study (Error, i have to close Ninja....). Anyway, I will look at this. Just a few little Questions:

          MarketDataType can be one of the listed values and these are the events wich can happen in datafeed.
          -Ask and Bid represents every change in the Ask and bid column in SuperDOM.
          -DailyHigh, -Low, -Volume represents what? (could it be that these events are not usable with Zenfire?)
          -Last represents represents the event of the last transaction tick
          -LastClose represents the close of the session (may be unusable with Zenfire?)

          Price represents the price of the last Tick
          Volume rpresents the Volume of the last Tick
          Time represents the Time of the last Tick.

          Is that right?

          Comment


            #6
            Hi there, you are mostly correct in your assumptions.

            The ask and bid represent the best bid and best ask, not the full price ladder.

            The DailyHigh property is simply the day's high price (I believe the time period for this is from midnight-midnight, not the exchange's close time). Same for DailyLow. DailyVolume is the cumulative volume for the day.

            Last is the price of the most recent transaction (tick). Lastly, the LastClose property is the prior session's close price.
            AustinNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            673 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            379 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            111 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            577 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            582 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X