Pine Script v4 · Strategy
RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy
A Pine Script v4 strategy built on Change (close), RMA or Change (30) and HMA or RSI (7). It has 2 order rules, 2 entries among them, and trades long and short with the default settings. Exits wait for a signal; there is no stop loss. Each trade is one contract and pays no commission. 28 settings; defaults include Backtest Start Year 2021, Backtest Start Month 1 and Backtest Start Day 1.
Generated from the script's code by a template: every clause is a fact read from the source. Not written by a person or a model, and not taken from the author's description.
- Does RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy repaint?
- No
- No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
- How did RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy do on BTCUSDT 1D with default settings?
- Not measured
- It closed no trades there from 26 Jan 2024 to 21 Oct 2026 with the default settings, so there is no result to report. Its code limits trading to a date window, which can leave this period out. It closed no trades on the other markets either. A backtest, not investment advice.
- Can RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy be converted to Pine Script v5?
- Not tested
- The steps are shown below, but neither version placed a trade on any market tested, so there was nothing to compare and no download is offered.
- Does RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy use a stop loss?
- No
- Every exit waits for a signal; nothing limits a losing trade before it fires.
- Does RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy run in Zeal Terminal?
- Yes
- It compiles in 24 ms and runs 1,000 bars in 80 ms, in the browser.
BTCUSDT · 1D · default settings
- Chande MO
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- HLine
- THRSI
- DEVWRSI
- TERSI
- Net profit
- 0.00%
- $0.00
- Buy and hold
- +102.5%
- same period
- Closed trades
- 0
- 0 won · 0 lost
- Profitable
- 0.0%
- of closed trades
- Profit factor
- —
- gross profit ÷ gross loss
- Max drawdown
- 0.00%
- $0.00
One run with the author's default settings, $100,000 starting capital, commission as the script sets it. A single backtest says little about future results and is not a recommendation. Backtests are simulations on historical data and are not investment advice.
Review
What a careful reader of this script would point out, found by checking the source and the backtest.
-
Check
No stop loss
Every exit waits for a signal. Nothing limits a losing trade before the exit condition fires.
-
Check
No commission
The backtest assumes free trading. Results on any real exchange will be lower.
-
Note
6 settings have no label
In the settings dialog lengthMA (line 46), lengthRSI (line 47), lengthMA2 (line 50), lengthRSI2 (line 51), lengthMA3 (line 53), lengthRSI3 (line 54) show an empty name. The labels on this page come from the variable names.
-
Note
No slippage
Fills are assumed at the exact open price. Add slippage in the properties for a more realistic test.
Upgrade and export
Written in Pine Script v4. The upgrade to v5 takes 1 step, one per version, each applied to the result of the one before. A last clean-v5 pass then types the settings and moves when = into if blocks, which v6 requires. Every step runs before and after on the same candles in Zeal Terminal's engine; a step whose results differ is shown but not offered as a download. Upgrades preserve behaviour: bugs are fixed in the Review, never silently here.
- Upgrading to v5 renames change → ta.change, sum → math.sum, rma → ta.rma, max → math.max, min → math.min, hma → ta.hma, rsi → ta.rsi, ema → ta.ema, vwma → ta.vwma, crossover → ta.crossover, crossunder → ta.crossunder.
v4 → v5
Not verifiedNeither version placed a trade on any of the 8 markets, so there was nothing to compare.
- Line 3: //@version=4 → //@version=5
- Line 20: input(type = input.source) → input.source()
- Line 23: change → ta.change
- Line 28: sum → math.sum
- Line 29: sum → math.sum
- Line 36: input(type = input.integer) → input.int()
21 more edits
- Line 37: input(type = input.integer) → input.int()
- Line 38: rma → ta.rma
- Line 38: max → math.max
- Line 38: change → ta.change
- Line 39: rma → ta.rma
- Line 39: min → math.min
- Line 39: change → ta.change
- Line 48: hma → ta.hma
- Line 48: hma → ta.hma
- Line 48: hma → ta.hma
- Line 48: rsi → ta.rsi
- Line 52: ema → ta.ema
- Line 52: ema → ta.ema
- Line 52: vwma → ta.vwma
- Line 52: rsi → ta.rsi
- Line 55: ema → ta.ema
- Line 55: ema → ta.ema
- Line 55: ema → ta.ema
- Line 55: rsi → ta.rsi
- Line 87: crossover → ta.crossover
- Line 88: crossunder → ta.crossunder
⋯// © burgercrisis-//@version=4+//@version=5strategy("RMI + Triple HMRSI + Double EVWRSI + TERSI Strategy")⋯/////////////// END - Backtesting Period Selector | Component ///////////////-src = input(close, "Price", type = input.source)+src = input.source(close, "Price")CMOlength = input(9, minval=1, title="Alpha Chande Momentum Length")//CMO-momm = change(src)+momm = ta.change(src)f1(m) => m >= 0.0 ? m : 0.0⋯m2 = f2(momm)-sm1 = sum(m1, CMOlength)+sm1 = math.sum(m1, CMOlength)-sm2 = sum(m2, CMOlength)+sm2 = math.sum(m2, CMOlength)percent(nom, div) => 100 * nom / div⋯// Relative Momentum Index script may be freely distributed under the MIT license.-length3 = input(title="RMI Length", type=input.integer, minval=1, defval=30)+length3 = input.int(title="RMI Length", minval=1, defval=30)-momentumLength3 = input(title="RMI Momentum ", type=input.integer, minval=1, defval=25)+momentumLength3 = input.int(title="RMI Momentum ", minval=1, defval=25)-up3 = rma(max(change(src, momentumLength3), 0), length3)+up3 = ta.rma(math.max(ta.change(src, momentumLength3), 0), length3)-down3 = rma(-min(change(src, momentumLength3), 0), length3)+down3 = ta.rma(-math.min(ta.change(src, momentumLength3), 0), length3)rmi3 = (down3 == 0 ? 100 : up3 == 0 ? 0 : 100 - (100 / (1 + up3 / down3)))-50⋯lengthRSI = input(14)-thrsi = hma(hma(hma(rsi(src, lengthRSI), lengthMA), lengthMA), lengthMA)+thrsi = ta.hma(ta.hma(ta.hma(ta.rsi(src, lengthRSI), lengthMA), lengthMA), lengthMA)thrsi1 = (thrsi-50)*10⋯lengthRSI2 = input(14)-devwrsi = ((ema(ema(vwma(rsi(src, lengthRSI2), lengthMA2), lengthMA2), lengthMA2))-50)*5+devwrsi = ((ta.ema(ta.ema(ta.vwma(ta.rsi(src, lengthRSI2), lengthMA2), lengthMA2), lengthMA2))-50)*5lengthMA3 = input(7)lengthRSI3 = input(14)-tersi = ((ema(ema(ema(rsi(src, lengthRSI3), lengthMA3), lengthMA3), lengthMA3))-50)*10+tersi = ((ta.ema(ta.ema(ta.ema(ta.rsi(src, lengthRSI3), lengthMA3), lengthMA3), lengthMA3))-50)*10rmirsi = ((thrsi*rmi3/25))⋯plot(rmi3, color=color.orange, title="RMI")-longcondition1 = crossover(chandeMO, osLevel1)+longcondition1 = ta.crossover(chandeMO, osLevel1)-shortcondition1 = crossunder(chandeMO, obLevel1)+shortcondition1 = ta.crossunder(chandeMO, obLevel1)longcondition2 = rmirsi<osLevel6 and rmi3<osLevel5 and tersi<osLevel4 and devwrsi<osLevel3 and thrsi1<osLevel2 and longcondition1⋯Clean v5
Not verifiedNeither version placed a trade on any of the 8 markets, so there was nothing to compare.
- Line 9: input() → input.int()
- Line 10: input() → input.int()
- Line 11: input() → input.int()
- Line 13: input() → input.int()
- Line 14: input() → input.int()
- Line 15: input() → input.int()
19 more edits
- Line 21: input() → input.int()
- Line 46: input() → input.int()
- Line 47: input() → input.int()
- Line 50: input() → input.int()
- Line 51: input() → input.int()
- Line 53: input() → input.int()
- Line 54: input() → input.int()
- Line 58: input() → input.int()
- Line 59: input() → input.int()
- Line 62: input() → input.int()
- Line 63: input() → input.int()
- Line 66: input() → input.int()
- Line 67: input() → input.int()
- Line 70: input() → input.int()
- Line 71: input() → input.int()
- Line 74: input() → input.int()
- Line 75: input() → input.int()
- Line 78: input() → input.int()
- Line 79: input() → input.int()
⋯//* Modifications made *//-testStartYear = input(2021, "Backtest Start Year") +testStartYear = input.int(2021, "Backtest Start Year") -testStartMonth = input(1, "Backtest Start Month")+testStartMonth = input.int(1, "Backtest Start Month")-testStartDay = input(1, "Backtest Start Day")+testStartDay = input.int(1, "Backtest Start Day")testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,0,0)-testStopYear = input(999999, "Backtest Stop Year")+testStopYear = input.int(999999, "Backtest Stop Year")-testStopMonth = input(9, "Backtest Stop Month")+testStopMonth = input.int(9, "Backtest Stop Month")-testStopDay = input(26, "Backtest Stop Day")+testStopDay = input.int(26, "Backtest Stop Day")testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,0,0)⋯src = input.source(close, "Price")-CMOlength = input(9, minval=1, title="Alpha Chande Momentum Length")+CMOlength = input.int(9, minval=1, title="Alpha Chande Momentum Length")//CMO⋯//-lengthMA = input(7)+lengthMA = input.int(7)-lengthRSI = input(14)+lengthRSI = input.int(14)thrsi = ta.hma(ta.hma(ta.hma(ta.rsi(src, lengthRSI), lengthMA), lengthMA), lengthMA)thrsi1 = (thrsi-50)*10-lengthMA2 = input(7)+lengthMA2 = input.int(7)-lengthRSI2 = input(14)+lengthRSI2 = input.int(14)devwrsi = ((ta.ema(ta.ema(ta.vwma(ta.rsi(src, lengthRSI2), lengthMA2), lengthMA2), lengthMA2))-50)*5-lengthMA3 = input(7)+lengthMA3 = input.int(7)-lengthRSI3 = input(14)+lengthRSI3 = input.int(14)tersi = ((ta.ema(ta.ema(ta.ema(ta.rsi(src, lengthRSI3), lengthMA3), lengthMA3), lengthMA3))-50)*10⋯//Boundary Lines-obLevel1 = input(0, title="Chande Sellline")+obLevel1 = input.int(0, title="Chande Sellline")-osLevel1 = input(0, title="Chande Buyline")+osLevel1 = input.int(0, title="Chande Buyline")hline(obLevel1, color=#0bc4d9)hline(osLevel1, color=#0bc4d9)-obLevel2 = input(0, title="Triple HMRSI Sellline")+obLevel2 = input.int(0, title="Triple HMRSI Sellline")-osLevel2 = input(0, title="Triple HMRSI Buyline")+osLevel2 = input.int(0, title="Triple HMRSI Buyline")hline(obLevel2, color=#5a0bd9)hline(osLevel2, color=#5a0bd9)-obLevel3 = input(0, title="DEVWRSI Sellline")+obLevel3 = input.int(0, title="DEVWRSI Sellline")-osLevel3 = input(0, title="DEVWRSI Buyline")+osLevel3 = input.int(0, title="DEVWRSI Buyline")hline(obLevel3, color=#5a0bd9)hline(osLevel3, color=#5a0bd9)-obLevel4 = input(0, title="TERSI Sellline")+obLevel4 = input.int(0, title="TERSI Sellline")-osLevel4 = input(0, title="TERSI Buyline")+osLevel4 = input.int(0, title="TERSI Buyline")hline(obLevel4, color=#5a0bd9)hline(osLevel4, color=#5a0bd9)-obLevel5 = input(0, title="RMI Sellline")+obLevel5 = input.int(0, title="RMI Sellline")-osLevel5 = input(0, title="RMI Buyline")+osLevel5 = input.int(0, title="RMI Buyline")hline(obLevel5, color=#5a0bd9)hline(osLevel5, color=#5a0bd9)-obLevel6 = input(0, title="RMI*RSI Sellline")+obLevel6 = input.int(0, title="RMI*RSI Sellline")-osLevel6 = input(0, title="RMI*RSI Buyline")+osLevel6 = input.int(0, title="RMI*RSI Buyline")hline(obLevel6, color=#5a0bd9)⋯Does it run in Pine Script v6?
Not tested
Neither version placed a trade on any of the 8 markets, so there was nothing to compare. The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.
⋯// © burgercrisis-//@version=5+//@version=6strategy("RMI + Triple HMRSI + Double EVWRSI + TERSI Strategy")⋯Settings
Every input the script declares, with its default and what it feeds. Bounds are the ones the script enforces.
| Setting | Default | Type and range | Feeds |
|---|---|---|---|
| Backtest Start Year | 2021 | int | testPeriodStart |
| Backtest Start Month | 1 | int | testPeriodStart |
| Backtest Start Day | 1 | int | testPeriodStart |
| Backtest Stop Year | 999999 | int | testPeriodStop |
| Backtest Stop Month | 9 | int | testPeriodStop |
| Backtest Stop Day | 26 | int | testPeriodStop |
| Price | close | source | momm up3 down3 thrsi devwrsi tersi |
| Alpha Chande Momentum Length | 9 | int · min 1 | sm1 sm2 |
| RMI Length | 30 | int (written input.integer) · min 1 | up3 down3 |
| RMI Momentum | 25 | int (written input.integer) · min 1 | up3 down3 |
| Length MA (no label in the script) | 7 | int | thrsi |
| Length RSI (no label in the script) | 14 | int | thrsi |
| Length MA2 (no label in the script) | 7 | int | devwrsi |
| Length RSI2 (no label in the script) | 14 | int | devwrsi |
| Length MA3 (no label in the script) | 7 | int | tersi |
| Length RSI3 (no label in the script) | 14 | int | tersi |
| Chande Sellline | 0 | int | shortcondition1 hline |
| Chande Buyline | 0 | int | longcondition1 hline |
| Triple HMRSI Sellline | 0 | int | shortcondition2 hline |
| Triple HMRSI Buyline | 0 | int | longcondition2 hline |
| DEVWRSI Sellline | 0 | int | shortcondition2 hline |
| DEVWRSI Buyline | 0 | int | longcondition2 hline |
| TERSI Sellline | 0 | int | shortcondition2 hline |
| TERSI Buyline | 0 | int | longcondition2 hline |
| RMI Sellline | 0 | int | shortcondition2 hline |
| RMI Buyline | 0 | int | longcondition2 hline |
| RMI*RSI Sellline | 0 | int | shortcondition2 hline |
| RMI*RSI Buyline | 0 | int | longcondition2 hline |
What it calculates
- Change (
change,ta.changein v5)Price (close)momm · line 23 - RMA / Change (
rma,ta.rmain v5)max(change(src, momentumLength3), 0), RMI Length (30)up3 · line 38 - RMA / Change (
rma,ta.rmain v5)-min(change(src, momentumLength3), 0), RMI Length (30)down3 · line 39 - HMA / RSI (
hma,ta.hmain v5)hma(hma(rsi(src, lengthRSI), lengthMA), lengthMA), Length MA (7)thrsi · line 48 - EMA / VWMA / RSI (
ema,ta.emain v5)ema(vwma(rsi(src, lengthRSI2), lengthMA2), lengthMA2), Length MA2 (7)devwrsi · line 52 - EMA / RSI (
ema,ta.emain v5)ema(ema(rsi(src, lengthRSI3), lengthMA3), lengthMA3), Length MA3 (7)tersi · line 55 - Crossover (
crossover,ta.crossoverin v5)chandeMO, Chande Buyline (0)longcondition1 · line 87 - Crossunder (
crossunder,ta.crossunderin v5)chandeMO, Chande Sellline (0)shortcondition1 · line 88
Signal flow
How price data and settings reach the orders. Each box is a name in the script, or several computed the same way; each arrow is a value one of them reads. Hover a box for its members.
The script has 68 named inputs, calculations, conditions and outputs, too many to draw legibly here; the tables above list them.
Order rules
| Order | Fires when | By default | Line |
|---|---|---|---|
| Open Buy long | longcondition2 | On | 93 |
| Open Sell short | shortcondition2 | On | 95 |
Each order is guarded by the setting shown. “Off” orders never fire unless that setting is switched on.
Does it repaint?
No
No repainting patterns in the source.
- ClearHigher-timeframe dataThe script requests no other symbol or timeframe.
- ClearFuture-bar referencesNo negative history offsets such as close[-1].
- ClearIntrabar recalculationNo varip, calc_on_every_tick or realtime-only state. Orders are decided once per closed bar.
- ClearOrder timingOrders fill at the next bar's open, after the signal bar has closed.
The checks read the source; the replay runs it. Together they catch the common causes, not every possible one.
Other markets
The same script with default settings on 8 Binance markets. Each row is a separate backtest over the most recent 1,000 bars.
| Market | Net | Buy and hold | Trades | Won | Profit factor | Max drawdown | Period |
|---|---|---|---|---|---|---|---|
| BTCUSDT 1D | 0.0% | +102.5% | 0 | 0% | — | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| BTCUSDT 4h | 0.0% | +5.5% | 0 | 0% | — | 0.0% | 8 May 2026 – 21 Oct 2026 |
| ETHUSDT 1D | 0.0% | +9.8% | 0 | 0% | — | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| ETHUSDT 4h | 0.0% | +8.4% | 0 | 0% | — | 0.0% | 8 May 2026 – 21 Oct 2026 |
| SOLUSDT 1D | 0.0% | +16.7% | 0 | 0% | — | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| SOLUSDT 4h | 0.0% | +21.5% | 0 | 0% | — | 0.0% | 8 May 2026 – 21 Oct 2026 |
| BNBUSDT 1D | 0.0% | +148.3% | 0 | 0% | — | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| BNBUSDT 4h | 0.0% | +17.1% | 0 | 0% | — | 0.0% | 8 May 2026 – 21 Oct 2026 |
Backtests are simulations on historical data and are not investment advice.
Settings heatmap
Two settings that feed the entry signal, moved around their defaults. The best in-sample pair (Length MA 4, Length RSI 7) made 0.0% before 26 Dec 2025 and 0.0% after it, against 0.0% for the defaults. 0% of the 56 combinations made money in-sample and 0% out-of-sample.
| Length RSI ↓ · Length MA → | 4 | 5 | 6 | 7 | 8 | 10 | 12 |
|---|---|---|---|---|---|---|---|
| 7 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 8 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 10 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 12 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 14 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 17 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 20 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 24 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| Length RSI ↓ · Length MA → | 4 | 5 | 6 | 7 | 8 | 10 | 12 |
|---|---|---|---|---|---|---|---|
| 7 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 8 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 10 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 12 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 14 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 17 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 20 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
| 24 | 0% | 0% | 0% | 0% | 0% | 0% | 0% |
Net P&L of trades opened in each period, as a share of starting capital. marks the defaults and the best in-sample cell. Hover a cell for its trade count. Backtests are simulations on historical data and are not investment advice.
Similar scripts
Indicators and strategies built from the same calculations, run on BTCUSDT 1D with their own defaults so they can be compared directly.
| Script | Shares | Type | Net | Trades | Max drawdown |
|---|---|---|---|---|---|
| RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy this page | — | v4 strategy | 0.0% | 0 | 0.0% |
| Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTEST by TraderHalai | ema hma vwma rma | v5 strategy | +1.3% | 113 | 5.6% |
| TriautoETF(TQQQ) Short Strategy B1 by BBcom | hma vwma ema | v5 strategy | No trades on this market | ||
| Take Profit On Trend v2 (by BHD_Trade_Bot) by BHD_Trade_Bot | ema rsi rma | v5 strategy | +9.4% | 6 | 24.0% |
| MTF Diagonally Layered RSI - 1 minute Bitcoin Bot [wbburgin] by wbburgin | rsi rma ema | v5 strategy | No trades on this market | ||
| Hulk Strategy x35 Leverage 5m chart w-Alerts by npietronuto1 | rsi rma ema | v5 strategy | No trades on this market | ||
Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 24 ms | Yes 1,000 bars in 80 ms | Not measured |
| PineTS | No v5 and v6 only | — | Not measured |
“Matches TradingView” needs this script's own output exported from TradingView and compared bar by bar, which has not been done for this script. The engine is built on OpenPineScript, whose conformance results are in its conformance report. PineTS runs Pine Script v5 and v6 only.
Source
Copied verbatim from the author's published script, with its licence header intact. The author may have updated the original since this snapshot.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © burgercrisis//@version=4strategy("RMI + Triple HMRSI + Double EVWRSI + TERSI Strategy")//* Backtesting Period Selector | Component *////* https://www.tradingview.com/script/eCC1cvxQ-Backtesting-Period-Selector-Component *////* https://www.tradingview.com/u/pbergden/ *////* Modifications made *//testStartYear = input(2021, "Backtest Start Year") testStartMonth = input(1, "Backtest Start Month")testStartDay = input(1, "Backtest Start Day")testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,0,0)testStopYear = input(999999, "Backtest Stop Year")testStopMonth = input(9, "Backtest Stop Month")testStopDay = input(26, "Backtest Stop Day")testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,0,0)testPeriod() => time >= testPeriodStart and time <= testPeriodStop ? true : false/////////////// END - Backtesting Period Selector | Component ///////////////src = input(close, "Price", type = input.source)CMOlength = input(9, minval=1, title="Alpha Chande Momentum Length")//CMOmomm = change(src)f1(m) => m >= 0.0 ? m : 0.0f2(m) => m >= 0.0 ? 0.0 : -mm1 = f1(momm)m2 = f2(momm)sm1 = sum(m1, CMOlength)sm2 = sum(m2, CMOlength)percent(nom, div) => 100 * nom / divchandeMO = percent(sm1-sm2, sm1+sm2)plot(chandeMO, "Chande MO", color=color.blue)//RMI// Copyright (c) 2018-present, Alex Orekhov (everget)// Relative Momentum Index script may be freely distributed under the MIT license.length3 = input(title="RMI Length", type=input.integer, minval=1, defval=30)momentumLength3 = input(title="RMI Momentum ", type=input.integer, minval=1, defval=25)up3 = rma(max(change(src, momentumLength3), 0), length3)down3 = rma(-min(change(src, momentumLength3), 0), length3)rmi3 = (down3 == 0 ? 100 : up3 == 0 ? 0 : 100 - (100 / (1 + up3 / down3)))-50////// end RMI, end Alex Orekhov copywrite////lengthMA = input(7)lengthRSI = input(14)thrsi = hma(hma(hma(rsi(src, lengthRSI), lengthMA), lengthMA), lengthMA)thrsi1 = (thrsi-50)*10lengthMA2 = input(7)lengthRSI2 = input(14)devwrsi = ((ema(ema(vwma(rsi(src, lengthRSI2), lengthMA2), lengthMA2), lengthMA2))-50)*5lengthMA3 = input(7)lengthRSI3 = input(14)tersi = ((ema(ema(ema(rsi(src, lengthRSI3), lengthMA3), lengthMA3), lengthMA3))-50)*10rmirsi = ((thrsi*rmi3/25))//Boundary LinesobLevel1 = input(0, title="Chande Sellline")osLevel1 = input(0, title="Chande Buyline")hline(obLevel1, color=#0bc4d9)hline(osLevel1, color=#0bc4d9)obLevel2 = input(0, title="Triple HMRSI Sellline")osLevel2 = input(0, title="Triple HMRSI Buyline")hline(obLevel2, color=#5a0bd9)hline(osLevel2, color=#5a0bd9)obLevel3 = input(0, title="DEVWRSI Sellline")osLevel3 = input(0, title="DEVWRSI Buyline")hline(obLevel3, color=#5a0bd9)hline(osLevel3, color=#5a0bd9)obLevel4 = input(0, title="TERSI Sellline")osLevel4 = input(0, title="TERSI Buyline")hline(obLevel4, color=#5a0bd9)hline(osLevel4, color=#5a0bd9)obLevel5 = input(0, title="RMI Sellline")osLevel5 = input(0, title="RMI Buyline")hline(obLevel5, color=#5a0bd9)hline(osLevel5, color=#5a0bd9)obLevel6 = input(0, title="RMI*RSI Sellline")osLevel6 = input(0, title="RMI*RSI Buyline")hline(obLevel6, color=#5a0bd9)hline(osLevel6, color=#5a0bd9)plot((thrsi1), title="THRSI")plot(devwrsi, color=color.red, title="DEVWRSI")plot(tersi, color=color.yellow, title="TERSI")plot(rmirsi, color=color.purple, title="RMI*HMRSI")plot(rmi3, color=color.orange, title="RMI")longcondition1 = crossover(chandeMO, osLevel1)shortcondition1 = crossunder(chandeMO, obLevel1)longcondition2 = rmirsi<osLevel6 and rmi3<osLevel5 and tersi<osLevel4 and devwrsi<osLevel3 and thrsi1<osLevel2 and longcondition1shortcondition2 = rmirsi>obLevel6 and rmi3>obLevel5 and tersi>obLevel4 and devwrsi>obLevel3 and thrsi1>obLevel2 and shortcondition1if testPeriod() if longcondition2 strategy.entry("Buy", strategy.long) if shortcondition2 strategy.entry("Sell", strategy.short)hline(0, color=#C0C0C0, linestyle=hline.style_dashed, title="Zero Line")