supertrend

This commit is contained in:
Stefano Ariestasia
2025-04-16 17:58:50 +09:00
parent e0579b641b
commit b78ef687e7
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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)