Logo hamster-bot
RU EN PT

Loading…

← All strategies

MRS

MRS - Mean Reversion Strategy. This is a counter-trend strategy that works on the assumption that price will return to its average value after deviating from it. The opening order is placed at an offset from the average price. The closing order is placed at the average price with no offset. On a sharp price deviation, a position opens and closes when the price returns to the average value.

Trades under the strategy are generated at moments when the price moves away from the average by a certain percentage. ⚠️ But if the price keeps moving in the same direction without a pullback, the position will be a loss. Price falls — the strategy buys (going against the trend). Price rises — it sells (also against the trend). But the close will happen sooner or later at the average price, in any case.

As a rule, positions under this strategy aren't held for long. And in a calm market you can stay out of a position for a long time.

Working order type: Limit. Placed in advance and moved as the average price changes.

MRS strategy

In the simplest implementation, the chart has three MA (moving average) lines.
● The base Fuchsia-colored MA shows the price of the closing limit order. No offset
● The Green Long MA - the price of the limit BUY order that opens the LONG position. It's the base MA simply offset down by a %.
● The Red Short MA - the price of the limit SELL order that opens the SHORT position. It's the base MA simply offset up by a %.

How it works: If both long and short are enabled, 2 orders are placed. If only long or short is enabled, 1 order. While waiting for a position, the orders move along their lines with each new candle. When the price reaches the price of our opening order, a position opens and a closing order is placed at the base MA. The closing order also moves along its MA until it's filled. Then the cycle repeats.

Backtest
Test in the built-in backtester

A Pine Script for testing the strategy on historical data in the TradingView strategy tester. It's a popular strategy and you can find many variations under different names.

You can configure this strategy very flexibly.


Backtest the strategy on historical data in the tester and run it in hamster-bot.