The mark_strat strategy is a trading strategy that utilizes several technical analysis (TA) indicators to generate buy and sell signals. Here's a breakdown of what the strategy does:
populate_indicators function:
This function adds various TA indicators to the given DataFrame, such as RSI (Relative Strength Index), Stochastic RSI, MACD (Moving Average Convergence Divergence), SAR (Stop and Reverse), and Bollinger Bands. It calculates and populates columns in the DataFrame with the values of these indicators.
It's important to note that uncommenting only the indicators being used in your strategies or hyperopt configuration can improve performance by reducing memory and CPU usage.
populate_buy_trend function:
This function determines the buy signals based on the TA indicators in the DataFrame.
It sets the 'buy' column to 1 for the rows that meet the following conditions:
The close price is below the lower Bollinger Band. The volume is greater than 0. populate_sell_trend function:
This function determines the sell signals based on the TA indicators in the DataFrame. It sets the 'sell' column to 1 for the rows that meet the following conditions:
The RSI value is above 90. The close price is above the middle Bollinger Band. The volume is greater than 0. Overall, the mark_strat strategy uses TA indicators like RSI, Stochastic RSI, MACD, SAR, and Bollinger Bands to identify potential buying opportunities when the price is below the lower Bollinger Band and selling opportunities when the RSI is high and the price is above the middle Bollinger Band.