diff options
| author | Павел Жуков <33721692+LeaveMyYard@users.noreply.github.com> | 2023-05-11 16:30:42 +0300 |
|---|---|---|
| committer | Павел Жуков <33721692+LeaveMyYard@users.noreply.github.com> | 2023-05-11 16:30:42 +0300 |
| commit | 717baa6b12e09b5103c05737c11b2f56dcf651ba (patch) | |
| tree | 0f53cb9f52ecc2d04c2bd8eaa44572767631a8ad /examples | |
| parent | 774731c008a3f648185270b0aa42ca13ac3ad1bf (diff) | |
Replace decimals on numpy arrays, keep timestapms
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/custom_strategy.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/custom_strategy.py b/examples/custom_strategy.py index 5917dc4..5b38f68 100644 --- a/examples/custom_strategy.py +++ b/examples/custom_strategy.py @@ -1,7 +1,5 @@ # This is an example on how to create your own custom strategy -from decimal import Decimal - import pydantic as pd import robusta_krr @@ -11,8 +9,8 @@ from robusta_krr.api.strategies import BaseStrategy, StrategySettings # Providing description to the settings will make it available in the CLI help class CustomStrategySettings(StrategySettings): - param_1: Decimal = pd.Field(99, gt=0, description="First example parameter") - param_2: Decimal = pd.Field(105_000, gt=0, description="Second example parameter") + param_1: float = pd.Field(99, gt=0, description="First example parameter") + param_2: float = pd.Field(105_000, gt=0, description="Second example parameter") class CustomStrategy(BaseStrategy[CustomStrategySettings]): |
