Pine Script v4 · Strategy
T3 crossover strategy
A Pine Script v4 strategy built on Crossover (t3, t3[2]) and Crossunder (t3, t3[2]). 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. 4 settings; defaults include Length 5, Factor 0.7 and Source close.
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 T3 crossover strategy repaint?
- No
- No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 33 of 33 trades.
- How did T3 crossover strategy do on BTCUSDT 1D with default settings?
- +29.64%
- From 26 Jan 2024 to 21 Oct 2026, over 115 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
- Can T3 crossover strategy be converted to Pine Script v5?
- Yes
- The upgrade takes 1 step, from v4; each was run before and after on the same candles with identical results, and the v5 script can be downloaded below.
- Does T3 crossover strategy use a stop loss?
- No
- Every exit waits for a signal; nothing limits a losing trade before it fires.
- Does T3 crossover strategy run in Zeal Terminal?
- Yes
- It compiles in 7 ms and runs 1,000 bars in 30 ms, in the browser.
BTCUSDT · 1D · default settings
- T3
- Winning trade
- Losing trade
- Equity
- Buy and hold
- Net profit
- +29.64%
- $29,636.10
- Buy and hold
- +102.5%
- same period
- Closed trades
- 115
- 41 won · 74 lost
- Profitable
- 35.7%
- of closed trades
- Profit factor
- 1.17
- gross profit ÷ gross loss
- Max drawdown
- 44.75%
- −$48,163.00
One run with the author's default settings, $100,000 starting capital, commission as the script sets it. A long position was still open at the last bar. 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 transp =, which v5 removed line 13
transp = on line 13. v5 folds the transparency into the colour with color.new(c, transp).
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 ema → ta.ema, crossover → ta.crossover, crossunder → ta.crossunder.
Same 115 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.
- Line 3: //@version=4 → //@version=5
- Line 5: input(type = input.integer) → input.int()
- Line 6: input(type = input.float) → input.float()
- Line 7: input(type = input.bool) → input.bool()
- Line 8: input(type = input.source) → input.source()
- Line 10: ema → ta.ema
5 more edits
- Line 10: ema → ta.ema
- Line 10: ema → ta.ema
- Line 13: transp = 0 → color.new(t3Color, 0)
- Line 14: crossover → ta.crossover
- Line 17: crossunder → ta.crossunder
⋯// © DynamicSignalLab-//@version=4+//@version=5strategy(title="T3 crossover strategy", shorttitle="T3 strategy", overlay=true)-length = input(title="Length", type=input.integer, defval=5)+length = input.int(title="Length", defval=5)-factor = input(title="Factor", type=input.float, minval=0, maxval=1, defval=0.7)+factor = input.float(title="Factor", minval=0, maxval=1, defval=0.7)-highlightMovements = input(title="Highlight Movements ?", type=input.bool, defval=true)+highlightMovements = input.bool(title="Highlight Movements ?", defval=true)-src = input(title="Source", type=input.source, defval=close)+src = input.source(title="Source", defval=close)gd(src, length) =>- ema(src, length) * (1 + factor) - ema(ema(src, length), length) * factor+ ta.ema(src, length) * (1 + factor) - ta.ema(ta.ema(src, length), length) * factort3 = gd(gd(gd(src, length), length), length)t3Color = highlightMovements ? (t3 > t3[1] ? color.green : color.red) : #6d1e7f-plot(t3, title="T3", linewidth=2, color=t3Color, transp=0)+plot(t3, title="T3", linewidth=2, color=color.new(t3Color, 0))-longCondition = crossover(t3, t3[2])+longCondition = ta.crossover(t3, t3[2])if (longCondition) strategy.entry("long", strategy.long)-shortCondition = crossunder(t3, t3[2])+shortCondition = ta.crossunder(t3, t3[2])if (shortCondition)⋯Clean v5
VerifiedNothing to change.
Does it run in Pine Script v6?
No
The v6 version runs in Zeal Terminal's engine, but its results differ from the v5 version: Trades differ: 115 before, 81 after on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine. It is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.
⋯// © DynamicSignalLab-//@version=5+//@version=6strategy(title="T3 crossover strategy", shorttitle="T3 strategy", overlay=true)⋯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 |
|---|---|---|---|
| Length | 5 | int (written input.integer) | t3 line 10 |
| Factor | 0.7 | float · min 0 · max 1 | line 10 |
| Highlight Movements ? | true | bool | t3Color |
| Source | close | source | t3 line 10 |
What it calculates
- Crossover (
crossover,ta.crossoverin v5)t3, t3[2]longCondition · line 14 - Crossunder (
crossunder,ta.crossunderin v5)t3, t3[2]shortCondition · line 17
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 long long | (longCondition) | On | 16 |
| Open short short | (shortCondition) | On | 19 |
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, and the live replay matched history.
- 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 | +29.6% | +102.5% | 115 | 36% | 1.17 | 44.7% | 26 Jan 2024 – 21 Oct 2026 |
| BTCUSDT 4h | +7.5% | +5.5% | 118 | 37% | 1.14 | 10.9% | 8 May 2026 – 21 Oct 2026 |
| ETHUSDT 1D | −1.2% | +9.8% | 114 | 36% | 0.89 | 2.1% | 26 Jan 2024 – 21 Oct 2026 |
| ETHUSDT 4h | +0.6% | +8.4% | 124 | 34% | 1.26 | 0.4% | 8 May 2026 – 21 Oct 2026 |
| SOLUSDT 1D | +0.1% | +16.7% | 107 | 40% | 1.19 | 0.1% | 26 Jan 2024 – 21 Oct 2026 |
| SOLUSDT 4h | +0.0% | +21.5% | 110 | 35% | 1.09 | 0.0% | 8 May 2026 – 21 Oct 2026 |
| BNBUSDT 1D | −0.4% | +148.3% | 105 | 40% | 0.82 | 0.6% | 26 Jan 2024 – 21 Oct 2026 |
| BNBUSDT 4h | +0.3% | +17.1% | 102 | 41% | 1.55 | 0.1% | 8 May 2026 – 21 Oct 2026 |
Backtests are simulations on historical data and are not investment advice.
The trades
By market direction
| At entry, last 90 bars | Trades | Won | P&L |
|---|---|---|---|
| Rising market | 41 | 27% | −$7,139.71 |
| Sideways market | 46 | 43% | $22,170.50 |
| Falling market | 28 | 36% | $14,605.40 |
Rising and falling mean the market moved more than 15% over the 90 bars before entry.
How bad could the drawdown be?
52.9%
The 95th percentile of the worst drawdown when the same 115 trades are reshuffled 5,000 times. The bar spans the 5th to 95th percentile, 27.3% to 52.9%; the tick is what actually happened, 41.8%. Order luck alone moves it this much.
All 115 trades
| Side | Entry | Exit | Bars | P&L |
|---|---|---|---|---|
| short | 23 Feb 2024 51,288.40 | 27 Feb 2024 54,476.50 | 4 | −$3,188.06 |
| long | 27 Feb 2024 54,476.50 | 17 Mar 2024 65,300.60 | 19 | $10,824.20 |
| short | 17 Mar 2024 65,300.60 | 26 Mar 2024 69,880.00 | 9 | −$4,579.36 |
| long | 26 Mar 2024 69,880.00 | 3 Apr 2024 65,464.00 | 8 | −$4,416.01 |
| short | 3 Apr 2024 65,464.00 | 8 Apr 2024 69,360.40 | 5 | −$3,896.39 |
| long | 8 Apr 2024 69,360.40 | 14 Apr 2024 63,924.50 | 6 | −$5,435.86 |
| short | 14 Apr 2024 63,924.50 | 22 Apr 2024 64,941.20 | 8 | −$1,016.63 |
| long | 22 Apr 2024 64,941.20 | 28 Apr 2024 63,462.00 | 6 | −$1,479.17 |
| short | 28 Apr 2024 63,462.00 | 6 May 2024 64,012.00 | 8 | −$550.02 |
| long | 6 May 2024 64,012.00 | 11 May 2024 60,800.00 | 5 | −$3,212.01 |
| short | 11 May 2024 60,800.00 | 16 May 2024 66,206.50 | 5 | −$5,406.52 |
| long | 16 May 2024 66,206.50 | 27 May 2024 68,507.70 | 11 | $2,301.16 |
| short | 27 May 2024 68,507.70 | 5 Jun 2024 70,537.80 | 9 | −$2,030.16 |
| long | 5 Jun 2024 70,537.80 | 11 Jun 2024 69,540.00 | 6 | −$997.83 |
| short | 11 Jun 2024 69,540.00 | 2 Jul 2024 62,900.00 | 21 | $6,640.00 |
| long | 2 Jul 2024 62,900.00 | 5 Jul 2024 57,050.00 | 3 | −$5,849.98 |
| short | 5 Jul 2024 57,050.00 | 13 Jul 2024 57,889.10 | 8 | −$839.07 |
| long | 13 Jul 2024 57,889.10 | 26 Jul 2024 65,799.90 | 13 | $7,910.86 |
| short | 26 Jul 2024 65,799.90 | 28 Jul 2024 67,896.50 | 2 | −$2,096.54 |
| long | 28 Jul 2024 67,896.50 | 1 Aug 2024 64,628.00 | 4 | −$3,268.48 |
| short | 1 Aug 2024 64,628.00 | 11 Aug 2024 60,923.50 | 10 | $3,704.50 |
| long | 11 Aug 2024 60,923.50 | 17 Aug 2024 58,874.60 | 6 | −$2,048.92 |
| short | 17 Aug 2024 58,874.60 | 21 Aug 2024 59,013.80 | 4 | −$139.21 |
| long | 21 Aug 2024 59,013.80 | 29 Aug 2024 59,034.90 | 8 | $21.10 |
| short | 29 Aug 2024 59,034.90 | 12 Sep 2024 57,338.00 | 14 | $1,696.90 |
| long | 12 Sep 2024 57,338.00 | 2 Oct 2024 60,804.90 | 20 | $3,466.92 |
| short | 2 Oct 2024 60,804.90 | 9 Oct 2024 62,160.50 | 7 | −$1,355.58 |
| long | 9 Oct 2024 62,160.50 | 10 Oct 2024 60,636.00 | 1 | −$1,524.49 |
| short | 10 Oct 2024 60,636.00 | 13 Oct 2024 63,206.20 | 3 | −$2,570.22 |
| long | 13 Oct 2024 63,206.20 | 24 Oct 2024 66,668.60 | 11 | $3,462.42 |
| short | 24 Oct 2024 66,668.60 | 29 Oct 2024 69,962.20 | 5 | −$3,293.56 |
| long | 29 Oct 2024 69,962.20 | 4 Nov 2024 68,776.00 | 6 | −$1,186.22 |
| short | 4 Nov 2024 68,776.00 | 7 Nov 2024 75,572.00 | 3 | −$6,796.00 |
| long | 7 Nov 2024 75,572.00 | 27 Nov 2024 91,965.20 | 20 | $16,393.20 |
| short | 27 Nov 2024 91,965.20 | 1 Dec 2024 96,408.00 | 4 | −$4,442.83 |
| long | 1 Dec 2024 96,408.00 | 12 Dec 2024 101,125.00 | 11 | $4,717.01 |
| short | 12 Dec 2024 101,125.00 | 13 Dec 2024 100,004.00 | 1 | $1,120.71 |
| long | 13 Dec 2024 100,004.00 | 20 Dec 2024 97,461.90 | 7 | −$2,542.43 |
| short | 20 Dec 2024 97,461.90 | 4 Jan 2025 98,174.20 | 15 | −$712.31 |
| long | 4 Jan 2025 98,174.20 | 10 Jan 2025 92,552.50 | 6 | −$5,621.68 |
| short | 10 Jan 2025 92,552.50 | 16 Jan 2025 100,497.00 | 6 | −$7,944.86 |
| long | 16 Jan 2025 100,497.00 | 28 Jan 2025 102,083.00 | 12 | $1,585.48 |
| short | 28 Jan 2025 102,083.00 | 14 Feb 2025 96,608.10 | 17 | $5,474.70 |
| long | 14 Feb 2025 96,608.10 | 18 Feb 2025 95,780.00 | 4 | −$828.12 |
| short | 18 Feb 2025 95,780.00 | 21 Feb 2025 98,305.00 | 3 | −$2,525.00 |
| long | 21 Feb 2025 98,305.00 | 25 Feb 2025 91,552.90 | 4 | −$6,752.13 |
| short | 25 Feb 2025 91,552.90 | 4 Mar 2025 86,221.20 | 7 | $5,331.72 |
| long | 4 Mar 2025 86,221.20 | 10 Mar 2025 80,734.50 | 6 | −$5,486.68 |
| short | 10 Mar 2025 80,734.50 | 16 Mar 2025 84,338.40 | 6 | −$3,603.96 |
| long | 16 Mar 2025 84,338.40 | 30 Mar 2025 82,648.50 | 14 | −$1,689.91 |
| short | 30 Mar 2025 82,648.50 | 13 Apr 2025 85,276.90 | 14 | −$2,628.38 |
| long | 13 Apr 2025 85,276.90 | 6 May 2025 94,733.70 | 23 | $9,456.77 |
| short | 6 May 2025 94,733.70 | 8 May 2025 97,030.50 | 2 | −$2,296.82 |
| long | 8 May 2025 97,030.50 | 18 May 2025 103,127.00 | 10 | $6,096.15 |
| short | 18 May 2025 103,127.00 | 19 May 2025 106,454.00 | 1 | −$3,327.62 |
| long | 19 May 2025 106,454.00 | 30 May 2025 105,590.00 | 11 | −$864.52 |
| short | 30 May 2025 105,590.00 | 9 Jun 2025 105,734.00 | 10 | −$144.26 |
| long | 9 Jun 2025 105,734.00 | 15 Jun 2025 105,415.00 | 6 | −$319.38 |
| short | 15 Jun 2025 105,415.00 | 26 Jun 2025 107,341.00 | 11 | −$1,925.96 |
| long | 26 Jun 2025 107,341.00 | 20 Jul 2025 117,840.00 | 24 | $10,499.40 |
| short | 20 Jul 2025 117,840.00 | 25 Jul 2025 118,341.00 | 5 | −$500.97 |
| long | 25 Jul 2025 118,341.00 | 26 Jul 2025 117,614.00 | 1 | −$726.67 |
| short | 26 Jul 2025 117,614.00 | 29 Jul 2025 118,062.00 | 3 | −$448.01 |
| long | 29 Jul 2025 118,062.00 | 30 Jul 2025 117,951.00 | 1 | −$111.57 |
| short | 30 Jul 2025 117,951.00 | 8 Aug 2025 117,472.00 | 9 | $478.73 |
| long | 8 Aug 2025 117,472.00 | 17 Aug 2025 117,381.00 | 9 | −$91.36 |
| short | 17 Aug 2025 117,381.00 | 4 Sep 2025 111,706.00 | 18 | $5,674.94 |
| long | 4 Sep 2025 111,706.00 | 22 Sep 2025 115,232.00 | 18 | $3,526.57 |
| short | 22 Sep 2025 115,232.00 | 1 Oct 2025 114,049.00 | 9 | $1,183.35 |
| long | 1 Oct 2025 114,049.00 | 11 Oct 2025 112,774.00 | 10 | −$1,274.45 |
| short | 11 Oct 2025 112,774.00 | 24 Oct 2025 110,078.00 | 13 | $2,696.30 |
| long | 24 Oct 2025 110,078.00 | 31 Oct 2025 108,323.00 | 7 | −$1,755.32 |
| short | 31 Oct 2025 108,323.00 | 12 Nov 2025 103,059.00 | 12 | $5,263.87 |
| long | 12 Nov 2025 103,059.00 | 14 Nov 2025 99,692.00 | 2 | −$3,366.97 |
| short | 14 Nov 2025 99,692.00 | 27 Nov 2025 90,484.00 | 13 | $9,208.02 |
| long | 27 Nov 2025 90,484.00 | 3 Dec 2025 91,277.90 | 6 | $793.87 |
| short | 3 Dec 2025 91,277.90 | 4 Dec 2025 93,429.90 | 1 | −$2,152.07 |
| long | 4 Dec 2025 93,429.90 | 8 Dec 2025 90,395.30 | 4 | −$3,034.63 |
| short | 8 Dec 2025 90,395.30 | 10 Dec 2025 92,678.80 | 2 | −$2,283.49 |
| long | 10 Dec 2025 92,678.80 | 14 Dec 2025 90,240.00 | 4 | −$2,438.81 |
| short | 14 Dec 2025 90,240.00 | 22 Dec 2025 88,658.90 | 8 | $1,581.13 |
| long | 22 Dec 2025 88,658.90 | 27 Dec 2025 87,369.60 | 5 | −$1,289.31 |
| short | 27 Dec 2025 87,369.60 | 30 Dec 2025 87,237.10 | 3 | $132.43 |
| long | 30 Dec 2025 87,237.10 | 11 Jan 2026 90,504.70 | 12 | $3,267.57 |
| short | 11 Jan 2026 90,504.70 | 14 Jan 2026 95,414.00 | 3 | −$4,909.29 |
| long | 14 Jan 2026 95,414.00 | 20 Jan 2026 92,631.00 | 6 | −$2,783.00 |
| short | 20 Jan 2026 92,631.00 | 16 Feb 2026 68,832.60 | 27 | $23,798.40 |
| long | 16 Feb 2026 68,832.60 | 19 Feb 2026 66,461.00 | 3 | −$2,371.59 |
| short | 19 Feb 2026 66,461.00 | 23 Feb 2026 67,643.40 | 4 | −$1,182.39 |
| long | 23 Feb 2026 67,643.40 | 24 Feb 2026 64,656.00 | 1 | −$2,987.38 |
| short | 24 Feb 2026 64,656.00 | 28 Feb 2026 65,872.10 | 4 | −$1,216.08 |
| long | 28 Feb 2026 65,872.10 | 9 Mar 2026 65,971.20 | 9 | $99.11 |
| short | 9 Mar 2026 65,971.20 | 12 Mar 2026 70,191.90 | 3 | −$4,220.66 |
| long | 12 Mar 2026 70,191.90 | 21 Mar 2026 70,510.70 | 9 | $318.87 |
| short | 21 Mar 2026 70,510.70 | 3 Apr 2026 66,902.00 | 13 | $3,608.74 |
| long | 3 Apr 2026 66,902.00 | 30 Apr 2026 75,780.00 | 27 | $8,878.01 |
| short | 30 Apr 2026 75,780.00 | 3 May 2026 78,686.80 | 3 | −$2,906.84 |
| long | 3 May 2026 78,686.80 | 14 May 2026 79,313.60 | 11 | $626.77 |
| short | 14 May 2026 79,313.60 | 13 Jun 2026 63,580.00 | 30 | $15,733.60 |
| long | 13 Jun 2026 63,580.00 | 20 Jun 2026 63,543.90 | 7 | −$36.10 |
| short | 20 Jun 2026 63,543.90 | 4 Jul 2026 62,583.30 | 14 | $960.64 |
| long | 4 Jul 2026 62,583.30 | 15 Jul 2026 65,044.00 | 11 | $2,460.73 |
| short | 15 Jul 2026 65,044.00 | 16 Jul 2026 64,756.30 | 1 | $287.71 |
| long | 16 Jul 2026 64,756.30 | 26 Jul 2026 64,375.00 | 10 | −$381.27 |
| short | 26 Jul 2026 64,375.00 | 6 Aug 2026 64,665.20 | 11 | −$290.23 |
| long | 6 Aug 2026 64,665.20 | 12 Aug 2026 63,600.00 | 6 | −$1,065.23 |
| short | 12 Aug 2026 63,600.00 | 19 Aug 2026 64,725.40 | 7 | −$1,125.41 |
| long | 19 Aug 2026 64,725.40 | 31 Aug 2026 77,682.00 | 12 | $12,956.60 |
| short | 31 Aug 2026 77,682.00 | 5 Sep 2026 79,660.80 | 5 | −$1,978.77 |
| long | 5 Sep 2026 79,660.80 | 10 Sep 2026 78,306.40 | 5 | −$1,354.34 |
| short | 10 Sep 2026 78,306.40 | 19 Sep 2026 80,883.90 | 9 | −$2,577.43 |
| long | 19 Sep 2026 80,883.90 | 29 Sep 2026 83,500.00 | 10 | $2,616.15 |
| short | 29 Sep 2026 83,500.00 | 4 Oct 2026 84,753.60 | 5 | −$1,253.56 |
| long | 4 Oct 2026 84,753.60 | 9 Oct 2026 81,754.50 | 5 | −$2,999.11 |
| short | 9 Oct 2026 81,754.50 | 21 Oct 2026 83,028.10 | 12 | −$1,273.68 |
Similar scripts
No other indicator or strategy here shares enough of its calculations.
Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 7 ms | Yes 1,000 bars in 30 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/// © DynamicSignalLab//@version=4strategy(title="T3 crossover strategy", shorttitle="T3 strategy", overlay=true)length = input(title="Length", type=input.integer, defval=5)factor = input(title="Factor", type=input.float, minval=0, maxval=1, defval=0.7)highlightMovements = input(title="Highlight Movements ?", type=input.bool, defval=true)src = input(title="Source", type=input.source, defval=close)gd(src, length) => ema(src, length) * (1 + factor) - ema(ema(src, length), length) * factort3 = gd(gd(gd(src, length), length), length)t3Color = highlightMovements ? (t3 > t3[1] ? color.green : color.red) : #6d1e7fplot(t3, title="T3", linewidth=2, color=t3Color, transp=0)longCondition = crossover(t3, t3[2])if (longCondition) strategy.entry("long", strategy.long)shortCondition = crossunder(t3, t3[2])if (shortCondition) strategy.entry("short", strategy.short)