The TAD (Technical Analysis and Data) strategy is a backtesting strategy that involves populating indicators, identifying buy and sell conditions, and generating trading signals. In the populate_indicators method, the strategy calculates the Relative Strength Index (RSI) indicator using a 14-day time period and adds it to the dataframe. Additionally, it merges informative data from 5-minute and 1-hour timeframes to the main dataframe.
The dontbuy column is created based on specific conditions.
It checks if the day of the week is Sunday (6) and the hour is greater than or equal to 6, or if the day of the week is Monday (0) and the hour is less than 6.
If either condition is met, the dontbuy value is set to True. In the populate_buy_trend method, the strategy defines buy conditions. It checks if the pair is not "BTC/USDT," the dontbuy value is False, and the volume is greater than 0. If these conditions are met, the corresponding row in the dataframe is marked as a potential buy signal. In the populate_sell_trend method, the strategy defines sell conditions. It checks if the volume is greater than 0, indicating that there is a position to sell. If the condition is met, the corresponding row in the dataframe is marked as a potential sell signal. Overall, the TAD strategy utilizes the RSI indicator, merges informative data, and incorporates specific buy and sell conditions to generate trading signals.