mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-16 05:18:07 +00:00
v3.19
This commit is contained in:
+34
-40
@@ -1,56 +1,50 @@
|
||||
<a id="aiomql.result"></a>
|
||||
# Result
|
||||
|
||||
# aiomql.result
|
||||
|
||||
<a id="aiomql.result.Result"></a>
|
||||
|
||||
## Result Objects
|
||||
## Table of Contents
|
||||
- [Result](#result)
|
||||
- [__init__](#__init__)
|
||||
- [get_data](#get_data)
|
||||
- [to_csv](#to_csv)
|
||||
|
||||
<a id="result"></a>
|
||||
```python
|
||||
class Result()
|
||||
```
|
||||
A base class for handling trade results and strategy parameters for record keeping and analysis.
|
||||
#### Attributes
|
||||
| Name | Type | Description |
|
||||
|--------------|-------------------|-----------------------------------|
|
||||
| `result` | `OrderSendResult` | The result of the trade |
|
||||
| `parameters` | `dict` | The parameters used for the trade |
|
||||
| `name` | `str` | The name of the result object |
|
||||
|
||||
A base class for handling trade results and strategy parameters for record keeping and reference purpose.
|
||||
The data property must be implemented in the subclass
|
||||
|
||||
**Attributes**:
|
||||
|
||||
- `config` _Config_ - The configuration object
|
||||
- `name` - Any desired name for the result file object
|
||||
|
||||
<a id="aiomql.result.Result.__init__"></a>
|
||||
|
||||
#### \_\_init\_\_
|
||||
|
||||
<a id="__init__"></a>
|
||||
### \_\_init\_\_
|
||||
```python
|
||||
def __init__(result: OrderSendResult, parameters: dict = None, name: str = '')
|
||||
```
|
||||
Prepare result data for record keeping and analysis.
|
||||
#### Parameters
|
||||
| Name | Type | Description |
|
||||
|--------------|-------------------|-----------------------------------|
|
||||
| `result` | `OrderSendResult` | The result of the trade |
|
||||
| `parameters` | `dict` | The parameters used for the trade |
|
||||
| `name` | `str` | The name of the result object |
|
||||
|
||||
Prepare result data
|
||||
|
||||
**Arguments**:
|
||||
|
||||
result:
|
||||
parameters:
|
||||
name:
|
||||
|
||||
<a id="aiomql.result.Result.to_csv"></a>
|
||||
|
||||
#### to\_csv
|
||||
<a id="get_data"></a>
|
||||
```python
|
||||
def get_data(self) -> dict:
|
||||
```
|
||||
Get the result data as a dictionary
|
||||
#### Returns
|
||||
| Type | Description |
|
||||
|--------|-----------------|
|
||||
| `dict` | The result data |
|
||||
|
||||
<a id="to_csv"></a>
|
||||
### to\_csv
|
||||
```python
|
||||
async def to_csv()
|
||||
```
|
||||
|
||||
Record trade results and associated parameters as a csv file
|
||||
|
||||
<a id="aiomql.result.Result.save_csv"></a>
|
||||
|
||||
#### save\_csv
|
||||
|
||||
```python
|
||||
async def save_csv()
|
||||
```
|
||||
|
||||
Save trade results and associated parameters as a csv file in a separate thread
|
||||
|
||||
|
||||
Reference in New Issue
Block a user