Collez votre IStrategy — freqrunner l'exécute dans un conteneur Docker sécurisé et calcule des métriques précises.
Clúster Docker en la nube
·
Freqtrade 2026.x
·
Binance Futures & Spot OHLCV
·
Cero configuración local
Écrivez une classe héritant de IStrategy selon les standards Freqtrade. Définissez populate_entry_trend et populate_exit_trend pour générer des signaux. Support natif de pandas_ta, ta-lib et can_short.
La classe doit hériter de IStrategypopulate_entry_trend → génère les colonnes enter_long / enter_shortpopulate_exit_trend → génère les colonnes exit_long / exit_short
⚡
from freqtrade.strategy import IStrategy
from pandas import DataFrame
import talib.abstract as ta
classMyStrategy(IStrategy):
timeframe ='15m'# set the initial stoploss to -10%
stoploss =-0.10# exit profitable positions at any time when the profit is greater than 1%
minimal_roi ={"0":0.01}defpopulate_indicators(self, dataframe: DataFrame, metadata:dict)-> DataFrame:# generate values for technical analysis indicators
dataframe['rsi']= ta.RSI(dataframe, timeperiod=14)return dataframe
defpopulate_entry_trend(self, dataframe: DataFrame, metadata:dict)-> DataFrame:# generate entry signals based on indicator values
dataframe.loc[(dataframe['rsi']<30),'enter_long']=1return dataframe
defpopulate_exit_trend(self, dataframe: DataFrame, metadata:dict)-> DataFrame:# generate exit signals based on indicator values
dataframe.loc[(dataframe['rsi']>70),'exit_long']=1return dataframe