Inputs reference
Every input of Meanward Revert Strategy, group by group, in the order of the settings dialog.
The groups below follow the settings dialog from top to bottom. Labels are exactly as on screen, so you can search this page for what you see. Defaults are the code defaults, which equal the Balanced risk preset.
A rule for every input on this page: an existing TradingView alert keeps the settings it was created with. Change anything here and recreate the alert.
Entry and averaging signals
Group 📡 Entry and averaging signals. Which signals open a trade, and which signals add to it while Enable dynamic averaging is off.
| Input | Default | What it does |
|---|---|---|
| General zone for signals | Small zone | How deep into the channel the close must go before a signal counts. Used by every signal whose own zone is Off. Options as in the indicator, plus No zone (the zone isn't checked). |
| FADE + zone | off, Off | FADE opens trades. The zone next to it overrides the general zone for this row. |
| RSI + zone | off, Off | RSI signal opens trades. |
| Divergences + zone | off, Off | Divergence opens trades. |
| MACD + zone | off, Off | MACD signal opens trades. |
| CONSENSUS + zone | on, Off | CONSENSUS opens trades. The default entry signal. |
| ZONE + zone | off, Off | ZONE signal opens trades, on the first bar of the state. |
How the signals themselves work: indicator guide.
Supertrend (MTF)
Three groups that use one higher-timeframe Supertrend line (ATR 12, multiplier 3.5, fixed in the code). They're independent: use any combination.
Group 📉 Supertrend (MTF) · direction filter:
| Input | Default | What it does |
|---|---|---|
| Use direction filter | on | Longs only while the higher-timeframe Supertrend is bullish, shorts only while it's bearish. The direction changes only when that timeframe's bar closes. |
| Supertrend timeframe | 240 | Shared by all three groups. Pick a timeframe well above the chart's (10–40× as a guide); on a lower one it misbehaves. |
| Filter entries | on | The filter blocks new positions. |
| Filter adds | off | The filter blocks adds to an open position. Both off: the filter blocks nothing. |
Group 📉 Supertrend (MTF) · line-side gate:
| Input | Default | What it does |
|---|---|---|
| Use gate | off | Blocks an entry or add when price is too close to the Supertrend line, or past it. Unlike the direction filter it checks where price is relative to the line on every chart bar, without waiting for the higher-timeframe close. |
| Filter entries / Filter adds | on / on | What the gate applies to. |
| Slack threshold (line ATR) | 0.0 | Minimum distance to the line in the line's own ATR. 0 blocks only the wrong side and crossings; a negative value lets price go past the line. 1.0 means "less than a third of the band left before a flip". |
| Check window (bars) | 1 | The smallest slack over this many chart bars is used, so a recent approach to the line still blocks. 1 checks the current bar only. |
| Show gate zone | on | Draws the gate's edges around the line while the gate is on. |
Group 📉 Supertrend (MTF) · line stop:
| Input | Default | What it does |
|---|---|---|
| Close position if price is past the line | off | A regime stop: closes the position at market when the close stays on the wrong side of the Supertrend line for N bars in a row (long: below the line, short: above). |
| Confirmation (chart bars) | 5 | How many bars in a row. 1 closes on the first bar past the line. |
Price distance between orders
Group 📈 Price distance between orders. Also holds the signal skip filter.
| Input | Default | What it does |
|---|---|---|
| Use price distance filter | on | The next order of a trade needs a minimum price move from the previous filled order. Not the same as the signal groups' Price filter, which is anti-spam. |
| Price distance threshold (%) | 2.0 | That minimum move. One threshold for all signals. |
| FADE / RSI / Divergences / MACD / CONSENSUS / ZONE | FADE and CONSENSUS on | Which signals the filter applies to. |
| Price distance filter only after entry | on | The filter doesn't block the first order of a trade, only the adds. |
| Enable signal skip filter | on | Turns the skip filter on. |
| Skip interval | Don't skip | Every 2nd … Every 5th: take every Nth allowed signal and skip the rest. |
CONSENSUS settings
Group 🤝 CONSENSUS settings. The same inputs as the indicator's CONSENSUS group (Condition logic, RSI, Divergence, MACD, ZONE, FADE role in CONSENSUS, Auto check window, Check window (manual, bars), Label gap from FADE labels (ATR)), with one difference: MACD is on by default here. So the strategy's default CONSENSUS is FADE plus any two of RSI, divergence and MACD.
Channel width filter
Group 📏 Channel width filter. A narrow channel means little room to the target; this filter skips signals while the channel is too narrow. Width = the inner band in % of price, taken from the previous bar.
| Input | Default | What it does |
|---|---|---|
| Use channel width filter | on | Turns the filter on. |
| Filter mode | Dynamic (auto) | Fixed %: width must be at least Min width. Dynamic (auto): width must be at least Dynamic mode coefficient × its own average over the lookback depth. |
| Min width (% of price) | 0.8 | The threshold in Fixed % mode. Ignored in Dynamic (auto) mode. |
| Auto lookback depth | on | Depth by timeframe: up to 5m → 500 bars, 15m–30m → 300, 1h–2h → 200, 4h and up → 100. |
| Lookback depth manual | 200 | Depth with auto off. |
| Dynamic mode coefficient | 0.9 | The share of the average width required in dynamic mode. |
Volatility filter (ATR Ratio)
Group 🌊 Volatility filter (ATR Ratio). ATR Ratio = ATR(14) / ATR(200), from the previous bar. Above 1, volatility is rising.
| Input | Default | What it does |
|---|---|---|
| Volatility filter on | off | Signals pass only when min ≤ ATR Ratio ≤ max. |
| Min ATR Ratio (≥) | 0.0 | Lower bound. |
| Max ATR Ratio (≤) | 3.0 | Upper bound. 0 turns the upper bound off. |
Bot start
Group 📅 Bot start.
| Input | Default | What it does |
|---|---|---|
| Use date/time filter | on | Signals before Start time are ignored. |
| Start time | 15 Jun 2026 | Set it to the day you go live, so the chart doesn't sit mid-trade when your first alert fires. The time zone is in the picker. |
| Limit end time | off | After End time no new entries, adds or labels; an open position runs to its exit. |
| End time | 31 Dec 2099 |
Higher-timeframe averaging
Group 🪜 Higher-timeframe averaging. Slots for the TF selector of each add level (see the Long group). An add level set to Higher A or Higher B takes its signal from that timeframe's signal layer: same signal settings, auto periods for that timeframe. The signal arrives on the first chart bar after the higher-timeframe bar closes, without repainting.
| Input | Default | What it does |
|---|---|---|
| Higher TF A | 15 | Slot A. Must be above the chart timeframe; otherwise it behaves as Chart. |
| Higher TF B | 60 | Slot B. |
| Supertrend direction filter | on | The only market filter for higher-timeframe adds: long adds while that Supertrend is bullish, short adds while bearish. |
| Supertrend timeframe | 240 | Timeframe of that Supertrend (ATR 12, multiplier 3.5). |
Higher-timeframe adds skip the chart-timeframe gates (channel width, ATR Ratio, ROC, time gate, line-side gate, trading hours, the MTF direction filter, the skip filter). The price distance filter, the bot's time window, auto add size, Max adds and the no-adds-above rules still apply.
Long: general
Group 📈 Long: general. The long bot. Its sizes are in USDT of notional, not margin.
| Input | Default | What it does |
|---|---|---|
| Enable long bot | on | Turns the long side on. |
| Averaging-only mode | off | The strategy doesn't send the open command (your bot already holds the position) but does send adds. In the tester the entry is still filled; otherwise there'd be nothing to add to. |
| Don't send close command on take profit | off | On: only the exchange's own TP order closes the trade; no close command goes out when the strategy's internal TP is hit. |
| No adds above entry | on | Never adds above the entry price. |
| No adds above previous order | on | Never adds above the previous order's price. |
| Long bot name | LONG BOT | Column name in the dashboard. |
| Volume (USDT) | 500 | Size of the first order. In the tester, quantity = volume / price. |
| Leverage | 10 | Sent to the exchange with the open command. |
| Margin | cross | cross or isolated, sent with the open command. |
| Take profit (%) | 0.5 | TP distance from the average entry price. |
| Martingale multiplier | 2.0 | Each add = previous order × this. Used only when Enable dynamic martingale is off. |
| Max adds | 2 | After this many adds the position just waits for an exit. Up to 10. |
| Take profit boost (%) | 8.0 | Exchange TP only: the TP sent to the exchange is TP% × (1 + boost/100), so 0.5% becomes 0.54%. Covers entry slippage; the strategy's internal TP doesn't change. |
| Enable dynamic martingale | on | Each add = previous order × the multiplier of its level (below). |
| 1st add / 2nd / 3rd / 4th | 4 / 3 / 2 / 2 | The level multipliers. |
| After 4th | 1.0 | Multiplier for every add after the 4th. |
| Enable dynamic averaging | on | Each add level takes its own signal, zone and timeframe from the rows below, instead of the signals in 📡. |
| 1st: signal + zone + TF | CONSENSUS, Small zone, Chart | Signal, zone and timeframe for the first add. TF: Chart, Higher A or Higher B. |
| 2nd: signal + zone + TF | CONSENSUS, Small zone, Chart | Second add. |
| 3rd: signal + zone + TF | FADE, Small zone, Chart | Third add. |
| 4th: signal + zone + TF | FADE, Small zone, Chart | Fourth add. |
| 5th: signal + zone + TF | FADE, Small zone, Chart | Fifth add and later. |
Long: stop loss
Group 📈 Long: stop loss.
| Input | Default | What it does |
|---|---|---|
| Use stop loss | off | Turns the stop loss on. |
| Stop loss (%) | 0.0 | Distance from the average entry price. |
| Stop delay (sec) | 3 | Kept for bot compatibility. Not sent in the alert and not modelled in the backtest. |
| Stop loss on short signal | off | Closes the long at market when a short entry signal appears. |
| Send close command on stop loss | off | On: a stop sends a close command to the bot. Off: the stop exists only in the tester. |
Long: take profit update
Group 📈 Long: take profit update. Pulls the TP closer once a position has been averaged.
| Input | Default | What it does |
|---|---|---|
| Take profit update | on | Turns the update on. |
| Add level for the update | 1 | After which add the TP changes. |
| New take profit (%) | 0.2 | The new TP distance from the new average. Sent to the exchange as an update command, with the boost applied. |
Short groups
Groups 📉 Short: general, 📉 Short: stop loss and 📉 Short: take profit update mirror the long ones, with these differences:
- Enable short bot, Short bot name (
SHORT BOT); - No adds below entry and No adds below previous order instead of "above";
- Stop loss on long signal instead of "on short signal";
- defaults: 4th = 1.0, and every add level uses
Ultra-small zone(signals as on the long side: CONSENSUS, CONSENSUS, FADE, FADE, FADE).
Backtest
Group 📊 Backtest.
| Input | Default | What it does |
|---|---|---|
| Backtest dashboard | on | Shows the dashboard. |
| Position | Top right | Where on the chart. |
Signal groups
Groups ⚡ FADE — base signal, 📐 RSI signals, 🔀 Divergences, 📏 MACD signals, 🌡 ZONE signals, 📊 Trend filters, 📈 Channel and zones (MRC) and 📉 Supertrend work exactly as in the indicator; see the indicator guide. Differences in the strategy:
- no Show … signals switches and no own zone selectors in the signal groups. Display switches are in 🎨 Display; zones are set per signal in 📡 and per add level;
- Highlight transparency sits in the FADE group, the highlight switch itself in 🎨 Display;
- in ZONE, the input is Signal on every zone bar. As an entry or add signal it then fires on every bar in the zone, so only the no-adds rules and the price distance filter hold adds back;
- Trend filters have no Show trend state labels; Channel and zones have no display switches; Supertrend has only ATR period and Multiplier.
Display
Group 🎨 Display. Cosmetic: nothing here changes a trade.
| Input | Default | What it does |
|---|---|---|
| Label position | Medium | Vertical offset of trade and signal labels from the bar. |
| Show MRC channel | off | Channel bands and the small and deep zone edges. |
| Show mean line | off | The mean line. |
| Show inner band | off | R1/S1. |
| Show Supertrend (chart TF) | off | The chart-timeframe Supertrend. |
| Highlight FADE zones | off | The overextension fill. |
| Show JSON labels | off | A label with the exact alert body on every command bar. For checking what goes to the bot. |
| Show take profit level | on | A stepped line at the TP target: average price ± current TP%. Moves with every add. With a channel line or signal exit on, it shows that target instead. |
| Dashboard theme | Dark | Dark or Light. |
| Hide signals when bots are off | off | Hides signal labels while both Enable long bot and Enable short bot are off. |
| Hide signals without a trade/add | on | Signal labels aren't drawn at all; filled entries and adds show as trade labels. Turn it off to see every signal the strategy saw. |
Rate-of-change filter (ROC)
Group 🚀 Rate-of-change filter (ROC). Blocks counter-trend orders during a strong move.
| Input | Default | What it does |
|---|---|---|
| Use rate-of-change filter | off | A rise faster than the threshold blocks shorts (entries and adds); a drop blocks longs. |
| Measurement mode | Both (OR) | Last hours window, From trade entry (limits adds only: a move against the position from its entry beyond the threshold blocks the add) or both. |
| Window (hours) | 4.0 | The window for Last hours window. |
| Move threshold per window (%) | 5.0 | The move within the window that blocks. |
| Move threshold from entry (%) | 4.0 | The move from the entry that blocks adds. |
Position time gate
Group ⏳ Position time gate. Counted from the fill of the trade's first order; one threshold for both bots.
| Input | Default | What it does |
|---|---|---|
| Use position time gate | off | Turns the gate on. |
| Threshold (hours in position) | 24.0 | The hours after which the actions below kick in. |
| Block adds after threshold | on | No more adds after the threshold. |
| Force close position (time stop) | off | Closes the position at market at the threshold. |
Hedging a stuck position
Group 🛡 Hedging a stuck position. Off by default.
Tester only. The alert format has no hedge commands, so neither the connector nor any other bot can execute a hedge. With automation on, what the tester shows as a hedge doesn't happen on the exchange, and the exchange position can end up different from the chart. Use it to study the idea in a backtest, not live.
| Input | Default | What it does |
|---|---|---|
| Hedge a stuck position | off | After the higher-timeframe Supertrend turns against the position, the next opposite signal opens a counter position. While the hedge is open, the original position is frozen: no TP, no adds, no stops. |
| Hedge volume multiplier | 2.0 | Hedge size = multiplier × the frozen position. |
| Hedge exit | Break-even of both | Break-even of both: a limit where the combined result of both positions equals the buffer, then everything closes. Trend change: the hedge closes when the Supertrend turns back and the position resumes from its old average. |
| Break-even buffer, % | 0.1 | Moves the break-even limit a little in your favour, to cover fees. |
| Min drawdown for hedge, % | 2.0 | The hedge opens only if the position is at least this far under its average. |
| Hedge counter-trend entries | off | By default only a trade the Supertrend agreed with at least once gets hedged. On: trades opened against the trend are hedged too. |
| Show hedge on chart | on | Episode labels and the break-even level. |
| Add to hedge | off | Adds to the hedge in its own cascade. Martingale on top of martingale: exposure grows with every level. |
| Hedge add volume multiplier | 2.0 | Each hedge add = previous hedge leg × this. |
| Min move against hedge, % | 1.0 | Price move against the hedge from its last leg before the next hedge add. |
| Max hedge adds | 3 |
Auto add size
Group 🎯 Auto add size.
| Input | Default | What it does |
|---|---|---|
| Auto add size by distance to TP | off | Sizes each add so that, after it, the TP sits at a set distance from the current price. The martingale and level multipliers aren't used; the first order is still Volume (USDT). Shallow drawdown: a small add. Deep drawdown: a large one. If the TP is already closer than the target, the add is skipped. |
| Distance to TP after add, % | 1.0 | From the signal bar's close to the TP after the add. Only reachable when larger than the current TP%. |
| Max multiplier per add | 3.0 | The cap: one add can be at most this many times the current position. The main risk parameter of this mode: the position ceiling per trade is about volume × (1 + cap)^adds, so 500 USDT, cap 3 and two adds is 8,000 USDT. |
Trading hours filter
Group ⏰ Trading hours filter. Limits entries by time of day and day of week. Checked on the signal bar's open time; the order fills on the next bar, so it can land up to one bar inside blocked time. Exits, the time stop and the hedge aren't affected.
| Input | Default | What it does |
|---|---|---|
| Use trading hours filter | off | Turns the filter on. |
| Window mode | Windows block trading | Windows block trading: no entries inside the enabled windows. Windows allow trading: entries only inside them. No window enabled: no hours limit. |
| Window time zone | UTC | UTC, Europe/Moscow, America/New_York or Exchange. Days of the week count in the same zone. |
| Window 1 + session | on, 2000-0400 | First window. |
| Window 2 + session | off, 1330-1530 | Second window. |
| No trading on weekends (Sat, Sun) | off | No entries on Saturday and Sunday. |
| Allow adds inside the filter | on | On: an open position still adds in blocked time; only new entries are blocked. |
| Highlight blocked time on chart | on | Shades blocked time. |
Channel line exit
Group 🎯 Channel line exit. An exit at a channel line instead of the % TP.
| Input | Default | What it does |
|---|---|---|
| Close position at channel line | off | No TP order is placed or sent to the exchange. The position closes at market when a bar closes at the target line or within the tolerance of it. Long waits for the line above, short for the line below. Stops and adds work as before. Not active while a hedge is open. |
| Target line | Mean | Mean, Ultra-small (inner band), Small, Central or Deep. |
| Tolerance to line, % | 0.1 | Fires slightly before the touch: long at close ≥ line × (1 − tolerance). 0 waits for an actual touch. |
| Close at line only in profit | off | A touch closes the position only if the close is at least Min profit at line better than the average price. Otherwise the position waits. |
| Min profit at line, % | 0.0 | That minimum, before fees. 0 means "not in the red". |
Take profit update and Auto add size still compute from TP%; turn them off when you use this exit.
Opposite-signal exit
Group 🔁 Opposite-signal exit. Another exit instead of the % TP. Can be combined with the channel line exit: whichever fires first closes.
| Input | Default | What it does |
|---|---|---|
| Close position on opposite signal in profit | off | No TP order is placed. The position closes at market on the bar where the chosen opposite signal fires, if the close is at least Min profit on signal better than the average price. Otherwise the signal is skipped. Not active while a hedge is open. |
| Exit signal + zone | CONSENSUS, No zone | The signal and its zone. A long closes on a short signal in the upper zone, a short on a long signal in the lower one. No zone: the zone isn't checked. |
| Min profit on signal, % | 0.0 | That minimum, before fees. 0 means "not in the red". |
Without a TP a position can sit through a much deeper move against it before an exit signal comes. Check the drawdown in the tester before you use this live.
Reserved
Group 🧩 Reserved: Reserved 1–5. They do nothing; they hold places so that a future input doesn't reset the ones you've already set. (In 1.46–1.48 Reserved 1 was Risk profile.)