Pine Script v5 · Strategy
TriautoETF(TQQQ) Short Strategy B1
A Pine Script v5 strategy built on HMA (close, 2), VWMA (close, 193) and EMA (close, 9). It has 2 order rules, 1 entry among them, and trades short only with the default settings. Exits wait for a signal; there is no stop loss. Each trade is one contract and pays no commission. It has no settings.
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 TriautoETF(TQQQ) Short Strategy B1 repaint?
- No
- No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
- How did TriautoETF(TQQQ) Short Strategy B1 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 entry conditions never all held on this data. It closed no trades on the other markets either. A backtest, not investment advice.
- Does TriautoETF(TQQQ) Short Strategy B1 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.
- Does TriautoETF(TQQQ) Short Strategy B1 use a stop loss?
- No
- Every exit waits for a signal; nothing limits a losing trade before it fires.
- Does TriautoETF(TQQQ) Short Strategy B1 run in Zeal Terminal?
- Yes
- It compiles in 8 ms and runs 1,000 bars in 18 ms, in the browser.
BTCUSDT · 1D · default settings
- Short Line
- Winning trade
- Losing trade
- Equity
- Buy and hold
Needs QQQ D data, not available: not a Binance spot market Values that depend on it are empty on this chart.
- 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, $1,000,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
No slippage
Fills are assumed at the exact open price. Add slippage in the properties for a more realistic test.
-
Note
Uses an argument v6 removed
when = on line 14, 15. The upgraded version below moves each call inside an if block.
Settings
Every input the script declares, with its default and what it feeds. Bounds are the ones the script enforces.
The script declares no settings.
What it calculates
- HMAclose, 2
QQQ1 · line 6 - VWMAclose, 193
QQQ2 · line 7 - EMAclose, 9
QQQ3 · line 8 - EMAclose, 14
QQQ4 · line 9 - VWMAclose, 193
ShortLine · line 11
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.
Order rules
| Order | Fires when | By default | Line |
|---|---|---|---|
| Open Entry short | ta.crossover(QQQ2, QQQ1) | On | 14 |
| Close Entry | ta.crossover(QQQ3, QQQ4) or ta.crossover(QQQ3, QQQ2) | On | 15 |
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 data4 request.security call(s), none with lookahead on.
- 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
Not run on other markets: the script requests QQQ D, and that data is not available here (not a Binance spot market). Its results would rest on empty values.
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 |
|---|---|---|---|---|---|
| TriautoETF(TQQQ) Short Strategy B1 this page | — | v5 strategy | 0.0% | 0 | 0.0% |
| Advanced OutSide with HMA and Klinger Forex Swing strategy by exlux99 | ema hma | v4 strategy | −1.3% | 49 | 5.3% |
| Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTEST by TraderHalai | ema hma vwma | v5 strategy | +1.3% | 113 | 5.6% |
| Bollinger Band with Fib Golden Ratio (0.618) by mohanee | vwma ema | v4 strategy | No trades on this market | ||
| RMI + Triple HMRSI + Double EVWRSI + TERSI + CMO Strategy by burgercrisis | hma ema | v4 strategy | No trades on this market | ||
| tvbot Trend Following with Mean Reversion algo by tvbot- | ema vwma | v5 strategy | No trades on this market | ||
Upgrade and export
Written in Pine Script v5. The clean-v5 step types the settings and moves when = into if blocks, which v6 requires; it is run before and after like any upgrade.
- 2 strategy calls use the when = argument (line 14, 15). It is deprecated in v5 and removed in v6, where each call moves inside an if block.
- No v6-only features. v6 is not needed to run this script.
Clean v5
Not verifiedNeither version placed a trade on any of the 8 markets, so there was nothing to compare.
- Line 14: when = ta.crossover(QQQ2, QQQ1) → if block
- Line 15: when = ta.crossover(QQQ3, QQQ4) or ta.crossover(QQQ3, QQQ2) → if block
⋯// 売買の注文-strategy.entry(id = "Entry", direction = strategy.short, when = ta.crossover(QQQ2, QQQ1) ,comment="Short") +if ta.crossover(QQQ2, QQQ1)+ strategy.entry(id = "Entry", direction = strategy.short ,comment="Short") -strategy.close(id = "Entry", when = ta.crossover(QQQ3, QQQ4) or ta.crossover(QQQ3, QQQ2) , comment="Close")+if ta.crossover(QQQ3, QQQ4) or ta.crossover(QQQ3, QQQ2)+ strategy.close(id = "Entry" , comment="Close")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.
⋯// © BBcom-//@version=5 +//@version=6 strategy("TriautoETF(TQQQ) Short Strategy B1","TSSB1", overlay = true)⋯Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 8 ms | With a workaround 1,000 bars in 18 ms | Not measured |
| PineTS | Not tested | Not tested | Not measured |
Zeal Terminal's engine currently reads an order side written as direction = strategy.short as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (line 14) so the engine trades the way the script says.
“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.
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/// © BBcom//@version=5 strategy("TriautoETF(TQQQ) Short Strategy B1","TSSB1", overlay = true)// QQQQQQ1 = request.security("QQQ","D", ta.hma(close, 2))QQQ2 = request.security("QQQ","D", ta.vwma(close, 193))QQQ3 = request.security("QQQ","D", ta.ema(close, 9))QQQ4 = request.security("QQQ","D", ta.ema(close, 14))// 基準線表示ShortLine = ta.vwma(close,193)plot(ShortLine,title="Short Line",color=color.purple,linewidth=2)// 売買の注文strategy.entry(id = "Entry", direction = strategy.short, when = ta.crossover(QQQ2, QQQ1) ,comment="Short") strategy.close(id = "Entry", when = ta.crossover(QQQ3, QQQ4) or ta.crossover(QQQ3, QQQ2) , comment="Close")