Which programming language best suits this task? (Database)?

Friday, January 3, 2014 , Posted by Ryanita at 9:00 AM

forex x code
 on Forex X Code Review  Forex X Code User Reviews
forex x code image




Andrew


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.



Answer
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




Powered by Yahoo! Answers

Currently have 0 comments: