The Fractals strategy is a trading strategy that uses various technical indicators to determine buy and sell signals. Here is a brief explanation of what the strategy does:
populate_indicators: This function takes a DataFrame with exchange data and adds several technical indicators to it. These indicators include fractals, moving averages (ma1 and ma2), relative strength index (rsi), and average directional index (adx).
populate_buy_trend: Based on the populated indicators in the DataFrame, this function determines the buy signal.
It checks for specific conditions such as the ma1 being greater than ma2, the fractal value being -1, the rsi value being greater than 30, and the adx value being greater than 25.
If all these conditions are met, it sets the 'buy' column in the DataFrame to 1. populate_sell_trend: Similar to populate_buy_trend, this function determines the sell signal based on the indicators. It checks for conditions such as ma1 being less than ma2 and rsi being greater than 70, or fractal value being 1 and rsi being greater than 70. If any of these conditions are met, it sets the 'buy' column in the DataFrame to 1. Overall, the Fractals strategy combines multiple indicators to identify potential buying and selling opportunities in the market.