Skip to content

Commit

Permalink
updated setup, usage for this release, and start/stop execute gatheri…
Browse files Browse the repository at this point in the history
…ng errors. This change locks down this code branch.
  • Loading branch information
mklump committed Jul 24, 2016
1 parent 9210b41 commit 713e23e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
41 changes: 21 additions & 20 deletions README.md
@@ -1,33 +1,34 @@
#Project Goal:
# Project Goal:

The goal of this project is to create a data harvest python program that is configurable and viewable through
an external website to specifically apply execution settings for the data harvest python program, and be able
to view what recently happened on the current trading session for the day for events. The second top level goal
for this project is to execute trades in reaction to this financial data through the MetaTrader terminal using the
language for that terminal.

##Setup
## Setup
1. Install all the listed required python modules from requirements.txt
Please email Matthew James [matthew@klump-pdx.com](mailto:matthew@klump-pdx.com) for instructions on how to setup database using the django
administration tool.
2. To bypass setting up the database table row, and view static flat-file-data-only: Open the file urls.py, and edit
line 22 to uncomment the view function render_static_eventlogviewer(), and then edit line 23 to comment out the view
function render_static_eventlogviewer().

##Usage
administration tool if you are a subscriber our paid target website we are using.
2. If java virtual machine (JVM) is not preinstalled on your computer, then go to [this web site](https://java.com/) to download and install the java virtual machine - the installer should set the java environment variable for your computer. If not, you may email me for my path environment variable setup to run the java JVM.
3. Go to [this web site](https://github.com/SeleniumHQ/htmlunit-driver/releases/download/2.21/htmlunit-driver-standalone-2.21.jar), and specifically download the file htmlunit-driver-standalone-2.21.jar that is this version 2.21. Also there is available [this web page](https://github.com/SeleniumHQ/htmlunit-driver/releases) if there is a higher released version of this file, but you'll need to change pstart_loc_server.py line 28 to match.
4. Go to [this web site](http://goo.gl/EoH85x), and specifically download the file selenium-server-standalone-2.53.1.jar that is version 2.53.1. Also there is available [this web page](http://docs.seleniumhq.org/download/) if there is a higher released version of this file, but you'll need to change pstart_loc_server.py line 29 to match.
5. Take the files htmlunit-driver-standalone-2.21.jar and also selenium-server-standalone-2.53.1.jar, and place them into finalproject_fxalarm project folder both as sibling files next to the manage.py file.
6. Additionally, we are using an installed python x86 version 3.51 or higher with the python pip-installed packages listed in the requirements.txt file to run this release.

## Usage
After setup, execute django server within your virtual environment, navigate to the fist page, click the top bar
button to proceed to the live streamine viewer page, observer ideal live streaming data, lastly ALWAYS click the
button labeled "Stop Main Data Gathering Execution" to release the data gathering resources before refereshing
this page. Updates are in the works to automatically release the gathering resources if the event viewer page
becomes refreshed.
button to proceed to the live streamline viewer page, observer ideal live streaming data by first pressing the "Start Main Data Gathering Execution" button, and lastly always click the
button labeled "Stop Main Data Gathering Execution" to release the data gathering resources before pressing the start gathering button a second time if you wish to collect more raw USD
daily session price acceleration data. Updates are in the works to automatically release the gathering resources if the event viewer page becomes refreshed.

## Specific Functionality

### USD Main Page
This page will shows you are about to view live steaming data for the USD dollar group which are the EUR/USD,
GBP/USD, USD/CAD, USD/JPY, USD/CHF, AUD/USD, and NZD/USD.
There will be show an image of the MetaTrader Engine as a backgroup, and a single button control to proceed to
the event viewer log webpage.
There will be show an image of the MetaTrader Engine as a back group, and a single button control to proceed to
the event viewer log web page.

### Event Viewer Log Page
This page will show live streaming data updated each minute from our subscription website for the USD group mentioned
Expand All @@ -38,12 +39,12 @@ There is a required logic module that must correctly receive the USD data with t
Please see the [design document link](https://github.com/mklump/codeguild_finalproject_fxalarm/blob/master/Design_Docs/FX%20Alarm%20Project%20Scope.pdf) for the specific plan of creating this module.

1. Simulate the actual data source as if it was reading the body of the html document right off a request object network resource connection.
2. Perform and actually do the true html file dowload from a secure login session for true USD session acceleration data.
2. Perform and actually do the true html file download from a secure login session for true daily USD session acceleration data.

### Data Model
* Secure string for my credentials to auto login to the subscription website
* String for the subscription website that is the target of receiving data from,
* A float value immediately read in, and every 15 mininutes, for the USD 7 pairs of the the EUR/USD, GBP/USD, USD/CAD, USD/JPY,
* A float value immediately read in, and every 15 minutes, for the USD 7 pairs of the EUR/USD, GBP/USD, USD/CAD, USD/JPY,
USD/CHF, AUD/USD, and the NZD/USD.
* Lastly a time stamp for when the last data values for the US Dollar was saved.

Expand All @@ -59,17 +60,17 @@ Please see the [schedule document link](https://github.com/mklump/codeguild_fina

## Further Work
* Expand the user interface to reflect a configurable UI as stated in the [design document link](https://github.com/mklump/codeguild_finalproject_fxalarm/blob/master/Design_Docs/FX%20Alarm%20Project%20Scope.pdf) below for module details.
* Add Expanded View for the Event Log Viewer webpage to accomodate 8 currencies and 28 currency pairs
* Add Trade module configuration webpage
* Add Expanded View for the Event Log Viewer web page to accommodate 8 currencies and 28 currency pairs
* Add Trade module configuration web page
* Add Trade Execution Engine using C++ API calls through MQL4 script for Meta Trader 4 Terminal program.
* Add Email notificaition module for trades executed or significant theshold events.
* Add Email notification module for trades executed or significant threshold events.

##The following languages and software technologies will be used:
* Python
* HTML5
* CSS3
* JavaScript calls through JQuery
* Django frontend backend kit
* Django front-end back-end kit
* C++ API calls through MQL4 script

#####[Link for details to each major component to follow via visual design documents.](https://github.com/mklump/codeguild_finalproject_fxalarm/blob/master/Design_Docs/FX%20Alarm%20Project%20Scope.pdf)
Expand Down
2 changes: 2 additions & 0 deletions finalproject_fxalarm/finalproject_fxalarm/logic.py
Expand Up @@ -160,6 +160,8 @@ def usd_datagathering_thread():
"""
main_execution = None
backup_execution = None
global stop_execution
stop_execution = False
parse_fxalarm.startup_htmlunitjs_webdriver()
last_response = parse_fxalarm.check_http_response(parse_fxalarm.get_target_website())
if not get_stop_execution():
Expand Down
2 changes: 1 addition & 1 deletion finalproject_fxalarm/finalproject_fxalarm/views.py
Expand Up @@ -53,7 +53,6 @@ def render_dynamic_eventlogviewer(request):
This view function renders real-time data content to the event viewer and log page route to
fxalarm_event_log.html
"""
logic.set_stop_execution(False)
return render(
request,
'finalproject_fxalarm/fxalarm_event_log.html',
Expand All @@ -66,6 +65,7 @@ def render_start_gathering(request):
The thread will first launch the selenium remote webdriver separate thread, and then starts
the data gathering in this current running thread.
"""
logic.set_stop_execution(False)
logic.start_usd_datagathering_thread()
return render(
request,
Expand Down

0 comments on commit 713e23e

Please sign in to comment.