Jump to content
Medved Trader Forums

Volume BUG

Recommended Posts

When you do a backfill with MT it screws up the volume for the current bar on most stocks. I thought it may be an NYSE symbol problem so I only watched NASDAQ stocks today. That was not the issue.

I did the following, I opened up NInjatrader 7 with TD Ameritrade feed and backfilled the same symbol that I just backfilled with MT. Volume was fine on NinjaTrader 7. I also had Trade Architecture open with the same symbol and I watched the T&S on all 3 platforms. Let me tell you, MT has got something going wrong in the Raw Data. NinjaTrader 7 has almost identical T&S as Trade Architecture while Medved Trader looks as if it tries to consolidate volume too much, and at times it appears to show the total volume of the previous candle or something. I am still trying to figure those out.

I will also use IB datafeed with trader workstation tomorrow to see if it is not handling volume correctly with IB.


Ninjatrader 7 is handling volume correctly so this can't be an issue with the datastream, in my opinion.

Link to comment
Share on other sites

it is the data stream. Its just that MT uses it differently.  the problem happens when you backfill and the backfill volume for the day does not match the real-time data from the same site. Because of the way MT stores the data, it causes a problem. in the future we will be changing how the volume data is stored, making this issue though still there, at least not mess up the volume chart.

Link to comment
Share on other sites

  • 2 weeks later...

That's a good question MTG - it is actually a pretty complicated formula, I tinkered with it until I found something that works reasonably well.

it is Max(emamax, Min(average * 6, max * 1.02)


emamax = the max value of visible volume EMA, if you have it with the volume

average = the average value of visible volume bar, and

max = the maximum value of visible volume bar

Link to comment
Share on other sites

On 12/30/2017 at 4:47 PM, Mike Medved said:

Max(emamax, Min(average * 6, max * 1.02) )



Mike, does the first mention of 'max' return the maximum of the 2 parameters in parentheses?  It's different to the second mention of 'max', yes? 

Edited by MTG
Link to comment
Share on other sites

Thanks again.  I've been trying to reproduce it.  The following plots something quite interesting, but different to MT version. 


b = Param("b",100,1,1000,1);  // number of bars to perform calcs on
EMAVol = EMA(Volume,b);  // EMA of volume based on 'b' bars of data
emamax =     HHV(EMAVol ,b);  //  highest value of EMA volume in last 'b' bars
average    =   Sum(Volume,b)/b;  //average volume in last 'b' bars
mx     =    HHV(Volume,b);  // highest value of volume over the last 'b' bars.  Using variable 'mx' instead of 'max'.
croppedVol= max(emamax,Min(average *6, mx * 1.02) ) ;
Plot( croppedVol,  "",colorGreen, styleHistogram);

Edited by MTG
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...