The Precognition strategy is a trading strategy implemented in Python using the Freqtrade library. It is designed to backtest and execute trades based on specific conditions in the market. The strategy uses moving averages (EMA) as indicators to generate buy and sell signals.
The parameters of the strategy include the fast and slow periods for the moving averages, as well as the push and shift values used in the calculations.
In the buy signal generation, the strategy checks if the fast moving average crosses above the slow moving average, with an additional condition based on the push and shift values.
If the conditions are met, a buy signal is generated. In the sell signal generation, the same principle applies, but with the fast and slow moving averages adjusted according to the sell parameters. If the conditions are met, a sell signal is generated. The strategy also includes parameters for stop loss and trailing stop functionality, which can be enabled or disabled based on user preference. Overall, the Precognition strategy aims to identify potential trends in the market using moving averages and execute trades accordingly.