/Flask-App

A Python Flask App for Crypto Trading Strategy Backtesting

Primary LanguageHTML

Flask App Backtester

Crypto Trading Strategy Backtester

Usage

A detailed guide to launch FlaskApp on a Ubuntu VPS: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

ENV Variables

FLASK_APP: Main app name. Defaults to BACKTESTER.

DEBUG: Flask server Debug mode. Defaults to True.

SECRET_KEY: Flask app secret key. Defaults to BACKTESTERSECRETKEY.

WTF_CSRF_SECRET_KEY: CSRF secret key. Defaults to BACKTESTERCSRFSECRETKEY UPLOAD_FOLDER: The folder where JSON Config files will be uploaded. Defaults to "uploads".

OUTPUT_FOLDER: A folder for keeping output files. Defaults to "output"

CFG_FILENAME_BUY: JSON Config BUY file name. Uploading BUY file is being validated based on this name. Defaults to backtester_config_buy.json

CFG_FILENAME_SELL: JSON Config SELL file name. Upload SELL file is being validated based on this name. Defaults to backtester_config_sell.json

LOG_FILE: Main app log file name. Defaults to app.log

MAIN_PY_COMMAND: Python command to launch your .py file for testing. Defaults to "python main.py".

DROPZONE_ALLOWED_FILE_TYPE: Uploading file type. Defaults to ".json".

DROPZONE_MAX_FILE_SIZE: Uploading file size in MBs. Defaults to 50.

DROPZONE_MAX_FILES: Maximum number of files to upload at a time. Defaults to 2.

DROPZONE_TIMEOUT: Uploading file timeout in minutes. Defaults to 5.

UI Elements

TESTER

HOME: Tester or Home page

CONFIG: JSON Config files editor.

RESULTS: Results file downloader.

DOWNLOAD: FIle download button.

UPLOAD: File uploads dropzone and button, works both way.

RESCAN: Files scanning button. Checks for possible changes in the JSON files.

DROPDOWN: Dropdown selector for selecting BUY/SELL files for testing.

START: Test run button.

TERMINATE: Test terminate button.

CONFIG

JSON Editor: JSON Config file editor with user comments.

Param: JSON parameter.

Value: Parameter's value.

Comment: Parameter's user comment.

SAVE CHANGES: Saves possible changes made in the editor.

CANCEL: Cancels possible changes made in the editor.

Note: Parameters' keys are not editable.

RESULTS

Files: Available JSON Config files for downloading.

DROPDOWN: Dropdown selector for selecting BUY/SELL files downloading.

DOWNLOAD: Button for downloading BUY/SELL files.