The Apollo11 strategy is a trading strategy implemented as a class that inherits from the IStrategy interface. It contains several methods that are used in the backtesting process. The populate_indicators method calculates and populates various technical indicators in the input dataframe.
These indicators include exponential moving averages (EMAs), Bollinger Bands, average true range (ATR), and other moving averages.
The calculated values are stored in additional columns in the dataframe.
The populate_buy_trend method determines the conditions for initiating a buy signal based on the calculated indicators. It checks for specific conditions such as the relationship between different EMAs, crossed thresholds, and volume requirements. If the conditions are met, the corresponding rows in the dataframe are marked with a "buy" signal and a descriptive tag. The populate_sell_trend method is responsible for populating the sell signals in the dataframe. In this strategy, it simply sets the "sell" column to 0 for all rows, indicating no sell signals. The calculate_fee method calculates the trading fee based on the current profit. It uses a series of if-else statements to determine the fee percentage based on the profit amount. The fee percentage is returned as a floating-point value. Overall, the Apollo11 strategy uses various technical indicators to generate buy signals based on specific conditions. It does not provide explicit sell signals and calculates a trading fee based on the current profit.