NexusFi: Find Your Edge


Home Menu

 





My 2 cents in mysql database


Discussion in NinjaTrader

Updated
    1. trending_up 4,816 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

My 2 cents in mysql database

  #1 (permalink)
iwannatoscript
Budapest
 
Posts: 34 since Jun 2009
Thanks Given: 8
Thanks Received: 3

Hi folks,

i'd like to store all data from all futures ( many that i can) and share with other guys,
could someone explain how to start collect data and share them?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
23 thanks
Tao te Trade: way of the WLD
20 thanks
My NQ Trading Journal
19 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256


One possible approach would be to load a database driver in a ninja script and write the data as it comes in (OnBarUpdate()) to a table in the database. I was looking at storing some information from a strategy into postgres (my preference), but not actual back tested data. I did some googleing and found a C#-postgres database driver, but I have not tried using it yet. Here's a writeup on getting started with that: Using PostgreSQL in your C# (.NET) application (An introduction) - CodeProject

Mysql is also popular. Here's a site: MySQL :: Open Connection using C#

Also, I'm not sure if NT will allow third party tools like a database driver, but it should be possible since it's C#.

I don't know what the finest granularity of data size you would need to store to effectively replay at different tick size/time intervals.

It's still an interesting project Good luck.

Reply With Quote
  #4 (permalink)
iwannatoscript
Budapest
 
Posts: 34 since Jun 2009
Thanks Given: 8
Thanks Received: 3

Wow,

i see that the best datafeed and granularity is zenfire by mirus.

My idea was very simple.

I see that there is a project on this forum on database in mysql, i have a pc that i can use to store data, so i'd like to store data from datafeed and post the data evry day.

I am not a programmer, so my is only an idea, i don't have the knowledge to use mysql.

I ask if is there a video tutorial on this forum but nothing.

I see also that bigmike wants to jump on multicharts, so would be nice if is it possible to use one databe for 2 trading paltform.

Anothe poiu is to kake rollover and long data for futures automatic way.

Bye

Reply With Quote
  #5 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256

Another approach is to take the existing historical data files and insert them into database tables via bulk insert (for postgres anyways). I have not looked at the format for the data, but I don't think that massaging the data for inserts should not be difficult (for me anyways. I have experience with this sort of thing ).

Now getting data into NT from the db will require some work. From this post on the NT forum, NTDataFeeder pulls in data from a file and plays it back to NT:

External data feeder that read from NT export files and esignal replay file - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

The idea would be to rework this tool a bit to instead pull data from the database.

This thread on the NT forum points to the API for the data feed that would need to be used (see post #5):

API/Data feed question - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

If the source code is available for NTDataFeeder, then that's even better

This opens up a range of other possibilities as well. For example, special instruments can be created just for simulated data created using the monte carlo....


Regards,
C

Reply With Quote
  #6 (permalink)
iwannatoscript
Budapest
 
Posts: 34 since Jun 2009
Thanks Given: 8
Thanks Received: 3

Oh, great stuff.
I think more in easy way.

If evryday i have my ninjatrader open and market analyzer ready with all instrument, futures, stock... that i like, are the stored in the database?

How could i fill the gap of one week if i am going to holiday?

When there is a rollover day about futures how could manage the database in right way, to have a long chart of many years without bad spike or databroken?

Each trader should have a database of at least 8 years to test strategy.
This data should be load on ninja and afther maintain database.
It seems a not important work this but for algotrader is it foundamental.
Another point is that all this process should be simple and not a waste of time.

So all kiss idea and practical are accepted.

Sorry i am not a programmer, but a trader and i am learning now how to do this, but i try to help the other and give good ideas.

Bye

Reply With Quote




Last Updated on March 7, 2010


© 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