MyStrategyNew is a trading strategy that uses Exponential Moving Averages (EMAs) to generate buy and sell signals. It backtests the strategy using historical price data from different timeframes (5m, 15m, 30m, 1h, 4h) and calculates the ROI (Return on Investment) table. The strategy includes the following parameters:
Trailing stop: It applies a trailing stop to limit losses and protect profits.
Stoploss: It sets a fixed stoploss level to exit a trade if the price goes against the expected direction.
Timeframe: It defines the base timeframe for the strategy.
The strategy calculates two sets of EMAs: one for buying and one for selling. The periods for these EMAs are optimized using hyperopt, with the range specified as 5 to 40. The strategy applies the EMAs to the base timeframe and informative timeframes, merging the data and filling any missing values. For the buy signal, the strategy checks if the fast EMA is above the slow EMA in both the base timeframe and informative timeframes. If the condition is met, a buy signal is generated. For the sell signal, the strategy checks if the fast EMA is below the slow EMA in both the base timeframe and informative timeframes. If the condition is met, a sell signal is generated. The strategy sets a minimal ROI of 1, meaning it aims to achieve at least a 100% return on investment. Overall, MyStrategyNew is a backtested trading strategy based on EMAs that generates buy and sell signals using multiple timeframes and applies trailing stop and stoploss mechanisms.