Pine Script v4 · Strategy
Three moving average strategies
A Pine Script v4 strategy built on SMA (close, 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 commits 100% of equity and pays 0.047 commission. 4 settings; defaults include Kısa Vade - Gün 7, Orta Vade - Gün 25 and Uzun Vade - Gün 99.
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 Three moving average strategies repaint?
- No
- No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 13 of 13 trades.
- How did Three moving average strategies do on BTCUSDT 1D with default settings?
- −15.58%
- From 26 Jan 2024 to 21 Oct 2026, over 48 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
- Can Three moving average strategies 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 Three moving average strategies use a stop loss?
- No
- Every exit waits for a signal; nothing limits a losing trade before it fires.
- Does Three moving average strategies run in Zeal Terminal?
- Yes
- It compiles in 20 ms and runs 1,000 bars in 59 ms, in the browser.
BTCUSDT · 1D · default settings
- Har.Ort. Kısa Vade
- Har.Ort. Orta Vade
- Har.Ort. Uzun Vade
- Buy
- Sell
- Hızlı Al
- Hızlı Sat
- Winning trade
- Losing trade
- Equity
- Buy and hold
- Net profit
- −15.58%
- −$1,558.36
- Buy and hold
- +102.5%
- same period
- Closed trades
- 48
- 12 won · 36 lost
- Profitable
- 25.0%
- of closed trades
- Profit factor
- 0.87
- gross profit ÷ gross loss
- Max drawdown
- 49.37%
- −$4,937.30
One run with the author's default settings, $10,000 starting capital, commission as the script sets it. A short 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
Every trade uses all the equity
default_qty_value is 100% of equity.
-
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 11
transp = on line 11, 12, 13, 23, 24, 25, 26, 27. 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 sma → ta.sma, crossover → ta.crossover.
v4 → v5
VerifiedSame 48 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.
- Line 3: //@version=4 → //@version=5
- Line 8: sma → ta.sma
- Line 9: sma → ta.sma
- Line 10: sma → ta.sma
- Line 11: transp = 0 → color.new(#2323F1, 0)
- Line 12: transp = 0 → color.new(#FF0C00, 0)
10 more edits
- Line 13: transp = 0 → color.new(#DFB001, 0)
- Line 15: crossover → ta.crossover
- Line 16: crossover → ta.crossover
- Line 17: crossover → ta.crossover
- Line 18: crossover → ta.crossover
- Line 23: transp = 0 → color.new(color.green, 0)
- Line 24: transp = 0 → color.new(color.red, 0)
- Line 25: transp = 0 → color.new(color.blue, 0)
- Line 26: transp = 0 → color.new(#6106D6, 0)
- Line 27: transp = 80 → color.new(sma7 >= sma25? #4DFF00 : #FF0C00, 80)
⋯// © dadashkadir-//@version=4+//@version=5strategy("Üç Hareketli Ortalama Str.", overlay=true, initial_capital=10000, commission_value=0.047, default_qty_type=strategy.percent_of_equity, default_qty_value=100, pyramiding=0, calc_on_order_fills=true)⋯uzun = input(title = "Uzun Vade - Gün", defval = 99, minval = 1)-sma7 = sma(close, kisa)+sma7 = ta.sma(close, kisa)-sma25 = sma(close, orta)+sma25 = ta.sma(close, orta)-sma99 = sma(close, uzun)+sma99 = ta.sma(close, uzun)-alTrend = plot (sma7, color=#2323F1, linewidth=2, title="Har.Ort. Kısa Vade", transp=0)+alTrend = plot (sma7, color=color.new(#2323F1, 0), linewidth=2, title="Har.Ort. Kısa Vade")-satTrend = plot (sma25, color=#FF0C00, linewidth=3, title="Har.Ort. Orta Vade", transp=0)+satTrend = plot (sma25, color=color.new(#FF0C00, 0), linewidth=3, title="Har.Ort. Orta Vade")-ort99 = plot (sma99, color=#DFB001, linewidth=3, title="Har.Ort. Uzun Vade", transp=0)+ort99 = plot (sma99, color=color.new(#DFB001, 0), linewidth=3, title="Har.Ort. Uzun Vade")zamanaralik = input (2020, title="Backtest Başlangıç Tarihi")-al = crossover (sma7, sma25) and zamanaralik <= year+al = ta.crossover (sma7, sma25) and zamanaralik <= year-sat = crossover (sma25, sma7) and zamanaralik <= year+sat = ta.crossover (sma25, sma7) and zamanaralik <= year-hizlial = crossover (sma7, sma99) and zamanaralik <= year+hizlial = ta.crossover (sma7, sma99) and zamanaralik <= year-hizlisat = crossover (sma99, sma7) and zamanaralik <= year+hizlisat = ta.crossover (sma99, sma7) and zamanaralik <= yearalkosul = sma7 >= sma25⋯hizlisatkosul = sma99 >= sma7-plotshape(al, title = "Buy", text = 'Al', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny)+plotshape(al, title = "Buy", text = 'Al', style = shape.labelup, location = location.belowbar, color= color.new(color.green, 0), textcolor = color.white, size = size.tiny)-plotshape(sat, title = "Sell", text = 'Sat', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.tiny)+plotshape(sat, title = "Sell", text = 'Sat', style = shape.labeldown, location = location.abovebar, color= color.new(color.red, 0), textcolor = color.white, size = size.tiny)-plotshape(hizlial, title = "Hızlı Al", text = 'Hızlı Al', style = shape.labelup, location = location.belowbar, color= color.blue, textcolor = color.white, transp = 0, size = size.tiny)+plotshape(hizlial, title = "Hızlı Al", text = 'Hızlı Al', style = shape.labelup, location = location.belowbar, color= color.new(color.blue, 0), textcolor = color.white, size = size.tiny)-plotshape(hizlisat, title = "Hızlı Sat", text = 'Hızlı Sat', style = shape.labeldown, location = location.abovebar, color= #6106D6 , textcolor = color.white, transp = 0, size = size.tiny)+plotshape(hizlisat, title = "Hızlı Sat", text = 'Hızlı Sat', style = shape.labeldown, location = location.abovebar, color= color.new(#6106D6, 0) , textcolor = color.white, size = size.tiny)-fill (alTrend, satTrend, color = sma7 >= sma25? #4DFF00 : #FF0C00, transp=80, title="Al-Sat Aralığı")+fill (alTrend, satTrend, color = color.new(sma7 >= sma25? #4DFF00 : #FF0C00, 80), title="Al-Sat Aralığı")//fill (ort99, satTrend, color = sma7 >= sma25? #6106D6 : color.blue, transp=80, title="Hızlı Al-Sat Aralığı")⋯Same 48 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.
- Line 5: input() → input.int()
- Line 6: input() → input.int()
- Line 7: input() → input.int()
- Line 14: input() → input.int()
⋯strategy("Üç Hareketli Ortalama Str.", overlay=true, initial_capital=10000, commission_value=0.047, default_qty_type=strategy.percent_of_equity, default_qty_value=100, pyramiding=0, calc_on_order_fills=true)-kisa = input(title = "Kısa Vade - Gün", defval = 7, minval = 1)+kisa = input.int(title = "Kısa Vade - Gün", defval = 7, minval = 1)-orta = input(title = "Orta Vade - Gün", defval = 25, minval = 1)+orta = input.int(title = "Orta Vade - Gün", defval = 25, minval = 1)-uzun = input(title = "Uzun Vade - Gün", defval = 99, minval = 1)+uzun = input.int(title = "Uzun Vade - Gün", defval = 99, minval = 1)sma7 = ta.sma(close, kisa)⋯ort99 = plot (sma99, color=color.new(#DFB001, 0), linewidth=3, title="Har.Ort. Uzun Vade")-zamanaralik = input (2020, title="Backtest Başlangıç Tarihi")+zamanaralik = input.int (2020, title="Backtest Başlangıç Tarihi")al = ta.crossover (sma7, sma25) and zamanaralik <= year⋯Does it run in Pine Script v6?
Yes
Same 48 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine. Both versions were run on Zeal Terminal's engine, and the results are identical. It differs from the v5 version by 1 edit.
⋯// © dadashkadir-//@version=5+//@version=6strategy("Üç Hareketli Ortalama Str.", overlay=true, initial_capital=10000, commission_value=0.047, default_qty_type=strategy.percent_of_equity, default_qty_value=100, pyramiding=0, calc_on_order_fills=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 |
|---|---|---|---|
| Kısa Vade - Gün | 7 | int · min 1 | sma7 |
| Orta Vade - Gün | 25 | int · min 1 | sma25 |
| Uzun Vade - Gün | 99 | int · min 1 | sma99 |
| Backtest Başlangıç Tarihi | 2020 | int | al sat hizlial hizlisat |
What it calculates
- SMA (
sma,ta.smain v5)close, Kısa Vade - Gün (7)sma7 · line 8 - SMA (
sma,ta.smain v5)close, Orta Vade - Gün (25)sma25 · line 9 - SMA (
sma,ta.smain v5)close, Uzun Vade - Gün (99)sma99 · line 10
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 | (al) | On | 30 |
| Open SHORT short | (sat) | On | 32 |
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 | −15.6% | +102.5% | 48 | 25% | 0.87 | 49.4% | 26 Jan 2024 – 21 Oct 2026 |
| BTCUSDT 4h | −15.8% | +5.5% | 47 | 32% | 0.75 | 25.0% | 8 May 2026 – 21 Oct 2026 |
| ETHUSDT 1D | +9.9% | +9.8% | 48 | 35% | 1.05 | 58.9% | 26 Jan 2024 – 21 Oct 2026 |
| ETHUSDT 4h | +10.5% | +8.4% | 54 | 31% | 1.15 | 19.3% | 8 May 2026 – 21 Oct 2026 |
| SOLUSDT 1D | −33.0% | +16.7% | 44 | 39% | 0.87 | 77.9% | 26 Jan 2024 – 21 Oct 2026 |
| SOLUSDT 4h | −1.9% | +21.5% | 51 | 25% | 0.98 | 24.0% | 8 May 2026 – 21 Oct 2026 |
| BNBUSDT 1D | −54.1% | +148.3% | 48 | 31% | 0.52 | 74.0% | 26 Jan 2024 – 21 Oct 2026 |
| BNBUSDT 4h | −10.3% | +17.1% | 51 | 27% | 0.81 | 22.1% | 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 (Kısa Vade - Gün 5, Orta Vade - Gün 13) made +51.5% before 26 Dec 2025 and +74.0% after it, against +18.8% for the defaults. 27% of the 56 combinations made money in-sample and 77% out-of-sample.
| Orta Vade - Gün ↓ · Kısa Vade - Gün → | 4 | 5 | 6 | 7 | 8 | 10 | 12 |
|---|---|---|---|---|---|---|---|
| 13 | −21% | +51% | −28% | −46% | −56% | +3% | −27% |
| 15 | +31% | +22% | +0% | −39% | −5% | +3% | −6% |
| 18 | +6% | −7% | −12% | −7% | −26% | +1% | −8% |
| 21 | −12% | −21% | −17% | −21% | −34% | −19% | −23% |
| 25 | −24% | −36% | −17% | −34% | −39% | −61% | −63% |
| 30 | −37% | −42% | −44% | −46% | −55% | −49% | −46% |
| 35 | −1% | −12% | −14% | +2% | −23% | −0% | +5% |
| 43 | +22% | +15% | −4% | +1% | +0% | −27% | +18% |
| Orta Vade - Gün ↓ · Kısa Vade - Gün → | 4 | 5 | 6 | 7 | 8 | 10 | 12 |
|---|---|---|---|---|---|---|---|
| 13 | +21% | +74% | +13% | +14% | −3% | −21% | −8% |
| 15 | +25% | +32% | +30% | +23% | +4% | −11% | −1% |
| 18 | +29% | +15% | +24% | +9% | +11% | −8% | +8% |
| 21 | +20% | +15% | +31% | +18% | +9% | −2% | +11% |
| 25 | +9% | +20% | +26% | +19% | +4% | −0% | +1% |
| 30 | +6% | +5% | +8% | +6% | −7% | −6% | −0% |
| 35 | +19% | +29% | +38% | +52% | +9% | +14% | +32% |
| 43 | +45% | +46% | +27% | +3% | −3% | −2% | +2% |
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.
The trades
By market direction
| At entry, last 90 bars | Trades | Won | P&L |
|---|---|---|---|
| Rising market | 20 | 20% | −$2,103.99 |
| Sideways market | 15 | 33% | −$437.07 |
| Falling market | 13 | 23% | $986.68 |
Rising and falling mean the market moved more than 15% over the 90 bars before entry.
How bad could the drawdown be?
63.2%
The 95th percentile of the worst drawdown when the same 48 trades are reshuffled 5,000 times. The bar spans the 5th to 95th percentile, 36.3% to 63.2%; the tick is what actually happened, 47.9%. Order luck alone moves it this much.
All 48 trades
| Side | Entry | Exit | Bars | P&L |
|---|---|---|---|---|
| short | 23 Mar 2024 63,796.60 | 30 Mar 2024 69,850.50 | 7 | −$958.33 |
| long | 30 Mar 2024 69,850.50 | 8 Apr 2024 69,360.40 | 9 | −$71.92 |
| short | 8 Apr 2024 69,360.40 | 8 Apr 2024 69,360.40 | 0 | −$8.43 |
| long | 8 Apr 2024 69,360.40 | 16 Apr 2024 63,420.00 | 8 | −$726.61 |
| short | 16 Apr 2024 63,420.00 | 18 May 2024 67,024.00 | 32 | −$475.90 |
| long | 18 May 2024 67,024.00 | 14 Jun 2024 66,773.00 | 27 | −$36.34 |
| short | 14 Jun 2024 66,773.00 | 17 Jul 2024 65,044.00 | 33 | $192.80 |
| long | 17 Jul 2024 65,044.00 | 5 Aug 2024 58,161.00 | 19 | −$844.63 |
| short | 5 Aug 2024 58,161.00 | 24 Aug 2024 64,037.20 | 19 | −$721.36 |
| long | 24 Aug 2024 64,037.20 | 2 Sep 2024 57,301.80 | 9 | −$673.55 |
| short | 2 Sep 2024 57,301.80 | 18 Sep 2024 60,314.00 | 16 | −$303.84 |
| long | 18 Sep 2024 60,314.00 | 7 Oct 2024 62,819.90 | 19 | $218.05 |
| short | 7 Oct 2024 62,819.90 | 16 Oct 2024 67,074.10 | 9 | −$383.99 |
| long | 16 Oct 2024 67,074.10 | 24 Dec 2024 94,881.50 | 69 | $2,152.51 |
| short | 24 Dec 2024 94,881.50 | 9 Jan 2025 95,060.60 | 16 | −$20.82 |
| long | 9 Jan 2025 95,060.60 | 13 Jan 2025 94,545.10 | 4 | −$46.67 |
| short | 13 Jan 2025 94,545.10 | 17 Jan 2025 99,987.30 | 4 | −$426.74 |
| long | 17 Jan 2025 99,987.30 | 5 Feb 2025 97,763.10 | 19 | −$159.08 |
| short | 5 Feb 2025 97,763.10 | 26 Mar 2025 87,392.90 | 49 | $705.28 |
| long | 26 Mar 2025 87,392.90 | 3 Apr 2025 82,516.30 | 8 | −$420.24 |
| short | 3 Apr 2025 82,516.30 | 17 Apr 2025 84,030.40 | 14 | −$134.90 |
| long | 17 Apr 2025 84,030.40 | 4 Jun 2025 105,377.00 | 48 | $1,734.24 |
| short | 4 Jun 2025 105,377.00 | 13 Jun 2025 105,672.00 | 9 | −$32.12 |
| long | 13 Jun 2025 105,672.00 | 18 Jun 2025 104,551.00 | 5 | −$98.75 |
| short | 18 Jun 2025 104,551.00 | 29 Jun 2025 107,297.00 | 11 | −$230.19 |
| long | 29 Jun 2025 107,297.00 | 2 Aug 2025 113,298.00 | 34 | $452.28 |
| short | 2 Aug 2025 113,298.00 | 13 Aug 2025 120,134.00 | 11 | −$532.19 |
| long | 13 Aug 2025 120,134.00 | 21 Aug 2025 114,271.00 | 8 | −$405.17 |
| short | 21 Aug 2025 114,271.00 | 12 Sep 2025 115,483.00 | 22 | −$89.41 |
| long | 12 Sep 2025 115,483.00 | 26 Sep 2025 108,994.00 | 14 | −$437.02 |
| short | 26 Sep 2025 108,994.00 | 4 Oct 2025 122,232.00 | 8 | −$883.72 |
| long | 4 Oct 2025 122,232.00 | 15 Oct 2025 113,028.00 | 11 | −$482.69 |
| short | 15 Oct 2025 113,028.00 | 9 Dec 2025 90,634.40 | 55 | $1,154.19 |
| long | 9 Dec 2025 90,634.40 | 17 Dec 2025 87,863.40 | 8 | −$220.60 |
| short | 17 Dec 2025 87,863.40 | 4 Jan 2026 90,628.00 | 18 | −$219.94 |
| long | 4 Jan 2026 90,628.00 | 24 Jan 2026 89,600.30 | 20 | −$80.58 |
| short | 24 Jan 2026 89,600.30 | 5 Mar 2026 72,666.80 | 40 | $1,219.82 |
| long | 5 Mar 2026 72,666.80 | 26 Mar 2026 71,336.50 | 21 | −$148.17 |
| short | 26 Mar 2026 71,336.50 | 10 Apr 2026 71,788.00 | 15 | −$54.94 |
| long | 10 Apr 2026 71,788.00 | 19 May 2026 77,001.90 | 39 | $537.44 |
| short | 19 May 2026 77,001.90 | 8 Jul 2026 63,364.00 | 50 | $1,416.70 |
| long | 8 Jul 2026 63,364.00 | 1 Aug 2026 62,887.90 | 24 | −$79.88 |
| short | 1 Aug 2026 62,887.90 | 10 Aug 2026 64,901.60 | 9 | −$309.13 |
| long | 10 Aug 2026 64,901.60 | 13 Aug 2026 63,480.00 | 3 | −$207.00 |
| short | 13 Aug 2026 63,480.00 | 20 Aug 2026 69,334.80 | 7 | −$825.73 |
| long | 20 Aug 2026 69,334.80 | 14 Sep 2026 76,842.00 | 25 | $861.87 |
| short | 14 Sep 2026 76,842.00 | 21 Sep 2026 81,178.00 | 7 | −$510.50 |
| long | 21 Sep 2026 81,178.00 | 13 Oct 2026 81,850.00 | 22 | $61.49 |
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 |
|---|---|---|---|---|---|
| Three moving average strategies this page | — | v4 strategy | −15.6% | 48 | 49.4% |
| Follow the Crypto Shorts by xtradernet | sma | v4 strategy | No trades on this market | ||
| buy down and sell high trend 200 sma and ma cross by willi130503 | sma | v4 strategy | No trades on this market | ||
| Mayer Multiple Strategy by xtradernet | sma | v4 strategy | No trades on this market | ||
| Moving Average Cross Strategy early Closing by Geduldtrader | sma | v4 strategy | +73.8% | 20 | 151.5% |
| MFI Simple Strategy by OztheWoz | sma | v5 strategy | −0.2% | 28 | 3.2% |
Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 20 ms | Yes 1,000 bars in 59 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/// © dadashkadir//@version=4strategy("Üç Hareketli Ortalama Str.", overlay=true, initial_capital=10000, commission_value=0.047, default_qty_type=strategy.percent_of_equity, default_qty_value=100, pyramiding=0, calc_on_order_fills=true)kisa = input(title = "Kısa Vade - Gün", defval = 7, minval = 1)orta = input(title = "Orta Vade - Gün", defval = 25, minval = 1)uzun = input(title = "Uzun Vade - Gün", defval = 99, minval = 1)sma7 = sma(close, kisa)sma25 = sma(close, orta)sma99 = sma(close, uzun)alTrend = plot (sma7, color=#2323F1, linewidth=2, title="Har.Ort. Kısa Vade", transp=0)satTrend = plot (sma25, color=#FF0C00, linewidth=3, title="Har.Ort. Orta Vade", transp=0)ort99 = plot (sma99, color=#DFB001, linewidth=3, title="Har.Ort. Uzun Vade", transp=0)zamanaralik = input (2020, title="Backtest Başlangıç Tarihi")al = crossover (sma7, sma25) and zamanaralik <= yearsat = crossover (sma25, sma7) and zamanaralik <= yearhizlial = crossover (sma7, sma99) and zamanaralik <= yearhizlisat = crossover (sma99, sma7) and zamanaralik <= yearalkosul = sma7 >= sma25satkosul = sma25 >= sma7hizlialkosul = sma7 >= sma99hizlisatkosul = sma99 >= sma7plotshape(al, title = "Buy", text = 'Al', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny)plotshape(sat, title = "Sell", text = 'Sat', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.tiny)plotshape(hizlial, title = "Hızlı Al", text = 'Hızlı Al', style = shape.labelup, location = location.belowbar, color= color.blue, textcolor = color.white, transp = 0, size = size.tiny)plotshape(hizlisat, title = "Hızlı Sat", text = 'Hızlı Sat', style = shape.labeldown, location = location.abovebar, color= #6106D6 , textcolor = color.white, transp = 0, size = size.tiny)fill (alTrend, satTrend, color = sma7 >= sma25? #4DFF00 : #FF0C00, transp=80, title="Al-Sat Aralığı")//fill (ort99, satTrend, color = sma7 >= sma25? #6106D6 : color.blue, transp=80, title="Hızlı Al-Sat Aralığı")if (al) strategy.entry("LONG", strategy.long)if (sat) strategy.entry("SHORT", strategy.short)//if (hizlial)// strategy.entry("My Short Entry Id", strategy.long)//if (hizlisat)// strategy.entry("My Short Entry Id", strategy.short)