Just wanted to share a short example demonstrating how to connect NinjaTrader7 --> MySQL --> R(2.12). The example is just trivial, pulling a vector of closing values from NT7 into R, but it demonstrates the power.
Assumes NT7, MySQL, MySQL Connector/Net, .Net Framework and R are installed.
I used a Windows 7 (64) base. I used NT7(32) and R(32).
Assumes “Complete” install option for MySQL (this includes the client header and library files).
I had to uninstall and then reinstall .Net Framework, MySQL Connector and NT7 for this to work.
NT7 was very fussy about referencing the assemblies to get the MySQL connection.
I used the following reference paths:
This tutorial is a huge help for setting up RMySQL: http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL
Check that the MYSQL_HOME environment variable is set, at the R prompt type:
Then in R:
R Script for connecting to MySQL db:
dd <- dbDriver("MySQL")
closes <- dbSendQuery(con,"SELECT close FROM `closes`")
To accomplish this you need a good technical background. This is an advanced topic.
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.
The following user says Thank You to Big Mike for this post: