I need a javascript script to find stocks that have dropped or risen by a specific amount over a given period of time. The stocks found will then be bought (using Google Finance, real money will not be used). Information, code snippets, and tutorials on how to create a Google Finance transaction, get stock information, etc. can be found in the Google Finance API Developers Guide and Reference guide here: http://code.google.com/apis/finance/docs/2.0/developers_guide_js.html.
The script should run in browser, of course, and should be plain text and text fields. It should look something like this (where “_______” is a text field):
Google Finance Username: _______
Google Finance Password: ________
Find stocks that have changed between ______% and _______% in the last _______ hours.
Buy _______ shares with a maximum of _______ dollars spent in total.
There will then be a “Run and Buy” button that the user clicks. When the “Run and Buy” button is clicked, the script should save a .txt file containing the stocks found and some of their information, collected via the Google Finance API. The name of the file should be the date and time.
The text file should be formatted like this:
Ticker: Price; % change of the stock for that day; % change that we calculated above;
The stocks should then be purchased via Google Finance API (again, there are great tutorials that outline how to do this in the Google Finance API Reference) using the username and password the user provided.
