|
Q26 ALPHA-TRADING SYSTEM
|
Public Member Functions | |
| def | __init__ (self) |
| def | set_database (self, name="Unamed", path="./", model="sqlite3", log=True, tables=[]) |
| def | set_client (self, name=None, client_connect_path=None, client_contract_path=None) |
| Description : More... | |
| def | set_strategy (self, strategy_name=None, strategy_path=None) |
| Description : More... | |
| def | run (self, latency=60) |
| Description : More... | |
Public Attributes | |
| client | |
| client_name | |
| client_connect_path | |
| client_contract_path | |
| strategy_name | |
| strategy_path | |
| strategy | |
Main class of the Q26 QuanTester module. This object is dedicated to initialize the simulation parameters and output the simulation results.
| def run | ( | self, | |
latency = 60 |
|||
| ) |
Description :
Function that allows to run a trading strategy.
Parameters :
- latency [int] = 60 : Latency time between two execution of the STRATEGY.run() and STRATEGY.show() functions.
The time is expressed in seconds.
Returns :
None
Do be done :
| def set_client | ( | self, | |
name = None, |
|||
client_connect_path = None, |
|||
client_contract_path = None |
|||
| ) |
Description :
Function that allows to define the trading CLIENT object properties.
Parameters :
- name [str] : Name of the client as registered in the local system. The choices are :
- IBKR : Interactive Broker (Trading Workstation)
- MT4 : MetaTrader 4
- client_connect_path [str] : Path to the "client_connection.json" file containing all the informations of connection to the selected client.
- client_contract_path [str] : Path to the "client_contracts.json" file containing all the identities of the different contracts whithin the different
trading platforms.
Returns :
None
Do be done :
| def set_strategy | ( | self, | |
strategy_name = None, |
|||
strategy_path = None |
|||
| ) |
Description :
Function that allows to define the trading STRATEGY object.
Parameters :
- strategy_name [str] : Name of the trading strategy file. - strategy_path [str] : Path to the trading strategy file.
Returns :
None
Do be done :
| client |
Type: class CLIENT()
Description :
This object contains trading API client connexion informations.
| client_connect_path |
Type: string
Description:
Path to the "client_connection.json" file in which the client connexion informations are stored.
| client_contract_path |
Type: string
Description:
Path to the "client_contracts.json" file in which every contract identity is stored.
| client_name |
Type: string
Description :
Name of the client as defined in the local system.
| strategy |
Type: class STRATEGY()
Description:
STRATEGY class stored in the strategy python file.
| strategy_name |
Type: string
Description:
Name of the strategy to be run in live mode.
| strategy_path |
Type: string
Description:
Path to the strategy python file.