Pine Script v4 · Strategy
Money maker EURUSD 15min daytrader
A Pine Script v4 strategy built on SMA (hl2, 3) and EMA (close, 200). It has 5 order rules, 2 entries among them, and trades long and short with the default settings. Exits use a stop loss and a profit target. Each trade is one contract and pays 0.000065 commission. 20 settings; defaults include From Day 1, From Month 1 and From Year 2000.
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 Money maker EURUSD 15min daytrader repaint?
- No
- No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
- How did Money maker EURUSD 15min daytrader 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 Money maker EURUSD 15min daytrader 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 Money maker EURUSD 15min daytrader use a stop loss?
- Yes
- strategy.exit sets a stop on line 74, 77.
- Does Money maker EURUSD 15min daytrader run in Zeal Terminal?
- Yes
- It compiles in 21 ms and runs 1,000 bars in 68 ms, in the browser.
BTCUSDT · 1D · default settings
- SMA
- SMA
- SMA
- SMA
- EMA
- Winning trade
- Losing trade
- Equity
- Buy and hold
- 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 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.
-
Note
Uses an argument v6 removed
when = on line 73, 76, 78. The upgraded version below moves each call inside an if block.
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, ema → ta.ema.
- 3 strategy calls use the when = argument (line 73, 76, 78). It is deprecated in v5 and removed in v6, where each call moves inside an if block.
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 22: sma → ta.sma
- Line 27: sma → ta.sma
- Line 32: sma → ta.sma
- Line 37: sma → ta.sma
- Line 41: ema → ta.ema
3 more edits
- Line 60: input(type = input.float) → input.float()
- Line 73: strategy.entry(…, 1) → strategy.entry(…, strategy.long)
- Line 76: strategy.entry(…, 0) → strategy.entry(…, strategy.short)
⋯// © SoftKill21-//@version=4+//@version=5strategy("Money maker EURUSD 15min",initial_capital=1000, ⋯smma = 0.0-sma1 = sma(src, len)+sma1 = ta.sma(src, len)smma := na(smma[1]) ? sma1 : (smma[1] * (len - 1) + src) / len⋯smma2 = 0.0-sma2 = sma(src2, len2)+sma2 = ta.sma(src2, len2)smma2 := na(smma2[1]) ? sma2 : (smma2[1] * (len2 - 1) + src2) / len2⋯smma3 = 0.0-sma3 = sma(src3, len3)+sma3 = ta.sma(src3, len3)smma3 := na(smma3[1]) ? sma3 : (smma3[1] * (len3 - 1) + src3) / len3⋯smma4 = 0.0-sma4 = sma(src4, len4)+sma4 = ta.sma(src4, len4)smma4 := na(smma4[1]) ? sma4 : (smma4[1] * (len4 - 1) + src4) / len4⋯src5 = input(close, title="Source")-out5 = ema(src5, len5)+out5 = ta.ema(src5, len5)timeinrange(res, sess) => time(res, sess) != 0⋯floating = strategy.openprofit //floating profit/loss-risk = input(1,type=input.float,title="Risk %")/100 //risk % per trade+risk = input.float(1,title="Risk %")/100 //risk % per trade //Calculate the size of the next trade⋯minDistanceS= (out5 - smma4)*100000-strategy.entry("long",1,size,when=longCond )+strategy.entry("long",strategy.long,size,when=longCond )strategy.exit("closelong","long", profit=tp,loss=sl) -strategy.entry("short",0,size,when=shortCond )+strategy.entry("short",strategy.short,size,when=shortCond )strategy.exit("closeshort","short", profit=tp,loss=sl)⋯Clean v5
Not verifiedNeither version placed a trade on any of the 8 markets, so there was nothing to compare.
- Line 8: input() → input.int()
- Line 9: input() → input.int()
- Line 10: input() → input.int()
- Line 13: input() → input.int()
- Line 14: input() → input.int()
- Line 15: input() → input.int()
16 more edits
- Line 19: input() → input.int()
- Line 20: input() → input.source()
- Line 24: input() → input.int()
- Line 25: input() → input.source()
- Line 29: input() → input.int()
- Line 30: input() → input.source()
- Line 34: input() → input.int()
- Line 35: input() → input.source()
- Line 39: input() → input.int()
- Line 40: input() → input.source()
- Line 55: input() → input.int()
- Line 56: input() → input.int()
- Line 73: when = longCond → if block
- Line 76: when = shortCond → if block
- Line 78: when = not london → if block
- Line 80: input() → input.int()
⋯ slippage=3)-fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)+fromDay = input.int(defval = 1, title = "From Day", minval = 1, maxval = 31)-fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)+fromMonth = input.int(defval = 1, title = "From Month", minval = 1, maxval = 12)-fromYear = input(defval = 2000, title = "From Year", minval = 1970)+fromYear = input.int(defval = 2000, title = "From Year", minval = 1970) // To Date Inputs-toDay = input(defval = 1, title = "To Day", minval = 1, maxval = 31)+toDay = input.int(defval = 1, title = "To Day", minval = 1, maxval = 31)-toMonth = input(defval = 8, title = "To Month", minval = 1, maxval = 12)+toMonth = input.int(defval = 8, title = "To Month", minval = 1, maxval = 12)-toYear = input(defval = 2021, title = "To Year", minval = 1970)+toYear = input.int(defval = 2021, title = "To Year", minval = 1970) ⋯finishDate = timestamp(toYear, toMonth, toDay, 00, 00)-len = input(3, minval=1, title="Length")+len = input.int(3, minval=1, title="Length")-src = input(hl2, title="Source")+src = input.source(hl2, title="Source")smma = 0.0⋯smma := na(smma[1]) ? sma1 : (smma[1] * (len - 1) + src) / len-len2 = input(6, minval=1, title="Length")+len2 = input.int(6, minval=1, title="Length")-src2 = input(hl2, title="Source")+src2 = input.source(hl2, title="Source")smma2 = 0.0⋯smma2 := na(smma2[1]) ? sma2 : (smma2[1] * (len2 - 1) + src2) / len2-len3 = input(9, minval=1, title="Length")+len3 = input.int(9, minval=1, title="Length")-src3 = input(hl2, title="Source")+src3 = input.source(hl2, title="Source")smma3 = 0.0⋯smma3 := na(smma3[1]) ? sma3 : (smma3[1] * (len3 - 1) + src3) / len3-len4 = input(50, minval=1, title="Length")+len4 = input.int(50, minval=1, title="Length")-src4 = input(close, title="Source")+src4 = input.source(close, title="Source")smma4 = 0.0⋯smma4 := na(smma4[1]) ? sma4 : (smma4[1] * (len4 - 1) + src4) / len4-len5 = input(200, minval=1, title="Length")+len5 = input.int(200, minval=1, title="Length")-src5 = input(close, title="Source")+src5 = input.source(close, title="Source")out5 = ta.ema(src5, len5)⋯//shortCond2 = crossunder(close,out5) and crossunder(close,smma4) and crossunder(close,smma3) and crossunder(close,smma2) and crossunder(close,smma) and time_cond-tp=input(300,title="tp")+tp=input.int(300,title="tp")-sl=input(300,title="sl")+sl=input.int(300,title="sl")//MONEY MANAGEMENT--------------------------------------------------------------⋯minDistanceS= (out5 - smma4)*100000-strategy.entry("long",strategy.long,size,when=longCond )+if longCond+ strategy.entry("long",strategy.long,size )strategy.exit("closelong","long", profit=tp,loss=sl) -strategy.entry("short",strategy.short,size,when=shortCond )+if shortCond+ strategy.entry("short",strategy.short,size )strategy.exit("closeshort","short", profit=tp,loss=sl)-strategy.close_all(when = not london, comment="london finish")+if not london+ strategy.close_all(comment="london finish")//strategy.close_all(when = not extraEntry, comment="london finish")-maxEntry=input(2,title="max entries")+maxEntry=input.int(2,title="max entries")strategy.risk.max_intraday_filled_orders(maxEntry)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.
⋯// © SoftKill21-//@version=5+//@version=6strategy("Money maker EURUSD 15min",initial_capital=1000, ⋯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 |
|---|---|---|---|
| From Day | 1 | int · min 1 · max 31 | startDate |
| From Month | 1 | int · min 1 · max 12 | startDate |
| From Year | 2000 | int · min 1970 | startDate |
| To Day | 1 | int · min 1 · max 31 | finishDate |
| To Month | 8 | int · min 1 · max 12 | finishDate |
| To Year | 2021 | int · min 1970 | finishDate |
| Length | 3 | int · min 1 | smma sma1 |
| Source | hl2 | source | smma sma1 |
| Length | 6 | int · min 1 | smma2 sma2 |
| Source | hl2 | source | smma2 sma2 |
| Length | 9 | int · min 1 | smma3 sma3 |
| Source | hl2 | source | smma3 sma3 |
| Length | 50 | int · min 1 | smma4 sma4 |
| Source | close | source | smma4 sma4 |
| Length | 200 | int · min 1 | out5 |
| Source | close | source | out5 |
| tp | 300 | int | exit closelong exit closeshort |
| sl | 300 | int | temp02 exit closelong exit closeshort |
| Risk % | 1 | float | temp01 |
| max entries | 2 | int | line 81 |
What it calculates
- SMA (
sma,ta.smain v5)Source (hl2), Length (3)sma1 · line 22 - SMA (
sma,ta.smain v5)Source (hl2), Length (6)sma2 · line 27 - SMA (
sma,ta.smain v5)Source (hl2), Length (9)sma3 · line 32 - SMA (
sma,ta.smain v5)Source (close), Length (50)sma4 · line 37 - EMA (
ema,ta.emain v5)Source (close), Length (200)out5 · line 41
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 | longCondclose > out5 and close > smma4 and close > smma3 and close > smma2 and close > smma and smma > smma2 and smma2>smma3 and smma3>smma4 and smma4>out5 and time_cond | On | 73 |
| Exit closelong stop and limit | every bar | On | 74 |
| Open short short | shortCondclose < out5 and close < smma4 and close < smma3 and close < smma2 and close < smma and smma < smma2 and smma2<smma3 and smma3<smma4 and smma4<out5 and time_cond | On | 76 |
| Exit closeshort stop and limit | every bar | On | 77 |
| Close | not london | On | 78 |
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.
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 |
|---|---|---|---|---|---|
| Money maker EURUSD 15min daytrader this page | — | v4 strategy | 0.0% | 0 | 0.0% |
| MACD Long Strat by TheGrindToday | ema sma | v4 strategy | +24.0% | 79 | 20.1% |
| Stock trending strategy by exlux99 | ema sma | v4 strategy | +35.3% | 21 | 14.7% |
| 4-Hour Stochastic EMA Trend by slymnturkoglu | ema sma | v4 strategy | No trades on this market | ||
| 4X EMA and volume strategy by SoftKill21 | ema sma | v4 strategy | +1.8% | 3 | 25.8% |
| Simple Momentum Strategy Based on SMA, EMA and Volume by slip_stream | sma ema | v4 strategy | +7.4% | 18 | 27.4% |
Where it runs
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 21 ms | With a workaround 1,000 bars in 68 ms | Not measured |
| PineTS | No v5 and v6 only | — | Not measured |
Zeal Terminal's engine currently reads an order side written as 1, 0 as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 73, 76) so the engine trades the way the script says. The engine's host API cannot yet declare a chart's symbol and timeframe, so this page sets them on the engine directly for each market.
“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/// © SoftKill21//@version=4strategy("Money maker EURUSD 15min",initial_capital=1000, commission_type=strategy.commission.cash_per_contract, commission_value=0.000065, slippage=3)fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)fromYear = input(defval = 2000, title = "From Year", minval = 1970) // To Date InputstoDay = input(defval = 1, title = "To Day", minval = 1, maxval = 31)toMonth = input(defval = 8, title = "To Month", minval = 1, maxval = 12)toYear = input(defval = 2021, title = "To Year", minval = 1970) startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)finishDate = timestamp(toYear, toMonth, toDay, 00, 00)len = input(3, minval=1, title="Length")src = input(hl2, title="Source")smma = 0.0sma1 = sma(src, len)smma := na(smma[1]) ? sma1 : (smma[1] * (len - 1) + src) / lenlen2 = input(6, minval=1, title="Length")src2 = input(hl2, title="Source")smma2 = 0.0sma2 = sma(src2, len2)smma2 := na(smma2[1]) ? sma2 : (smma2[1] * (len2 - 1) + src2) / len2len3 = input(9, minval=1, title="Length")src3 = input(hl2, title="Source")smma3 = 0.0sma3 = sma(src3, len3)smma3 := na(smma3[1]) ? sma3 : (smma3[1] * (len3 - 1) + src3) / len3len4 = input(50, minval=1, title="Length")src4 = input(close, title="Source")smma4 = 0.0sma4 = sma(src4, len4)smma4 := na(smma4[1]) ? sma4 : (smma4[1] * (len4 - 1) + src4) / len4len5 = input(200, minval=1, title="Length")src5 = input(close, title="Source")out5 = ema(src5, len5)timeinrange(res, sess) => time(res, sess) != 0london=timeinrange(timeframe.period, "0300-1045")londonEntry=timeinrange(timeframe.period, "0300-0845")extraEntry =timeinrange(timeframe.period, "0745-1030")time_cond = time >= startDate and time <= finishDate and londonEntry//time_cond2 = time >= startDate and time <= finishDate and extraEntry//longCond = close > out5 and close > smma4 and close > smma3 and close > smma2 and close > smma and smma > smma2 and smma2>smma3 and smma3>smma4 and smma4>out5 and time_condshortCond = close < out5 and close < smma4 and close < smma3 and close < smma2 and close < smma and smma < smma2 and smma2<smma3 and smma3<smma4 and smma4<out5 and time_cond//longCond = close > out5 and close > smma4 and close > smma3 and close > smma2 and close > smma and smma > smma2 and smma2>smma3 and smma3>smma4 and smma4>out5 and time_cond2//shortCond = close < out5 and close < smma4 and close < smma3 and close < smma2 and close < smma and smma < smma2 and smma2<smma3 and smma3<smma4 and smma4<out5 and time_cond2//longCond2 = crossover(close,out5) and crossover(close,smma4) and crossover(close,smma3) and crossover(close,smma2) and crossover(close,smma) and time_cond//shortCond2 = crossunder(close,out5) and crossunder(close,smma4) and crossunder(close,smma3) and crossunder(close,smma2) and crossunder(close,smma) and time_condtp=input(300,title="tp")sl=input(300,title="sl")//MONEY MANAGEMENT--------------------------------------------------------------balance = strategy.netprofit + strategy.initial_capital //current balancefloating = strategy.openprofit //floating profit/lossrisk = input(1,type=input.float,title="Risk %")/100 //risk % per trade //Calculate the size of the next tradetemp01 = balance * risk //Risk in USDtemp02 = temp01/sl //Risk in lotstemp03 = temp02*100000 //Convert to contractssize = temp03 - temp03%1000 //Normalize to 1000s (Trade size)if(size < 1000) size := 1000 //Set min. lot size dataL = (close-out5)*100000dataS = (out5-close)*100000minDistanceL = (smma4 - out5)*100000minDistanceS= (out5 - smma4)*100000strategy.entry("long",1,size,when=longCond )strategy.exit("closelong","long", profit=tp,loss=sl) strategy.entry("short",0,size,when=shortCond )strategy.exit("closeshort","short", profit=tp,loss=sl)strategy.close_all(when = not london, comment="london finish")//strategy.close_all(when = not extraEntry, comment="london finish")maxEntry=input(2,title="max entries")strategy.risk.max_intraday_filled_orders(maxEntry)