Timeframe
1h
Direction
Long & Short
Stoploss
-10.0%
Trailing Stop
No
ROI
0m: 10.0%
Interface Version
3
Startup Candles
50
Indicators
2
from pandas import DataFrame
import talib.abstract as ta
from freqtrade.strategy import IStrategy
class TestV1(IStrategy):
INTERFACE_VERSION = 3; timeframe = "1h"; can_short = True
stoploss = -0.1; minimal_roi = {"0": 0.1}
max_open_trades = 1; startup_candle_count = 50
process_only_new_candles = True; use_exit_signal = False
def populate_indicators(self, d, m):
d["e10"] = ta.EMA(d, timeperiod=10)
d["e30"] = ta.EMA(d, timeperiod=30)
d["e100"] = ta.EMA(d, timeperiod=100)
d["md"] = ta.MACD(d, fastperiod=12, slowperiod=26, signalperiod=9)["macd"]
d["ms"] = ta.MACD(d, fastperiod=12, slowperiod=26, signalperiod=9)["macdsignal"]
return d
def populate_entry_trend(self, d, m):
# ALWAYS short
d.loc[(d["volume"] > 0), ["enter_short", "enter_tag"]] = (1, "always")
return d
def populate_exit_trend(self, d, m): return d