The BTCNDrop strategy is a trading strategy that utilizes various technical analysis indicators to generate buy and sell signals for Bitcoin (BTC) trading. Here is a brief description of what the strategy does:
populate_indicators: This function adds multiple technical analysis indicators to the input DataFrame. The indicators used include:
Money Flow Index (MFI)
Simple Moving Average (SMA)
Moving Average Convergence Divergence (MACD)
Stochastic Fast
Relative Strength Index (RSI)
Fisher Transform of RSI
Bollinger Bands (upper band, middle band, lower band, and gain)
Exponential Moving Averages (EMAs)
Stop and Reverse (SAR)
populate_entry_trend: This function determines the conditions for entering a trade (generating a buy signal) based on the populated indicators.
The conditions considered include:
MFI value is less than or equal to a specified threshold
Fisher RSI value is less than a specified threshold
Close price is less than or equal to the lower Bollinger Band
Additionally, if a specific number of previous candles is specified, the strategy checks if the close price of each of those candles is less than or equal to the corresponding open price.
Moreover, it calculates the drop percentage between the open price of the specified candle and the current close price, and if it exceeds a specified threshold, it generates a buy signal.
populate_exit_trend: This function populates the sell signal for the given DataFrame based on TA indicators. In this particular strategy, it sets the sell signal to 0 for all rows where the close price is greater than or equal to 0. Overall, the BTCNDrop strategy aims to generate buy signals based on various technical indicators and defines the conditions for entering and exiting trades.