The Schism6 trading strategy is implemented as a class that inherits from the IStrategy class. Here's a short description of what the strategy does:
The populate_indicators method is used to calculate various technical indicators such as RMI (Relative Momentum Index), ROC (Rate of Change), and MP (Momentum Power) for the given trading pair. It also retrieves additional informative data for the pair, such as RSI (Relative Strength Index), 1d_high, 3d_low, and adr (Average Daily Range).
The populate_buy_trend method determines the conditions for initiating a buy trade.
If there is an active trade, it checks if the RMI is in an upward trend, the current profit exceeds a certain threshold based on the peak profit, and the RMI is above a linear growth threshold.
If there is no active trade, it checks if the RSI of the informative data is above a certain value, the closing price is below the 3d_low plus a percentage of adr, the RMI is in a downward trend, and various RMI, RSI, and volume conditions are met. The populate_sell_trend method determines the conditions for initiating a sell trade. If there is an active trade, it checks if the current profit falls below a certain loss cutoff, but is still above the stop loss value, and if the RMI is in a downward trend. If the peak profit of the active trade is greater than zero, it also checks if the RMI crosses below certain thresholds. Additionally, it checks for other trades and their profits, and if the free trade slots are available or if the current trade is the biggest loser. If there is no active trade, it checks if the volume is negative. The remaining code includes some additional logic for handling trade data, including the retrieval of active trades, calculation of profit ratios, and determining the trade start time and open minutes. It also includes functions for retrieving the current price, checking bid and ask strategies, and caching the current price for a pair. Overall, the Schism6 strategy uses a combination of technical indicators and specific conditions to determine the buying and selling signals for a given trading pair.