Store real time data from NT in mysql - NinjaTrader | futures io social day trading
futures io futures trading


Store real time data from NT in mysql
Updated: Views / Replies:5,374 / 23
Created: by bascher Attachments:1

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
 1  
 
Thread Tools Search this Thread
 

Store real time data from NT in mysql

  #1 (permalink)
Elite Member
Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: DAX, EUR/USD
 
Posts: 18 since Aug 2010
Thanks: 16 given, 2 received

Store real time data from NT in mysql

Hallo everybody,

can somebody point me in the right direction.
Thank you in advance

Best regards
Benjamin

Reply With Quote
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received


bascher View Post
Hallo everybody,

can somebody point me in the right direction.
Thank you in advance

Best regards
Benjamin

https://futures.io/elite-circle/7140-gomrecorder-mysql-backend.html

https://futures.io/matlab-r-type/7880-how-connect-ninjatrader7-mysql-r-2-12-a.html

https://futures.io/ninjatrader-programming/1298-mysql-db-writer.html

https://futures.io/platforms-indicators/2516-tick-database-storage.html

https://futures.io/elite-circle/3997-tick-data-storage.html

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #3 (permalink)
Elite Member
Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: DAX, EUR/USD
 
Posts: 18 since Aug 2010
Thanks: 16 given, 2 received


Hallo,

I have some problems to store the data in Mysql:

MyInsertQuery:

string myInsertQuery = String.Format("Insert INTO data1 (date, time, lastprice, volume) Values({0}, {1}, {2}, {3})", now_date_marketlast, now_time_marketlast, e.Price, e.Volume);

My table in Mysql:
CREATE TABLE `data1` ( `id_tick` int(16) NOT NULL auto_increment, `date` varchar(8) NOT NULL, `time` varchar(17) NOT NULL, `lastprice` float NOT NULL, `volume` int(8) NOT NULL, PRIMARY KEY (`id_tick`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
Output in Ninjatrader:

Insert Into data1 (date, time, lastprice, volume) Values(20111018, 1509312430, 1,3724, 4646000)
Error on calling 'OnMarketData' method for indicator 'NinjatraderMysql': Column count doesn´t match value count at row 1

Best regards
Benjamin


Reply With Quote
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received


bascher View Post
Insert Into data1 (date, time, lastprice, volume) Values(20111018, 1509312430, 1,3724, 4646000)
Error on calling 'OnMarketData' method for indicator 'NinjatraderMysql': Column count doesn´t match value count at row 1

Your price has a comma in it. Change to decimal.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #5 (permalink)
Elite Member
Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: DAX, EUR/USD
 
Posts: 18 since Aug 2010
Thanks: 16 given, 2 received

Hallo Mike,

I tried it all day but I dont´t know how to solve it. Please help me to fix it.

Benjamin

Reply With Quote
 
  #6 (permalink)
Elite Member
Karlsruhe, Germany
 
Futures Experience: Intermediate
Platform: MultiCharts, AmiBroker
Broker/Data: IB/IQFeed
Favorite Futures: FDAX, ES
 
medias's Avatar
 
Posts: 60 since Jul 2009
Thanks: 30 given, 49 received


bascher View Post
Hallo,

I have some problems to store the data in Mysql:

MyInsertQuery:

string myInsertQuery = String.Format("Insert INTO data1 (date, time, lastprice, volume) Values({0}, {1}, {2}, {3})", now_date_marketlast, now_time_marketlast, e.Price, e.Volume);

My table in Mysql:
CREATE TABLE `data1` ( `id_tick` int(16) NOT NULL auto_increment, `date` varchar(8) NOT NULL, `time` varchar(17) NOT NULL, `lastprice` float NOT NULL, `volume` int(8) NOT NULL, PRIMARY KEY (`id_tick`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
Output in Ninjatrader:

Insert Into data1 (date, time, lastprice, volume) Values(20111018, 1509312430, 1,3724, 4646000)
Error on calling 'OnMarketData' method for indicator 'NinjatraderMysql': Column count doesn´t match value count at row 1

Best regards
Benjamin

Try this:
Insert Into data1 (date, time, lastprice, volume) Values ('20111018', '1509312430', '1.3724', '4646000')

Reply With Quote
 
  #7 (permalink)
Elite Member
Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: DAX, EUR/USD
 
Posts: 18 since Aug 2010
Thanks: 16 given, 2 received

I patched it with:

string ePrice;
ePrice = e.Price.ToString();
ePrice = ePrice.Replace(",", ".");

Benjamin

Reply With Quote
 
  #8 (permalink)
Elite Member
Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: DAX, EUR/USD
 
Posts: 18 since Aug 2010
Thanks: 16 given, 2 received

Can it be possible that there is a restriction in storing data from NT in MySql?
I get the data from IB in NT and want to save them in Mysql but this works only for 3 instruments.
What can I do?

Reply With Quote
 
  #9 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received


bascher View Post
but this works only for 3 instruments.

What do you mean?

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #10 (permalink)
Elite Member
Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: DAX, EUR/USD
 
Posts: 18 since Aug 2010
Thanks: 16 given, 2 received


If I attach the indicator at 3 currencies it works fine and I can store all data but if I attach the
indicator at another currency there happens nothing more than before.

Reply With Quote

Reply



futures io > > > > Store real time data from NT in mysql

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
Real-time intra-day data feed for TSX stocks?? Calgarybabybear Reviews of Brokers and Data Feeds 3 March 15th, 2015 11:09 AM
Investor/RT Real Time Language gparkis Investor/RT 7 April 12th, 2012 10:27 AM
Help selecting a real-time data feed for equities heretic Reviews of Brokers and Data Feeds 20 August 19th, 2011 06:40 AM
PLT_NTDataCollect store bid ask tick data to its local database? rcabri Trading Reviews and Vendors 3 December 27th, 2010 11:00 AM
Genetic Optimization vs real time kandlekid NinjaTrader Programming 7 November 16th, 2010 12:08 PM


All times are GMT -4. The time now is 12:19 PM.

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-15 in 0.13 seconds with 20 queries on phoenix via your IP 54.226.34.209