The QuickieHyperStrategy is a momentum-based trading strategy designed for backtesting. The strategy aims to close trades quickly while minimizing losses. It uses various technical indicators to make buy and sell decisions.
Here is a breakdown of the strategy:
Indicators:
MACD (Moving Average Convergence Divergence): Calculates the MACD line, signal line, and histogram.
TEMA (Triple Exponential Moving Average): Calculates the TEMA line.
SMA (Simple Moving Average): Calculates the SMA lines for periods 200 and 50. ADX (Average Directional Index): Calculates the ADX value. Bollinger Bands: Calculates the lower, middle, and upper bands. Buy Signal:
The strategy generates a buy signal when the following conditions are met:
ADX value is greater than 30. TEMA is below the middle Bollinger Band. TEMA is higher than the previous TEMA value. SMA 200 is greater than the closing price. Sell Signal:
The strategy generates a sell signal when the following conditions are met:
ADX value is greater than 70. TEMA is above the middle Bollinger Band. TEMA is lower than the previous TEMA value. ROI (Return on Investment):
The strategy has predefined ROI targets for different time periods. For example, a 100% ROI target is set for a 1% profit, 30% ROI target for a 3% profit, 15% ROI target for a 6% profit, and 10% ROI target for a 15% profit. Stop Loss:
The strategy has an optimal stop loss value of -0.25, which means that if a trade reaches a loss of 25%, it will be closed. Timeframe:
The strategy is designed to work on 5-minute candlestick data. Hyperopt:
The strategy includes a nested HyperOpt class, which defines the parameter spaces for hyperparameter optimization. It provides a custom range for the stop loss parameter. Overall, the QuickieHyperStrategy aims to capture short-term momentum in the market while applying risk management techniques to limit losses.