Skip to content

Commit 0b84020

Browse files
strategy buying logics updated
1 parent 5fbf1e3 commit 0b84020

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

user_data/strategies/TaSearch1m.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ class TaSearch1m(IStrategy):
1212
n: int
1313
p: float
1414

15-
n = 240
16-
p = 3
15+
n = 180
16+
p = 2
1717
minimal_roi = {
1818
"0": 0.01
1919
}
20-
stoploss = -0.01
20+
stoploss = -0.005
2121

2222
def __init__(self, config: dict) -> None:
2323
super().__init__(config)
@@ -69,7 +69,7 @@ def __populate_buy(self, row: pd.DataFrame):
6969

7070
if row['ex_min_percentage'] \
7171
and row['ex_min_percentage'] < -self.p \
72-
and row['rsi_7'] < 15:
72+
and row['rsi_7'] > 30:
7373
return 'buy'
7474
else:
7575
return ''

user_data/strategies/TaSearch30m.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ class TaSearch30m(IStrategy):
1212
n: int
1313
p: float
1414

15-
n = 36
15+
n = 48
1616
p = 5
1717
minimal_roi = {
1818
"0": 0.03
1919
}
20-
stoploss = -0.02
20+
stoploss = -0.01
2121
timeframe = '30m'
2222

2323
def __init__(self, config: dict) -> None:
@@ -62,10 +62,10 @@ def confirm_trade_exit(self, pair: str, trade: Trade, order_type: str, amount: f
6262
def __populate_buy(self, row: pd.DataFrame):
6363
if row['ex_min_percentage'] \
6464
and row['ex_min_percentage'] < -self.p \
65-
and row['rsi_7'] < 15 \
66-
and row['macd'] < 0 \
67-
and row['macdsignal'] < 0 \
68-
and row['macdhist'] < 0:
65+
and row['rsi_7'] > 30:
66+
# and row['macd'] < 0 \
67+
# and row['macdsignal'] < 0 \
68+
# and row['macdhist'] < 0:
6969
return 'buy'
7070
else:
7171
return ''

0 commit comments

Comments
 (0)