NexusFi: Find Your Edge


Home Menu

 





Using OnMarketData() on Historical data with a recording engine


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one gomi with 34 posts (87 thanks)
    2. looks_two aviat72 with 10 posts (2 thanks)
    3. looks_3 danjurgens with 9 posts (3 thanks)
    4. looks_4 Michael.H with 8 posts (0 thanks)
      Best Posters
    1. looks_one gomi with 2.6 thanks per post
    2. looks_two Zondor with 1 thanks per post
    3. looks_3 danjurgens with 0.3 thanks per post
    4. looks_4 aviat72 with 0.2 thanks per post
    1. trending_up 51,294 views
    2. thumb_up 104 thanks given
    3. group 28 followers
    1. forum 115 posts
    2. attach_file 23 attachments




 
Search this Thread

Using OnMarketData() on Historical data with a recording engine

  #1 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505

Hi guys,

Just wanted to say if you need to be able to call OnMarketData() on historical charts, you can use the GomRecorderIndicator like a base indicator you derive your indicator from.

This base indicator includes a recording/replay engine that acts like a virtual tick data source on historical data.

Then you only have to use GomInitialize, GomOnMarketData and GomOnBarUpdate instead of NT standard ones and you have an indicator that receives historical (and real time) tick info.

It was originally developped with GomCD indicator to access historical Cumulative Delta. I finally managed to make a package out of it ; it contains a very quickly converted version of VolumeProfile that shows how you can get a historical Volume Profile.

See All [AUTOLINK]GomRecorder[/AUTOLINK] Indicators - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Edit : Millisec version on topic 31

Edit : Correct time filter version on topic 67

Attached Thumbnails
Click image for larger version

Name:	gompackage.png
Views:	1128
Size:	85.1 KB
ID:	5156  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
 toulouse-lautrec 
Europe
 
Experience: Beginner
Platform: NinjaTrader
Posts: 73 since Jun 2009
Thanks Given: 13
Thanks Received: 53

Gomi, you rock!

Reply With Quote
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,662


gomi,

Yes, this is a fantastic set of tools.
Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 
cclsys's Avatar
 cclsys 
Sydney, NS
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: TF,S,GC
Posts: 605 since Nov 2009
Thanks Given: 248
Thanks Received: 393


gomi View Post
Hi guys,

Just wanted to say if you need to be able to call OnMarketData() on historical charts, you can use the GomRecorderIndicator like a base indicator you derive your indicator from.

This base indicator includes a recording/replay engine that acts like a virtual tick data source on historical data.

Then you only have to use GomInitialize, GomOnMarketData and GomOnBarUpdate instead of NT standard ones and you have an indicator that receives historical (and real time) tick info.

It was originally developped with GomCD indicator to access historical Cumulative Delta. I finally managed to make a package out of it ; it contains a very quickly converted version of VolumeProfile that shows how you can get a historical Volume Profile.

See All [AUTOLINK]GomRecorder[/AUTOLINK] Indicators - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Gomi: are you saying you can use some of your code in other indicators so that they too can record? If so, could you please provide a snippet example so I can understand. Or are you saying that if you run Gom Recorder in a workspace that all other indicators can access the file somehow? (Please excuse my confusion.)

Also: is there anywhere where your indicators are explained, i.e. what are they saying? Or is it just something you figure out intuitively by using them regularly. For example: I do not really understand 'delta volume' yet. Clearly I can do some study using Google etc. but perhaps you could point me to a thread where you discussed this in the context of your indicators, or perhaps you know of a good basic source for me to start with. Now that I have your tools, I want to spend some time getting into market profile type stuff. In fact, the reason I stumbled on this forum a short while ago was because of the thread about 'using volume in trading' which is what interests me most right now.

Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505


cclsys View Post
Gomi: are you saying you can use some of your code in other indicators so that they too can record?

Yes. Basically you only have to derive your indicator from GomRecorderIndicator and use GomInitialize, GomOnMarketData and GomOnBarUpdate and you're done. That's how I converted NT's VolumeProfile into GomVolumeProfile



cclsys View Post
If so, could you please provide a snippet example so I can understand.

You can check GomVWAP, it's very basic



cclsys View Post
Or are you saying that if you run Gom Recorder in a workspace that all other indicators can access the file somehow? (Please excuse my confusion.)

All indicators derived from GomRecorder share the same files. You have to set write=true on the one that will have writing privileges, and all the others can read from the file



cclsys View Post
Also: is there anywhere where your indicators are explained, i.e. what are they saying? Or is it just something you figure out intuitively by using them regularly. For example: I do not really understand 'delta volume' yet. Clearly I can do some study using Google etc. but perhaps you could point me to a thread where you discussed this in the context of your indicators, or perhaps you know of a good basic source for me to start with. Now that I have your tools, I want to spend some time getting into market profile type stuff. In fact, the reason I stumbled on this forum a short while ago was because of the thread about 'using volume in trading' which is what interests me most right now.

All the stuff have more or less to do with the delta calculation. You can check fulcrumtrader on google for info on using cumulative delta, and of course market delta for ladder stuff.

Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
 dnof 
san francisco, ca
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 45 since Nov 2009
Thanks Given: 42
Thanks Received: 27

Gomi,

A quick question on the difference between the two onMarket methods. What is the functional difference between the two - does the first one have +/- value indicated only where as the second method has the tick timestamp? - I guess I am trying to understand the functional difference?

Dean

Reply With Quote
  #7 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505

There is no difference in the data.

With the withtime method, you get the time of the tick with the other data .

The recorder bars are reconstructed using the close time of the bar, so the recorder engine sends all the ticks that have time stamp < time[0]. So for ninja, all ticks arrive at time[0]. You can use the withtime method if you need more detailed tick time information.

Other people have used it to implement a more-precise-than-1-second tick engine by using the Flat format and storing milliseconds information.
Delta Buy/Sell Volume - Page 4 - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum , message 591 and later

Started this thread Reply With Quote
  #8 (permalink)
surfer
Charkov
 
Posts: 4 since Jan 2010
Thanks Given: 2
Thanks Received: 0

Can you say your idia to calculate Ask/Bid using only ticks?

Reply With Quote
  #9 (permalink)
 dnof 
san francisco, ca
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 45 since Nov 2009
Thanks Given: 42
Thanks Received: 27

Gomi,

I am sure that I am missing something basic, but I have tried converting a indicator I use today, and it seems to function fine (it calculates, displays on charts as expected), but I get no data file created. I see "Recording Binary OK" but no file is created in the GOMFOLDER path specified in my environment settings (personal env).

What else needs to be done or looked at to evaluate?

(BTW - I implemented indicator using the GomRecorderIndicator as you describe with the associated changes to the methods).




gomi View Post
Yes. Basically you only have to derive your indicator from GomRecorderIndicator and use GomInitialize, GomOnMarketData and GomOnBarUpdate and you're done. That's how I converted NT's VolumeProfile into GomVolumeProfile



You can check GomVWAP, it's very basic




All indicators derived from GomRecorder share the same files. You have to set write=true on the one that will have writing privileges, and all the others can read from the file




All the stuff have more or less to do with the delta calculation. You can check fulcrumtrader on google for info on using cumulative delta, and of course market delta for ladder stuff.


Reply With Quote
  #10 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505


by default the files are stored in your My Documents folder. You can use GOMFOLDER to change that location but to be effective you have to restart ninja trader.

Started this thread Reply With Quote




Last Updated on March 6, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts