Merge branch 'develop' of https://github.com/wizrds/freqtrade into fix/channel-api
This commit is contained in:
commit
4cbea0fd00
BIN
build_helpers/pyarrow-9.0.0-cp39-cp39-linux_armv7l.whl
Normal file
BIN
build_helpers/pyarrow-9.0.0-cp39-cp39-linux_armv7l.whl
Normal file
Binary file not shown.
@ -11,7 +11,7 @@ ENV FT_APP_ENV="docker"
|
|||||||
# Prepare environment
|
# Prepare environment
|
||||||
RUN mkdir /freqtrade \
|
RUN mkdir /freqtrade \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get -y install sudo libatlas3-base curl sqlite3 libhdf5-dev \
|
&& apt-get -y install sudo libatlas3-base curl sqlite3 libhdf5-dev libutf8proc-dev libsnappy-dev \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& useradd -u 1000 -G sudo -U -m ftuser \
|
&& useradd -u 1000 -G sudo -U -m ftuser \
|
||||||
&& chown ftuser:ftuser /freqtrade \
|
&& chown ftuser:ftuser /freqtrade \
|
||||||
@ -37,6 +37,7 @@ ENV LD_LIBRARY_PATH /usr/local/lib
|
|||||||
COPY --chown=ftuser:ftuser requirements.txt /freqtrade/
|
COPY --chown=ftuser:ftuser requirements.txt /freqtrade/
|
||||||
USER ftuser
|
USER ftuser
|
||||||
RUN pip install --user --no-cache-dir numpy \
|
RUN pip install --user --no-cache-dir numpy \
|
||||||
|
&& pip install --user /tmp/pyarrow-*.whl \
|
||||||
&& pip install --user --no-cache-dir -r requirements.txt
|
&& pip install --user --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy dependencies to runtime-image
|
# Copy dependencies to runtime-image
|
||||||
|
@ -1085,9 +1085,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
else:
|
else:
|
||||||
logger.warning("CustomStoploss function did not return valid stoploss")
|
logger.warning("CustomStoploss function did not return valid stoploss")
|
||||||
|
|
||||||
sl_lower_long = (trade.stop_loss < (low or current_rate) and not trade.is_short)
|
if self.trailing_stop and dir_correct:
|
||||||
sl_higher_short = (trade.stop_loss > (high or current_rate) and trade.is_short)
|
|
||||||
if self.trailing_stop and (sl_lower_long or sl_higher_short):
|
|
||||||
# trailing stoploss handling
|
# trailing stoploss handling
|
||||||
sl_offset = self.trailing_stop_positive_offset
|
sl_offset = self.trailing_stop_positive_offset
|
||||||
|
|
||||||
@ -1101,7 +1099,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
if self.trailing_stop_positive is not None and bound_profit > sl_offset:
|
if self.trailing_stop_positive is not None and bound_profit > sl_offset:
|
||||||
stop_loss_value = self.trailing_stop_positive
|
stop_loss_value = self.trailing_stop_positive
|
||||||
logger.debug(f"{trade.pair} - Using positive stoploss: {stop_loss_value} "
|
logger.debug(f"{trade.pair} - Using positive stoploss: {stop_loss_value} "
|
||||||
f"offset: {sl_offset:.4g} profit: {current_profit:.2%}")
|
f"offset: {sl_offset:.4g} profit: {bound_profit:.2%}")
|
||||||
|
|
||||||
trade.adjust_stop_loss(bound or current_rate, stop_loss_value)
|
trade.adjust_stop_loss(bound or current_rate, stop_loss_value)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user