The Apollo11 strategy is a trading strategy implemented as a class that performs backtesting. Here's a short description of what the strategy does:
populate_indicators: This function calculates and populates various technical indicators based on the given price data. These indicators include Exponential Moving Averages (EMAs), Bollinger Bands, and Volume Weighted Moving Average Convergence Divergence (VWMACD).
populate_buy_trend: This function determines the conditions for initiating a buy signal based on the calculated indicators.
It checks multiple conditions, such as the crossover of EMAs, the relationship between price and EMA levels, and the crossing of lower bands.
If the conditions are met, it sets the "buy" flag and assigns a corresponding tag to identify the buy signal. populate_sell_trend: This function is responsible for populating the sell signal. In this strategy, it simply sets the "sell" flag to 0, indicating no sell signal. should_cancel_order: This function determines if an order should be canceled based on the current profit. If the profit exceeds certain thresholds, it returns a specific percentage as a cancellation fee. If the profit is below a certain threshold and a specific time has passed since the trade was opened, it returns a scaled negative profit value to encourage closing the trade. Overall, the Apollo11 strategy combines various technical indicators to generate buy signals based on specific conditions. It does not provide a sell signal, but it includes a function to cancel orders based on the current profit.