Quote from rainmonkey:
Hey trhudson,
I'm still working on learning mySQL with XAMPP, found a tutorial about how to set up, and another tutorial about how to build a futures trading system (which I haven't started yet given that I'm learning XAMPP first).
I noticed that you mention data mining a lot, correct me if I'm wrong, but this is looking for patterns/events that occur not randomly and can be 'assigned' probabilities? Is this done through PHP?
Once again, thank you so much for everything.
Regards,
rainmonkey
I have pointed a few people to a similar tutorial. However, the tutorial that you read, was a bad example. I say this because the author calculated the moving average in the spreadsheet before inserting it into the database. Not necessary and it's extremely limiting. I asked him, why didn't you calculate the MA in PHP, he said it would be too much work, but it could be done. So, as with everything else I have learned in my desire to create a successful system...If you want something done, you've gotta do it yourself.
This is exactly why I developed my own platform...all the others were basically useless based on what I wanted to do. Combine data-mining with system development. I am able to back-test intra-day 8 years of data and mine that data (trade results) to find higher-probability trades. I am also able to tell what patterns work and what patterns don't by mining the data. I will be adding a feature that will find out what conditions were present before the winners vs. the losers and see if patterns exist there as well.
With all the commercially available platforms, you have to re-write the code and run another back-test. This is the extent of their data-mining. Five years of data on tradestation took anywhere from 45 minutes to an hour and sometimes longer. Seems like a waste of time. Not to mention, at the time none of the commercial platforms could use a stop-loss that I was trying to implement. And they will all tell you that they are capable of working with multiple timeframes at the same time...it's just not as easy as some here will tell you it is. How do I know? I tried, paid certified programmers to write code and they gave up, said it couldn't be done. Now, I am able to test 8 years much faster. And better still I am able to mine the data (trade results). I honestly can't believe that all of the commercial platforms forgot this part. It's as if they were all developed by the same people who were all thinking inside the same box. The funny thing is the newer commercially available system development tools are getting worse, not better. They make them look 'pretty' with flashing lights and smooth sleek user interfaces, and let's not forget the 'pretty graphs' (because they are so useful...lol) so the public will like them and sacrifice what really matters - speed, functionality, and features (mainly data-mining). Remember, they are solely in the business to make money and they aren't really concerned whether or not you make money.
Just this week I was introduced to a new platform that allows you to 'visualize the market', what a bad idea. Totally going the wrong way with this one. Take the human OUT of the EQUATION, don't give them more ways to mess up a system.
Back to what we are here for:
There is really nothing to learn with MySQL. I do all of my
calculations and algorithms in PHP. This is because I ran into a wall trying to write MySQL code that would find certain patterns. Therefore, I re-wrote everything in PHP.
1. Download, Install XAMPP, and Run Apache and MySQL
Now you have a working web and database server on your local computer
2. Go to localhost/ in your browser and click on phpMyadmin
3. Create a database with 7 columns call it historical_quotes if you want
4. Name the columns:
symbol
date
open
high
low
close
volume
5. Download your data using whatever tool or website you want.
6. Import the data into the database. The date MUST BE IN THE FOLLOWING FORMAT:
YYYY-MM-DD
Many software packages will allow you to do this automatically. However, if you use excel, you can get it in this format if you open it in excel and change the entire column using the Format Column function. Select Custom and enter the letters exactly as I did above and it will store it correctly.
I may create a blog to demonstrate this as my posts are becoming very large and they may be useful to some and get lost in here.
This week I will demonstrate how to create a form that will pass a symbol to the database and display the quotes using PHP. I will also show how to do a few simple things with the data.
One good idea to do as well would be to develop this in a framework such as CodeIgniter. This will allow for some structure in your code and keep things organized.
When you start using a platform like this and get comfortable with your coding, you are going to see things you never saw looking at the charts, this I promise. It will change your mind about trading and system development.
TRH