MRS2, MRS2 FAST
A version of MRS with separate closing lines for long and short and a set of filters that cancel orders at dangerous moments. One opening line per side, no averaging in.
Order type used: Limit. The opening and closing orders move along their own lines.
By default the bot does not trade if the opening line ends up on the other side of the closing line (for example, the buy line is above the long closing line) - such a trade is a loss from the start.
Parameters
ma_long,ma_short,ma_close_long,ma_close_short- opening and closing lines. Configured the same way as lines in MRSuse_settings_from_open_long,use_settings_from_open_short- build the closing line with the type, source and length of the opening MA (the offset is taken from the closing line)distance_filter- minimum distance in % between the opening and closing line (default 0.3). If closer, orders are cancelled (the potential profit is too small)filter_pump_1- post-pump filter. When the price (source) crosses the closing line upwards, the level of that lineoffsetcandles back is remembered. While the buy line is above this level, the bot does not buyfilter_pump_2- sharp rise filter. If over the lastcountcandles the high isvaluetimes bigger than the low and the high came after the low, trading is pausedfilter_close_position- when a filter triggers, not only cancel orders but also close the open positionunconditional_placement- always place orders, without checking the relative position of the linesallow_close_by_market_order- if the whole candle went above the closing line and the limit order was not filled, close the position with a market orderonly_profit- do not move the closing order below the entry price (for long) - close only in profitreplace_open_order- with an open position, the size of the opening order is reduced by the position sizecancel_if_half_filled- if the opening order is partially filled and the remaining part is less than twice the position, it is cancelled
MRS2 FAST (mrs2fast) - the same logic and the same settings (the mrs2 block), but in one pass the bot performs all the needed order actions at once (update the closing order, move the opening order, etc.) instead of one action per pass. Orders keep up with the MA lines faster - useful on lower timeframes and with many bots.
Backtest the strategy on historical data in the tester and run it in hamster-bot.