TEST Learning
This commit is contained in:
@@ -742,6 +742,10 @@ class EmptyShort(IStrategy):
|
|||||||
|
|
||||||
dataframe["volume_mean"] = dataframe["volume"].rolling(20).mean()
|
dataframe["volume_mean"] = dataframe["volume"].rolling(20).mean()
|
||||||
dataframe["volume_ratio"] = dataframe["volume"] / dataframe["volume_mean"]
|
dataframe["volume_ratio"] = dataframe["volume"] / dataframe["volume_mean"]
|
||||||
|
dataframe['volume2'] = dataframe['volume']
|
||||||
|
dataframe.loc[dataframe['hapercent'] < 0, 'volume2'] *= -1
|
||||||
|
dataframe['volume_spike'] = (abs(dataframe['volume2']) > abs(dataframe['volume2'].rolling(window=20).mean() * 5)) \
|
||||||
|
& (dataframe['volume'].rolling(window=5).max() > 1000)
|
||||||
|
|
||||||
dataframe["market_state"] = 0
|
dataframe["market_state"] = 0
|
||||||
|
|
||||||
@@ -874,13 +878,6 @@ class EmptyShort(IStrategy):
|
|||||||
# Compter les baisses / hausses consécutives
|
# Compter les baisses / hausses consécutives
|
||||||
dataframe = self.calculateDownAndUp(dataframe, limit=0.0001)
|
dataframe = self.calculateDownAndUp(dataframe, limit=0.0001)
|
||||||
|
|
||||||
dataframe['volume2'] = dataframe['volume']
|
|
||||||
dataframe.loc[dataframe['hapercent'] < 0, 'volume2'] *= -1
|
|
||||||
|
|
||||||
# Volume confirmation
|
|
||||||
dataframe['volume_spike'] = (abs(dataframe['volume2']) > abs(dataframe['volume2'].rolling(window=20).mean() * 5)) \
|
|
||||||
& (dataframe['volume'].rolling(window=5).max() > 1000)
|
|
||||||
|
|
||||||
dataframe['sma5_1h'] = dataframe['sma5_1h'].rolling(window=60).mean()
|
dataframe['sma5_1h'] = dataframe['sma5_1h'].rolling(window=60).mean()
|
||||||
|
|
||||||
# récupérer le dernier trade fermé
|
# récupérer le dernier trade fermé
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"0": 10
|
"0": 10
|
||||||
},
|
},
|
||||||
"stoploss": {
|
"stoploss": {
|
||||||
"stoploss": -1.0
|
"stoploss": -0.02
|
||||||
},
|
},
|
||||||
"trailing": {
|
"trailing": {
|
||||||
"trailing_stop": false,
|
"trailing_stop": false,
|
||||||
|
|||||||
1812
FrictradeLearning.py
1812
FrictradeLearning.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user