The ConsensusShort strategy is a trading strategy that involves using multiple technical indicators to make buy and sell decisions. Here's a breakdown of what the strategy does:
It populates various indicators using the input dataframe, such as RSI, stochastic, MACD, Hull, VWMA, TEMA, EMA, SMA, Laguerre, OSC, CMF, CCI, CMO, Ichimoku, Ultimate Oscillator, Williams, Momentum, and ADX. It calculates a consensus score for buying and selling based on the indicators' evaluations.
It calculates the RMI (Relative Momentum Index) and determines if it's in a downtrend.
It calculates SSL (Schaff Trend Cycle) channels using ATR (Average True Range) and determines the direction as up or down.
It determines if the candle is in a downtrend based on the close and open prices. It populates the entry trend by setting the 'enter_short' value to 1 if the consensus buy score is below a certain threshold. It populates the exit trend by setting the 'exit_short' value to 0. It sets the leverage value. It implements a custom stop-loss mechanism based on current profit, candle SROC (Smoothed Rate of Change), and time. It implements a custom sell mechanism based on current profit, RMI downtrend, SSL direction, candle downtrend, and various configuration options. Overall, the strategy uses a combination of indicators, consensus scores, and custom rules to determine entry and exit points for short positions, set leverage, and manage stop-loss and sell decisions.