Yes. That is exactly what I had in mind; overwriting the existing data is important.
There will be some latency from the time you make the request and till you get the data. You can not be sure of the time-stamp of the information returned by the historical data request. What you could do is buffer the live data while you are requesting historical data and then using time-stamps, and some local tick matching, find where the historical data tick ends and then store the buffered live data.
GomCD CalculateDeltaIndicator method can use BidAsk (Price >=Ask Price<=Bid), UpDownTick (TickUp=+1,TickDown=-1) UpDownTickWithContinuation...
I need to count the Ticks on Bid and and the Ticks on Ask. (No Up or Down....in the while the Bid/ask can change).
Some suggestions on this subject before I modify the GomdeltaIndicator to insert this culculation mode?
So you want to filter out ticks that are AboveAsk/BelowBid/Between?
Without having the code right in front of me I might be slightly off the mark, but I think you need to Add a calculationModeType for Delta at Bid/Ask assume you call it AtBidAsk.
then in the CalcDelta function add a case for your new type as such:
else if ((calcmode==GomCDCalculationModeType.AtBidAsk) && (tickType!=TickTypeEnum.Unknown))
else if ((tickType==TickTypeEnum.AtAsk))
Favorite Futures: Gameplay KlownbineŽ Trading of Globex
Posts: 1,276 since Jul 2009
Thanks: 1,227 given,
Using Gomi's tickTypes
The tickTypes are BelowBid, AtBid, BetweenBidAsk, AtAsk, and AboveAsk.
So, in GomOnMarketData() you just respond to those incoming ticks with the tickTypes representing the types of trades you want to count.
Or you respond to them selectively. For example, trades that are above the ask and below the bid can be counted in the Grande Totals of buyvolume and sellvolume, but also can be counted separately. If you do this, in a bar chart showing buyvolumes and sellvolumes, the "outside" trades can be shown as comprising PORTIONS of the buyvolume and sellvolume bars, whilst also being counted within the totals of buyvolume and sellvolume. See the Buy/Sell Volume indicators I have posted in the Elite downloads section for code examples.
The following 2 users say Thank You to Zondor for this post:
Here's a new beta version of the recorder
* Added "Volume Split" setting, that will split ticks on constant volume charts. It works on historical (gom file) and real time data. Disable it if you do any kind of volume filtering.
* Improved the tick rendering in "non split" mode, to minimize difference between non-split volume and the constant volume series NT maintains.
* Rewrote tick rendering engine. Now 100% the same as Volume on second,tick,volume and range charts. In history and real time. With CalculateOnBarClose=true or false
* NT7 "new tick model" with OnMarketData firing before OnBarUpdate is now OK. NT 6.5 compatibility has been dropped
*Added Ninja file format availability in Read Only mode. This way you can export data from NT and use it directly in Gom indicators (extension .Ninja.txt) to check how the tick engine handles the ticks
* Dropped the "compress ticks" mode that was pretty much useless and made the recording functions a real pain to write, so simplified the recording methods as well
*Added a GomOnStartUp for those wishing access to NT7's OnStartUp
*Changed session handling so there shouln't be problems with multiple session templates
I also include a new DeltaIndicator class, that implements Zondor's "Delta Completion" idea, meaning that when the ticktype is unknown or betweenbidask, we use updowntick mode to assign a delta. So each tick has a delta, and when you sum buy delta and sell delta, you get the total volume of the bar. This setting can be changed (It's called delta completion)
I also include GomVol, that basically plots volume that you can directly compare to Volume. It also show how to correctly implement recorder indies :
*Initialize bars in GomOnBarUpdate
*Do your internal stuff in GomOnMarketData
*Set the values to the indicator time series in GomOnBarUpdate Done
I also include GomVolTest, that will show bar and cumulative difference between Volume and GomVol. It is reset on each session start
I also include GomDeltaVolume for basic delta checks.
Any feedback is most welcome.
The following 19 users say Thank You to gomi for this post:
if you have other indicators using the recorder with the code "protected override void OnStartUp()", is it OK with the new recorder just to change that code to "protected override void GomOnStartUp()" ?