Using OnMarketData() on Historical data with a recording engine - NinjaTrader Programming | futures io social day trading
futures io futures trading


Using OnMarketData() on Historical data with a recording engine
Updated: Views / Replies:28,322 / 115
Created: by gomi Attachments:23

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 23  
 
Thread Tools Search this Thread
 

Using OnMarketData() on Historical data with a recording engine

  #31 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,176 since Oct 2009
Thanks: 227 given, 4,092 received

Here's a new version of the Recorder.

Added

File Formats


* Ability to read directy QCollector , QCollectorIQ and IRT files
* Millisec format, which will try to use the current clock to record millisecond timestamps. The recorder will try to adapt the lag between the exchange and the PC to keep timestamps matched (see https://futures.io/elite-circle/3743-exchange-data-delay-test-2.html#post40819 for an indy that monitors the lag). And thanks Zondor, there was indeed a bug ;-)

Methods

Added GomOnBarUpdateDone method to allow better performance.

So now the whenever OnBarUpdate is called on the indicator, it calls first GomOnBarUpdate, then it does its internal stuff like reading Gom files, and when everything is finished it calls GomOnBarUpdateDone

Ideally, you should put in GomOnBarUpdate the code thas is used to initialize each new bar, then in GomOnMarketData the code that updates your own data objects, and in GomOnBarUpdateDone the code that plots your internal objects by setting values to time series.

See enclosed GomDeltaVolume to see example implementation.

Attached Thumbnails
Using OnMarketData() on Historical data with a recording engine-millisec.png  
Attached Files
Register to download File Type: cs GomRecorderIndicator.cs (67.3 KB, 129 views)
Register to download File Type: cs GomDeltaVolume.cs (8.7 KB, 111 views)

Last edited by gomi; June 10th, 2010 at 05:38 AM.
Reply With Quote
The following 12 users say Thank You to gomi for this post:
 
  #32 (permalink)
Elite Member
san ramon
 
Futures Experience: Beginner
Platform: ninja
Broker/Data: zen
Favorite Futures: es, 6e
 
Posts: 136 since Oct 2009
Thanks: 98 given, 73 received


gomi View Post

So now the whenever OnBarUpdate is called on the indicator, it calls first GomOnBarUpdate, then it does its internal stuff like reading Gom files, and when everything is finished it calls GomOnBarUpdateDone.

Hi Gomi, would you say that this new function GomOnBarUpdateDone would help VolumeLadder?.......if so, perhaps you can tell us where in the code you would add it ...... thanks a bunch .....

Reply With Quote
 
  #33 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,176 since Oct 2009
Thanks: 227 given, 4,092 received


no the ladder uses it own plot methods. It's more for indicators that use standard plotting methods and Ninja dataseries.

The problem is that if you put your plotting code in GomOnMarketData you will end plotting too often. So it's best to put it in GomOnBarUpdateDone.

Reply With Quote
The following user says Thank You to gomi for this post:
 
  #34 (permalink)
Elite Member
CA
 
Futures Experience: Master
Platform: Marketdelta and Ninja
Broker/Data: Velocity
Favorite Futures: NQ
 
Posts: 670 since Apr 2010
Thanks: 64 given, 521 received

my chart doesn't say gom millisecond recorder on it. Im not using the delta volume indicator, just the gom cd. I know before you didn't have to actually load the volume recorder on the chart, but do you have to on this one?

Reply With Quote
 
  #35 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,176 since Oct 2009
Thanks: 227 given, 4,092 received

no, but did you launch a recompilation using F5 on any indicator ?

Reply With Quote
 
  #36 (permalink)
Elite Member
Chicago
 
Futures Experience: Intermediate
Platform: Ninja Trader & TradeStation
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 56 since Jun 2009
Thanks: 17 given, 48 received

Hi Gomi,
Will new indicators need to be written or updated for this recorder, or will the current GOM package benefit from this recorder. (probably a stupid question but I don't quite understand how the GOM stuff works...I'm just glad it does!)

Ron

Reply With Quote
 
  #37 (permalink)
Elite Member
CA
 
Futures Experience: Master
Platform: Marketdelta and Ninja
Broker/Data: Velocity
Favorite Futures: NQ
 
Posts: 670 since Apr 2010
Thanks: 64 given, 521 received

I actually went to edit ninjascripts, and did a compile manually. I then did f5 on all my charts, still won't say millisecond recorder. its says using binary on the side. Here's a pic


Gomi.. sorry.. stupid mistake. I didn't choose milisecond on the bottom. Few question...
1. will it replace the old bid/ask data if i switch formats to millisecond? found out it creates a new file... so disregard.
2. Is there a file converter that allows you to convert old binary data to be ported to millisecond data so it can use it as a lookback?
3. Also, if I have q collector, will it read it as soon as q collector is finished downloading it( after hitting F5 of course)? I don't have q collector yet. Reason i ask is simply because technically, it takes a few seconds to download data, and with this feature, there's no longer a need to leave computer on running 24/5
4.If we use q collector to backfill, can it ammend to millisecond data or is it a totally different file format (meaning you download for missing data, then as new data comes in using the recorder, that picks off where the qcollector left of)?

Is there a file format that you actually prefer or think works best?




this is truely amazing, you managed to overcome ninja's greatest problem, by yourself.....
I was talking to tim about this.... amazing how one person can do so much, but a team of coders at ninja couldn't fix this....

Attached Thumbnails
Using OnMarketData() on Historical data with a recording engine-capture.png  

Last edited by Michael.H; June 11th, 2010 at 04:42 AM.
Reply With Quote
 
  #38 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,176 since Oct 2009
Thanks: 227 given, 4,092 received


rsi77 View Post
Hi Gomi,
Will new indicators need to be written or updated for this recorder, or will the current GOM package benefit from this recorder. (probably a stupid question but I don't quite understand how the GOM stuff works...I'm just glad it does!)

Ron

No nothing needs to be rewritten. All current indicators can benefit from this one.

Reply With Quote
 
  #39 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,176 since Oct 2009
Thanks: 227 given, 4,092 received


Michael.H View Post
1. will it replace the old bid/ask data if i switch formats to millisecond? found out it creates a new file... so disregard.
2. Is there a file converter that allows you to convert old binary data to be ported to millisecond data so it can use it as a lookback?
3. Also, if I have q collector, will it read it as soon as q collector is finished downloading it( after hitting F5 of course)? I don't have q collector yet. Reason i ask is simply because technically, it takes a few seconds to download data, and with this feature, there's no longer a need to leave computer on running 24/5
4.If we use q collector to backfill, can it ammend to millisecond data or is it a totally different file format (meaning you download for missing data, then as new data comes in using the recorder, that picks off where the qcollector left of)?

Is there a file format that you actually prefer or think works best?

2. no. Millisecond data has to be written real time. It may actually work though if you use an input file (IRT, QCollector etc ) and your input file has milliseconds timestamps.
3. YOu will have a problem because the indicators keep a lock on the file so it won't be updateable by QCollector
I wanted to update the indicator with all the nice job of gooni (https://futures.io/elite-circle/2100-volume-ladder-highlight-addition-16.html#post43142 ) but actually forgot;-)
Anyway, for now, you can't update your file using QCollector while it's used by any Gom indicator
4. I don't think QCollector does millisec.
5. File format preference : this millisec stuff is for guys that want to play around with millisec data. It may not be usable at all(check your network jitter with then monitoring app). If you don't need it you can stick to binary

Careful anyway using directyl QCollector files : in my case with esignal, 1 week is 500Mo, so parsing of the file is very long. Binary uses a few Mo for the same week, so you can read contract-long data with not too much pain.

Reply With Quote
 
  #40 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,176 since Oct 2009
Thanks: 227 given, 4,092 received


Here's a new Converter that handles Millisec format.

You also have a command line mode using
GomFileConverter.exe inputfile inputformat outputformat ticksize

I also included the VS2010 project

Attached Files
Register to download File Type: zip GomFileConverterProject.zip (7.86 MB, 251 views)
Register to download File Type: zip GomFileConverter.zip (17.2 KB, 195 views)
Reply With Quote
The following 8 users say Thank You to gomi for this post:

Reply



futures io > > > > > Using OnMarketData() on Historical data with a recording engine

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT Providing Bad Price & Volume Data in OnMarketData!!! RJay NinjaTrader Programming 18 June 5th, 2017 10:53 AM
Historical CL Tick Data and Minute Data Big Mike The Elite Circle 112 July 26th, 2014 07:07 PM
BuySellVolumeTotalG39 Lost data recording ability JohnPS The Elite Circle 2 April 26th, 2011 12:30 AM
Historical Tick Data togier Reviews of Brokers and Data Feeds 2 December 3rd, 2010 05:09 PM
Anyone not receive pre-market data while recording with NinajTrader via IQFeed today? richw Reviews of Brokers and Data Feeds 1 May 10th, 2010 08:48 PM


All times are GMT -4. The time now is 12:37 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.14 seconds with 20 queries on phoenix via your IP 54.221.93.187