summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
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
commit717baa6b12e09b5103c05737c11b2f56dcf651ba (patch)
tree0f53cb9f52ecc2d04c2bd8eaa44572767631a8ad /examples
parent774731c008a3f648185270b0aa42ca13ac3ad1bf (diff)
Replace decimals on numpy arrays, keep timestapms
Diffstat (limited to 'examples')
-rw-r--r--examples/custom_strategy.py6
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]):