The mabStra strategy is a trading strategy implemented in Python. It uses the Freqtrade framework for backtesting and optimization of trading strategies. The strategy is designed to operate on 4-hour candlestick data.
The strategy is based on moving averages and divergence indicators.
It calculates several moving averages, including mojoMA, fastMA, and slowMA, using the TA-Lib library.
These moving averages are used to generate buy and sell signals. For the buy signal, the strategy checks if the ratio between mojoMA and fastMA is within a specified range (buy_div_min to buy_div_max), and the ratio between fastMA and slowMA is also within the same range. If both conditions are met, a buy signal is generated. For the sell signal, the strategy checks if the ratio between fastMA and mojoMA is within a specified range (sell_div_min to sell_div_max), and the ratio between sell-slowMA and sell-fastMA is also within the same range. If both conditions are met, a sell signal is generated. The strategy also includes parameters for setting the timeframes and ranges for the moving averages and divergence indicators. These parameters can be adjusted to optimize the strategy's performance. The strategy defines a minimal ROI table, which specifies the desired return on investment at different stages of the trade. It also sets a stop loss level (-0.128), which determines the maximum acceptable loss before closing a trade. Overall, the mabStra strategy aims to identify potential buying and selling opportunities based on the behavior of moving averages and divergence indicators in the 4-hour timeframe.