The Momentum strategy is a trading strategy that utilizes technical indicators to identify buying and selling opportunities. Here is a short description of what the strategy does:
It uses the MACD (Moving Average Convergence Divergence) indicator to identify trends in the price movement of a security. It calculates the MACD line, signal line, and histogram values based on the price data.
It also calculates the RSI (Relative Strength Index) indicator, which measures the momentum of the price.
The strategy considers two conditions for a buy signal:
The MACD line crosses above the signal line, and the closing price is above the 30-day Exponential Moving Average (EMA).
The RSI crosses above 20. The strategy considers a sell signal when either of the following conditions is met:
The MACD line crosses below the signal line. The RSI crosses below 80. The strategy includes a cooldown period of 4 candles after each trade to avoid frequent buying and selling. It sets a fixed stoploss of -0.04 (4% loss) for risk management. It uses limit orders for both buying and selling, except for the stoploss, which is a market order. It sets a minimum ROI (Return on Investment) of 100% for the trade to be considered profitable. Overall, the Momentum strategy aims to capture short-term trends in the market by combining the signals from the MACD and RSI indicators.