# source: https://raw.githubusercontent.com/Minimal88/AstroTrade/eacf4f2cb4fb3bf97001f699127b65cc02cb8f7b/freqTrade/user_data/strategies/scalping_strategy.py
# user_data/strategies/Github_Minimal88_AstroTrade__scalping_strategy__20250618_062805.py
from freqtrade.strategy.interface import IStrategy
from pandas import DataFrame
import talib.abstract as ta

class Github_Minimal88_AstroTrade__scalping_strategy__20250618_062805(IStrategy):
    timeframe = '5m'  # scalping strategies usually use small timeframes

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
        return dataframe

    def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (dataframe['rsi'] < 30),
            'buy'] = 1
        return dataframe

    def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (dataframe['rsi'] > 70),
            'sell'] = 1
        return dataframe
