From b78ef687e76c4941921ac0e85616b794b334452c Mon Sep 17 00:00:00 2001 From: Stefano Ariestasia Date: Wed, 16 Apr 2025 17:58:50 +0900 Subject: [PATCH] supertrend --- user_data/strategies/Bandtastic.py | 10 +++++----- user_data/strategies/Supertrend.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/user_data/strategies/Bandtastic.py b/user_data/strategies/Bandtastic.py index 1cbb678..0f8d93f 100644 --- a/user_data/strategies/Bandtastic.py +++ b/user_data/strategies/Bandtastic.py @@ -19,7 +19,7 @@ __BTC_donation__ = "3FgFaG15yntZYSUzfEpxr5mDt1RArvcQrK" # 199/40000: 30918 trades. 18982/3408/8528 Wins/Draws/Losses. Avg profit 0.39%. Median profit 0.65%. Total profit 119934.26007495 USDT ( 119.93%). Avg duration 8:12:00 min. Objective: -127.60220 class Bandtastic(IStrategy): - INTERFACE_VERSION = 2 + INTERFACE_VERSION = 3 timeframe = '15m' @@ -98,7 +98,7 @@ class Bandtastic(IStrategy): return dataframe - def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: + def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] # GUARDS @@ -125,11 +125,11 @@ class Bandtastic(IStrategy): if conditions: dataframe.loc[ reduce(lambda x, y: x & y, conditions), - 'buy'] = 1 + 'enter_long'] = 1 return dataframe - def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: + def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] # GUARDS @@ -156,6 +156,6 @@ class Bandtastic(IStrategy): if conditions: dataframe.loc[ reduce(lambda x, y: x & y, conditions), - 'sell'] = 1 + 'exit_long'] = 1 return dataframe diff --git a/user_data/strategies/Supertrend.py b/user_data/strategies/Supertrend.py index 30d9536..5421bc7 100644 --- a/user_data/strategies/Supertrend.py +++ b/user_data/strategies/Supertrend.py @@ -63,7 +63,7 @@ class Supertrend(IStrategy): timeframe = '1h' - startup_candle_count = 18 + startup_candle_count = 199 buy_m1 = IntParameter(1, 7, default=4) buy_m2 = IntParameter(1, 7, default=4)