# source: https://raw.githubusercontent.com/rmallarapu-bc/brahma/9287745fc036c2f4c00c586e598290885c2883b9/archive/Hodl.py
from freqtrade.strategy import IStrategy
from pandas import DataFrame
from glassnode_ft import get_mvrv_data
import pandas as pd

class Github_rmallarapu_bc_brahma__Hodl__20240229_213751(IStrategy):
    INTERFACE_VERSION: int = 3
    minimal_roi = {"0": 10.0}
    stoploss = -0.95
    timeframe = "1d"

    # Exit criteria
    use_exit_signal = False

    # Trailing stoploss
    # trailing_stop = True
    # trailing_stop_positive = 0.01
    # trailing_stop_positive_offset = 0.50
    # trailing_only_offset_is_reached = True

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        return dataframe

    def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[(dataframe['date'].dt.minute.isin([0])), 'enter_long'] = 1
        return dataframe

    def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        return super().populate_exit_trend(dataframe, metadata)