Which programming language best suits this task? (Database)?
I need to create a script for data organization and visualization purposes associated with the financial markets (stocks, bonds, forex, etc). In the future I hope to do some P2P social media user-interface design and iPhone app ideas. I have very little or no programming experiences (html basics, programming TI-86 calculators, and simple flash 5 scripts), but taught myself finance with little trouble, so I am not afraid of complexity and learning curve. I just don’t know where to start.
Below I have listed the specifics of the script desired (what functions I need it to have, etc). I need to know at the least which programming language to use and maybe a good site to find tutorials for creating the kinds of scripts that are relevant to my purposes. At the most, I would greatly appreciate some samples of code that can help me accomplish or learn how to do the following task .
I want to count and then visualize the number of times that the price moves over two exponential moving averages of 144 and 169 periods. I would like to have the option of being able to insert a filter: to only count the occurrences that stay above or below the exponential moving averages for X number of periods. I would also like to be able to easily visualize the data to show the occurrences that the price stayed over the exponential moving averages for X number of periods, Y number of periods, Z number of periods…(infinity)
thanks!
This program will not need to constantly recalculate. I’m basically just running an empircal test to determine the consistency of synchornious events inside of historical price information: If A price value is greater than moving average values (B) and (C) , will the price continue to rise, and if so, for how long?
I could imagine myself just downloading this information into excell and creating a VB script. What are the advantages of using PHP/mySQL in these types of environments? It seems that PHP/mySQL is web-based, which would help I’m guessing would help if the data set is very large and/or if the process must be on-going for a long period of time (e.x.: SETI) am I right?
I trade with MT4.





You need to think about:
- Where the calculations and visualizations will happen (server or client side)
- What data you have to store (server side)
- Security and financial concerns
The actual code for this will be a mathematical algorithm. It will basically look and work the same no matter which language you use. Even for creating the visual graph the code will be pretty much the same as the basic Graphics libraries are all similar (.Net GDI+, PHP GD, etc.). The difficult part will be writing the correct algorithm (Math!) to handle this accurately, after that the code will be very portable.
If you need to continually save the data in a database, you will need a server running a database. Web applications like this are usually done in either .Net and MS SQL Server or PHP and MySQL. Other than price (PHP/MySQL hosting is cheaper) there should be no practical advantage to either, just what you’re most comfortable coding in. Both have tonnes of resources online for learning how to code. (Try pscode.com and Google)
A bigger issue is security. If this data is being saved to a Database you want to make sure it is not vulnerable to SQL-injection or other types of attacks. A compromised database will make this whole thing fall a part.
—
EDIT
MySQL is a database, it is for saving data on a server. PHP is a server-side scripting language, it is for handling data on a server and displaying it to the client.
If what you want to do does not need to save data, then this can be handled without your own database. (I had pictured a graph over time, which would need to save previous data.) This would require on-demand third-party Services where the data will come from when the client clicks "Show me Andrew’s Financial Thing".
You would still likely want to handle this server-side (PHP), as you will have more security and control over what is displayed. (As opposed to client-side scripting such as Javascript.) The PHP page can display your visualization on regular page, as part of a Facebook app, or for a mobile browser page.
Doing this for an iPhone App will require either a reimplementation in Objective-C of the algorithm and graphics code (it connects to third party services), making an iPhone app that connects to the PHP page and displays that data directly (as if it where a web browser), or a combination of the two (it checks with the php page to get the information but creates its own visualizations.)
For example, (sorry to plug) we recently made an iPhone app that graphs financial information inputted by the client.
http://itunes.apple.com/us/app/assetgraphit/id376400107?mt=8
http://www.makeitsostudios.com/app_assetgraphit.html
I’m not much of a finance guy, but for my serious projects I’ve always used C# developed in MS Visual Studio.
I don’t know of any sites for tutorials, but after you get the basics of programming, make sure you understand your Object Oriented Principles. After that the sky is the limit for what you want to do.
I prefer Microsoft Visual basic .Net with MS SQL
Microsoft Visual basic .Net
————————————–
http://www.homeandlearn.co.uk/net/vbnet.html
http://www.vbdotnetheaven.com/
MS SQL
————
http://www.w3schools.com/sql/default.asp
http://www.sql.org/
i have some source for teach abut trade. You use MT4 that good because have EA robot help you to take profit. If you interest infor mation more….seeking my blog
Dude, that’s all been done. You’re trying to re-invent the wheel, build your own prototype, and build your own factory and hire all the workers, and train everybody and everything, etc.
You can get back-testing programs with many trading platforms today. NinjaTrader is a free download with backtesting and programming features built in. No need to start from scratch. It already has all the data handling functions and subscripts for hundreds of different indicators. There’s also a support forum with lots of programmers involved in developing new stuff all the time, all based on an established charting and trading platform.
http://www.ampfutures.com/index.php
Their data feed for forex and futures is free also (stocks data feed is not free), and they have the lowest margin rates around.
There are several informational and learning websites. If you watch their trading videos, you’ll see what they’re using.
http://www.forextv.com/forex-video-archi…
http://www.babypips.com/
http://www.dailyfx.com
http://www.fxstreet.com/rates-charts/usd…
http://www.forexpeacearmy.com/
The best way to learn is from a book. You can find three different eBooks here:
http://members.cox.net/axiom11/#Info
Insider Forex Secrets
http://members.cox.net/axiom11/page2_lin…
Forex Trading-Revolution To Home Based Internet Business
Forex Trading Strategies
There are many eBooks listed here, so to find the one you want, just hit Ctrl-F (for Find) in your web browser to find "forex".