Frictrade
This commit is contained in:
18
Frictrade.py
18
Frictrade.py
@@ -511,8 +511,15 @@ class Frictrade(IStrategy):
|
|||||||
dataframe.loc[
|
dataframe.loc[
|
||||||
(
|
(
|
||||||
# (dataframe['sma5_inv'] == 1)
|
# (dataframe['sma5_inv'] == 1)
|
||||||
((dataframe['pct180'] < 0.5) | (dataframe['close'] < dataframe['sma60']))
|
(
|
||||||
|
(dataframe['pct180'] < 0.5) |
|
||||||
|
(
|
||||||
|
(dataframe['close'] < dataframe['sma60'] )
|
||||||
|
& (dataframe['sma24_deriv1'] > 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
& (dataframe['hapercent'] > 0)
|
& (dataframe['hapercent'] > 0)
|
||||||
|
& (dataframe['sma24_deriv1'] > - 0.03)
|
||||||
# & (
|
# & (
|
||||||
# (dataframe['percent3'] <= -0.003)
|
# (dataframe['percent3'] <= -0.003)
|
||||||
# | (dataframe['percent12'] <= -0.003)
|
# | (dataframe['percent12'] <= -0.003)
|
||||||
@@ -636,7 +643,8 @@ class Frictrade(IStrategy):
|
|||||||
|
|
||||||
condition = last_candle['hapercent'] > 0 and last_candle['sma24_deriv1'] > 0
|
condition = last_candle['hapercent'] > 0 and last_candle['sma24_deriv1'] > 0
|
||||||
limit_buy = 40
|
limit_buy = 40
|
||||||
if decline >= dca_threshold and condition:
|
# or (last_candle['close'] <= last_candle['min180'] and hours > 3)
|
||||||
|
if (decline >= dca_threshold) and condition:
|
||||||
try:
|
try:
|
||||||
if self.pairs[pair]['has_gain'] and profit > 0:
|
if self.pairs[pair]['has_gain'] and profit > 0:
|
||||||
self.pairs[pair]['force_sell'] = True
|
self.pairs[pair]['force_sell'] = True
|
||||||
@@ -809,8 +817,12 @@ class Frictrade(IStrategy):
|
|||||||
stake=0
|
stake=0
|
||||||
)
|
)
|
||||||
|
|
||||||
if last_candle['sma24_deriv1'] > 0 and minutes < 180 and baisse < 30: # and last_candle['sma5_deriv1'] > -0.15:
|
if last_candle['sma24_deriv1'] > 0 : #and minutes < 180 and baisse < 30: # and last_candle['sma5_deriv1'] > -0.15:
|
||||||
|
if (minutes < 180):
|
||||||
return None
|
return None
|
||||||
|
if (minutes > 1440 and last_candle['sma60_deriv1'] > 0) :
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
# ----- 4) OFFSET : faut-il attendre de dépasser trailing_stop_positive_offset ? -----
|
# ----- 4) OFFSET : faut-il attendre de dépasser trailing_stop_positive_offset ? -----
|
||||||
if current_trailing_only_offset_is_reached:
|
if current_trailing_only_offset_is_reached:
|
||||||
|
|||||||
Reference in New Issue
Block a user