Small doc refactoring

This commit is contained in:
Matthias
2021-01-19 22:07:10 +01:00
parent 7c99e6f0e6
commit 86b3306a3b
2 changed files with 42 additions and 42 deletions

View File

@@ -398,3 +398,29 @@ class MyAwesomeStrategy2(MyAwesomeStrategy):
```
Both attributes and methods may be overridden, altering behavior of the original strategy in a way you need.
## Embedding Strategies
Freqtrade provides you with with an easy way to embed the strategy into your configuration file.
This is done by utilizing BASE64 encoding and providing this string at the strategy configuration field,
in your chosen config file.
### Encoding a string as BASE64
This is a quick example, how to generate the BASE64 string in python
```python
from base64 import urlsafe_b64encode
with open(file, 'r') as f:
content = f.read()
content = urlsafe_b64encode(content.encode('utf-8'))
```
The variable 'content', will contain the strategy file in a BASE64 encoded form. Which can now be set in your configurations file as following
```json
"strategy": "NameOfStrategy:BASE64String"
```
Please ensure that 'NameOfStrategy' is identical to the strategy name!