The "Precognition" strategy is a backtesting strategy for trading. It uses a combination of moving averages and crossing conditions to generate buy and sell signals. Here is a breakdown of the strategy:
The strategy uses the following parameters for buying:
buy_fast: The period for the fast moving average.
buy_push: The multiplier applied to the slow moving average for the buy signal.
buy_shift: The number of periods to shift the moving averages for the buy signal.
buy_slow: The period for the slow moving average. The strategy uses the following parameters for selling:
sell_fast: The period for the fast moving average. sell_push: The multiplier applied to the slow moving average for the sell signal. sell_shift: The number of periods to shift the moving averages for the sell signal. sell_slow: The period for the slow moving average. The strategy calculates the exponential moving averages (EMA) based on the specified periods. For the buy signal, the strategy checks if the fast EMA crosses above the slow EMA multiplied by the buy_push parameter. For the sell signal, the strategy checks if the fast EMA crosses below the slow EMA multiplied by the sell_push parameter. The strategy applies additional conditions to the buy and sell signals, such as checking for crossed above or crossed below conditions. The strategy also includes parameters for stop-loss and trailing stop. Overall, the strategy aims to generate buy and sell signals based on the crossing of moving averages, with the goal of identifying potential trends and making profitable trades.