Zeal Terminal Open in Zeal Terminal

Pine Script v4 · Strategy

Aphrodite

A Pine Script v4 strategy built on SMA (ohlc4, 27) and Stdev (ohlc4, 27). It has 8 order rules, 4 entries among them, and trades long only with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 1% of equity and pays 0.075% commission. 3 settings; defaults include Day of Month 3, Month 10 and Rng 1.0.

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 Aphrodite repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 4 of 4 trades.
How did Aphrodite do on BTCUSDT 1D with default settings?
+0.02%
From 26 Jan 2024 to 21 Oct 2026, over 6 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Can Aphrodite be converted to Pine Script v5?
No
The automatic step from v4 to v5 changes the results, so no v5 download is offered; the edits are shown below.
Does Aphrodite use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Aphrodite run in Zeal Terminal?
Yes
It compiles in 93 ms and runs 1,000 bars in 872 ms, in the browser.

BTCUSDT · 1D · default settings

  • BLACK DOT
  • BLACK DOT
  • Normally Distributed Pseudo Random Value
  • Shape
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
Prerendered with the defaults. Change anything and run it here. The script runs in your browser.
Settings (3)
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOct$100,024$202,527Equity from $100,000
Binance BTCUSDT 1D candles, 26 Jan 2024 to 21 Oct 2026, 1,000 bars, default settings. Triangles mark entries; circles mark exits. Lines are what the script plots. Zeal Terminal's engine currently reads an order side written as long = strategy.long as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 260, 269, 277, 285) so the engine trades the way the script says.
Table drawn by the script, as it stood on the last bar
Open is 83028.14Close is 84704
High is 84898Low is 82635.32
Volume higher than 22.2916666667% of recent dataReds 47
HOPE THIS HELPS! ELIZA xGreens 53
Net profit
+0.02%
$23.88
Buy and hold
+102.5%
same period
Closed trades
6
4 won · 2 lost
Profitable
66.7%
of closed trades
Profit factor
4.12
gross profit ÷ gross loss
Max drawdown
0.02%
−$23.35

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

    1 setting does nothing

    “Day of Month” is declared but never read.

  • Check

    No stop loss

    Every exit waits for a signal. Nothing limits a losing trade before the exit condition fires.

  • Note

    1 setting has no label

    In the settings dialog rng (line 176) shows 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.

  • Note

    Uses transp =, which v5 removed line 221

    transp = on line 221, 222, 223, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243. v5 folds the transparency into the colour with color.new(c, transp).

  • Note

    Uses long =, which v5 renamed line 260

    long = on line 260, 269, 277, 285. v5 writes it as direction = strategy.long or strategy.short.

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 floor → math.floor, random → math.random, sqrt → math.sqrt, log → math.log, cos → math.cos, sma → ta.sma, stdev → ta.stdev, abs → math.abs, tostring → str.tostring.

v4 → v5

Differs

Trades differ: 6 before, 6 after on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.

  • Line 3: //@version=4 → //@version=5
  • Line 24: input(type = input.integer) → input.int()
  • Line 25: input(type = input.integer) → input.int()
  • Line 26: floor → math.floor
  • Line 26: random → math.random
  • Line 171: sqrt → math.sqrt
47 more edits
  • Line 171: log → math.log
  • Line 171: cos → math.cos
  • Line 174: sma → ta.sma
  • Line 175: stdev → ta.stdev
  • Line 177: abs → math.abs
  • Line 178: abs → math.abs
  • Line 180: abs → math.abs
  • Line 180: abs → math.abs
  • Line 180: abs → math.abs
  • Line 184: abs → math.abs
  • Line 184: abs → math.abs
  • Line 184: abs → math.abs
  • Line 191: abs → math.abs
  • Line 194: abs → math.abs
  • Line 221: transp = 0 → color.new(trd == 1 ? #000000 : na, 0)
  • Line 222: transp = 0 → color.new(tgd == 1 ? #000000 : na, 0)
  • Line 223: abs → math.abs
  • Line 223: transp = 0 → color.new(abs(rng) > high ? #fa0000 : #0efa00, 0)
  • Line 224: abs → math.abs
  • Line 226: abs → math.abs
  • Line 228: abs → math.abs
  • Line 230: transp = 99 → color.new(flagc == 0 ? color.yellow : na, 99)
  • Line 231: transp = 99 → color.new(flagl == 0 ? color.yellow : na, 99)
  • Line 232: transp = 99 → color.new(flagh == 0 ? color.yellow : na, 99)
  • Line 233: transp = 99 → color.new(flago == 0 ? color.yellow : na, 99)
  • Line 234: transp = 98 → color.new(flago == 0 and flagh == 0 ? color.purple : na, 98)
  • Line 235: transp = 98 → color.new(flago == 0 and flagl == 0 ? color.purple : na, 98)
  • Line 236: transp = 98 → color.new(flago == 0 and flagc == 0 ? color.purple : na, 98)
  • Line 237: transp = 98 → color.new(flagl == 0 and flagc == 0 ? color.purple : na, 98)
  • Line 238: transp = 98 → color.new(flagl == 0 and flagh == 0 ? color.purple : na, 98)
  • Line 239: transp = 98 → color.new(flagc == 0 and flagh == 0 ? color.purple : na, 98)
  • Line 240: transp = 97 → color.new(flagc == 0 and flagh == 0 and flago == 0 ? color.fuchsia : na, 97)
  • Line 241: transp = 97 → color.new(flagc == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, 97)
  • Line 242: transp = 97 → color.new(flago == 0 and flagc == 0 and flagl == 0 ? color.fuchsia : na, 97)
  • Line 243: transp = 97 → color.new(flago == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, 97)
  • Line 246: tostring → str.tostring
  • Line 247: tostring → str.tostring
  • Line 248: tostring → str.tostring
  • Line 249: tostring → str.tostring
  • Line 250: tostring → str.tostring
  • Line 251: tostring → str.tostring
  • Line 253: tostring → str.tostring
  • Line 259: abs → math.abs
  • Line 260: long = strategy.long → direction = strategy.long
  • Line 269: long = strategy.long → direction = strategy.long
  • Line 277: long = strategy.long → direction = strategy.long
  • Line 285: long = strategy.long → direction = strategy.long
⋯// © Eliza123123-//@version=4+//@version=5strategy("Aphrodite", default_qty_type = strategy.percent_of_equity, default_qty_value = 1, overlay=true, commission_type = strategy.commission.percent, commission_value=0.075, calc_on_every_tick=false, pyramiding = 999)⋯//==================================================================================================================================================================================================================-day_of_month = input(3, "Day of Month", input.integer)+day_of_month = input.int(3, "Day of Month")-this_month =  input(10, "Month", input.integer)+this_month =  input.int(10, "Month")-randomhour1 = floor(random(0,271))+randomhour1 = math.floor(math.random(0,271))// randomflip = round(random(0,1))⋯    _random_2 = f_pseudo_random_number(1.0, -_seed)-    _return = sqrt(-2 * log(_random_1)) * cos(2 * _pi * _random_2) * _dev + _mean+    _return = math.sqrt(-2 * math.log(_random_1)) * math.cos(2 * _pi * _random_2) * _dev + _mean    _return//My added code:-mean = sma(ohlc4, 27)+mean = ta.sma(ohlc4, 27)-dev = stdev(ohlc4, 27)+dev = ta.stdev(ohlc4, 27)rng = f_nd_pseudo_random(mean, dev, input(1.0))-absrng = abs(rng)+absrng = math.abs(rng)-normalDistributionDots = abs(rng)+normalDistributionDots = math.abs(rng)trd = 0, tgd = 0-if(abs(rng) > high) and (abs(rng)[1] > high[1]) and (abs(rng)[2] > high[2]) and bar_index+if(math.abs(rng) > high) and (math.abs(rng)[1] > high[1]) and (math.abs(rng)[2] > high[2]) and bar_index    trd := 1⋯    -if (abs(rng) < low) and (abs(rng)[1] < low[1]) and (abs(rng)[2] < low[2]) and bar_index+if (math.abs(rng) < low) and (math.abs(rng)[1] < low[1]) and (math.abs(rng)[2] < low[2]) and bar_index    tgd := 1⋯piBear=0-if abs(rng) > high+if math.abs(rng) > high    piBear := 1piBull=0-if abs(rng) < low+if math.abs(rng) < low    piBull := 1⋯    -plot(series = normalDistributionDots, title="BLACK DOT", color = trd == 1 ? #000000 : na, linewidth=4, style=plot.style_circles, transp=0)+plot(series = normalDistributionDots, title="BLACK DOT", color = color.new(trd == 1 ? #000000 : na, 0), linewidth=4, style=plot.style_circles)-plot(series = normalDistributionDots, title="BLACK DOT", color = tgd == 1 ? #000000 : na, linewidth=4, style=plot.style_circles, transp=0)+plot(series = normalDistributionDots, title="BLACK DOT", color = color.new(tgd == 1 ? #000000 : na, 0), linewidth=4, style=plot.style_circles)-plot(series = normalDistributionDots, title="Normally Distributed Pseudo Random Value", color = abs(rng) > high ? #fa0000 : #0efa00, linewidth=1, style=plot.style_circles, transp=0)+plot(series = normalDistributionDots, title="Normally Distributed Pseudo Random Value", color = color.new(math.abs(rng) > high ? #fa0000 : #0efa00, 0), linewidth=1, style=plot.style_circles)-plotcandle(open, high, low, close, color = abs(rng) > high ? #fa0000 : #0efa00, wickcolor= color.white)+plotcandle(open, high, low, close, color = math.abs(rng) > high ? #fa0000 : #0efa00, wickcolor= color.white)    -bgcolor(color = abs(rng) > high ?  #fa0000 : na)+bgcolor(color = math.abs(rng) > high ?  #fa0000 : na)bgcolor(color = trd == 1 ?  #fa0000 : na)-bgcolor(color = abs(rng) < low ? #0efa00 : na)+bgcolor(color = math.abs(rng) < low ? #0efa00 : na)bgcolor(color = tgd == 1 ?  #0efa00 : na)-bgcolor(color = flagc == 0 ? color.yellow : na, transp = 99)+bgcolor(color = color.new(flagc == 0 ? color.yellow : na, 99))-bgcolor(color = flagl == 0 ? color.yellow : na, transp = 99)+bgcolor(color = color.new(flagl == 0 ? color.yellow : na, 99))-bgcolor(color = flagh == 0 ? color.yellow : na, transp = 99)+bgcolor(color = color.new(flagh == 0 ? color.yellow : na, 99))-bgcolor(color = flago == 0 ? color.yellow : na, transp = 99)+bgcolor(color = color.new(flago == 0 ? color.yellow : na, 99))-bgcolor(color = flago == 0 and flagh == 0 ? color.purple : na, transp = 98)+bgcolor(color = color.new(flago == 0 and flagh == 0 ? color.purple : na, 98))-bgcolor(color = flago == 0 and flagl == 0 ? color.purple : na, transp = 98)+bgcolor(color = color.new(flago == 0 and flagl == 0 ? color.purple : na, 98))-bgcolor(color = flago == 0 and flagc == 0 ? color.purple : na, transp = 98)+bgcolor(color = color.new(flago == 0 and flagc == 0 ? color.purple : na, 98))-bgcolor(color = flagl == 0 and flagc == 0 ? color.purple : na, transp = 98)+bgcolor(color = color.new(flagl == 0 and flagc == 0 ? color.purple : na, 98))-bgcolor(color = flagl == 0 and flagh == 0 ? color.purple : na, transp = 98)+bgcolor(color = color.new(flagl == 0 and flagh == 0 ? color.purple : na, 98))-bgcolor(color = flagc == 0 and flagh == 0 ? color.purple : na, transp = 98)+bgcolor(color = color.new(flagc == 0 and flagh == 0 ? color.purple : na, 98))-bgcolor(color = flagc == 0 and flagh == 0 and flago == 0 ? color.fuchsia : na, transp = 97)+bgcolor(color = color.new(flagc == 0 and flagh == 0 and flago == 0 ? color.fuchsia : na, 97))-bgcolor(color = flagc == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, transp = 97)+bgcolor(color = color.new(flagc == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, 97))-bgcolor(color = flago == 0 and flagc == 0 and flagl == 0 ? color.fuchsia : na, transp = 97)+bgcolor(color = color.new(flago == 0 and flagc == 0 and flagl == 0 ? color.fuchsia : na, 97))-bgcolor(color = flago == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, transp = 97)+bgcolor(color = color.new(flago == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, 97))var testTable = table.new(position = position.bottom_right, columns = 2, rows = 4, bgcolor = color.white, border_width = 1)if barstate.islast-    table.cell(table_id = testTable, column = 0, row = 0, text = "Open is " + tostring(open), bgcolor = flago == 0 ? color.fuchsia : na, text_color = #000000)+    table.cell(table_id = testTable, column = 0, row = 0, text = "Open is " + str.tostring(open), bgcolor = flago == 0 ? color.fuchsia : na, text_color = #000000)-    table.cell(table_id = testTable, column = 1, row = 0, text = "Close is " + tostring(close), bgcolor = flagc == 0 ? color.fuchsia : na, text_color = #000000)+    table.cell(table_id = testTable, column = 1, row = 0, text = "Close is " + str.tostring(close), bgcolor = flagc == 0 ? color.fuchsia : na, text_color = #000000)-    table.cell(table_id = testTable, column = 0, row = 1, text = "High is " + tostring(high), bgcolor = flagh == 0 ? color.fuchsia : na, text_color = #000000)+    table.cell(table_id = testTable, column = 0, row = 1, text = "High is " + str.tostring(high), bgcolor = flagh == 0 ? color.fuchsia : na, text_color = #000000)-    table.cell(table_id = testTable, column = 1, row = 1, text = "Low is " + tostring(low), bgcolor = flagl == 0 ? color.fuchsia : na, text_color = #000000)+    table.cell(table_id = testTable, column = 1, row = 1, text = "Low is " + str.tostring(low), bgcolor = flagl == 0 ? color.fuchsia : na, text_color = #000000)-    table.cell(table_id = testTable, column = 0, row = 2, text = " Volume higher than " + tostring(volume_percent_class) + "% of recent data", bgcolor = #000000, text_color = color.white)+    table.cell(table_id = testTable, column = 0, row = 2, text = " Volume higher than " + str.tostring(volume_percent_class) + "% of recent data", bgcolor = #000000, text_color = color.white)-    table.cell(table_id = testTable, column = 1, row = 2, text = "Reds " + tostring(howManyreds), bgcolor = #9f0000, text_color = color.white)+    table.cell(table_id = testTable, column = 1, row = 2, text = "Reds " + str.tostring(howManyreds), bgcolor = #9f0000, text_color = color.white)    table.cell(table_id = testTable, column = 0, row = 3, text = "HOPE THIS HELPS! ELIZA x", bgcolor = #fc03a5, text_color = #d5ff03)-    table.cell(table_id = testTable, column = 1, row = 3, text = "Greens " + tostring(howManygreens), bgcolor = #1e9f00, text_color = color.white)+    table.cell(table_id = testTable, column = 1, row = 3, text = "Greens " + str.tostring(howManygreens), bgcolor = #1e9f00, text_color = color.white)plotshape(flagc == 0 and flagh == 0 and flago == 0 and flagl == 0, location = location.belowbar, color = color.purple, text = "Piv", textcolor = color.white)⋯//1st order Buy Entries-if abs(rng) < low and (month == (this_month) and dayofmonth == 3)+if math.abs(rng) < low and (month == (this_month) and dayofmonth == 3)    strategy.entry(id = "buy",-                 long = strategy.long,+                 direction = strategy.long,                 comment = "buy",⋯    strategy.entry(id = "buy2",-                 long = strategy.long,+                 direction = strategy.long,                 comment = "buy",⋯    strategy.entry(id = "buy3",-                 long = strategy.long,+                 direction = strategy.long,                 comment = "buy",⋯    strategy.entry(id = "buy4",-                 long = strategy.long,+                 direction = strategy.long,                 comment = "buy",⋯

Clean v5

Verified

Same 6 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.

  • Line 176: input() → input.float()
⋯dev = ta.stdev(ohlc4, 27)-rng = f_nd_pseudo_random(mean, dev, input(1.0))+rng = f_nd_pseudo_random(mean, dev, input.float(1.0))absrng = math.abs(rng)⋯

Does it run in Pine Script v6?

No

The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L180:C95: cannot use 'int' as a condition — Pine Script v6 does not cast 'int' or 'float' to 'bool' implicitly. Wrap it in bool(). The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯// © Eliza123123-//@version=5+//@version=6strategy("Aphrodite", default_qty_type = strategy.percent_of_equity, default_qty_value = 1, overlay=true, commission_type = strategy.commission.percent, commission_value=0.075, calc_on_every_tick=false, pyramiding = 999)⋯

Settings

Every input the script declares, with its default and what it feeds. Bounds are the ones the script enforces.

SettingDefaultType and rangeFeeds
Day of Month3intunused
Month10intentry buy entry buy2 entry buy3 entry buy4 line 259 line 268 line 276 line 284
Rng (no label in the script)1.0floatabsrng normalDistributionDots entry buy line 180 line 184 line 191 line 194 Normally Distributed Pseudo Random Value plotcandle bgcolor line 259

What it calculates

  • SMA (sma, ta.sma in v5)ohlc4, 27mean · line 174
  • Stdev (stdev, ta.stdev in v5)ohlc4, 27dev · line 175

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.

ohlc4ohlc4price dataclosecloseprice datalowlowprice datahighhighprice dataopenopenprice datarngRngsetting · 1.0this_monthMonthsetting · 10meanSMA→ meandevStdev→ devf_closef_closevaluef_lowf_lowvaluef_highf_highvaluef_openf_openvalue_return_returnvalue_random_1, _random_2_random_1 · _random_22 valuesabsrng, normalDistributionDotsabsrng · normalDistribu…2 valuesvolumesBeaten, volume_percent_classvolumesBeaten · volume_…2 valueshowManyredshowManyredsvaluehowManygreenshowManygreensvaluetestTableColourtestTableentry:buyOpen buystrategy.entryclose_all:close_all strategy.close_allentry:buy2Open buy2strategy.entryentry:buy3Open buy3strategy.entryentry:buy4Open buy4strategy.entryplot:221BLACK DOTplotplot:222BLACK DOTplotplot:223Normally Distributed Ps…plotplotcandle:224plotcandleplotcandlebgcolor:226bgcolorbgcolorbgcolor:227bgcolorbgcolorbgcolor:228bgcolorbgcolorbgcolor:229bgcolorbgcolorbgcolor:230bgcolorbgcolorbgcolor:231bgcolorbgcolorbgcolor:232bgcolorbgcolorbgcolor:233bgcolorbgcolorbgcolor:234bgcolorbgcolorbgcolor:235bgcolorbgcolorbgcolor:236bgcolorbgcolorbgcolor:237bgcolorbgcolorbgcolor:238bgcolorbgcolorbgcolor:239bgcolorbgcolorbgcolor:240bgcolorbgcolorbgcolor:241bgcolorbgcolorbgcolor:242bgcolorbgcolorbgcolor:243bgcolorbgcolorplotshape:254plotshapeplotshape

Order rules

OrderFires whenBy defaultLine
Open buy longabs(rng) < low and (month == (this_month) and dayofmonth == 3)On260
Close flagc == 0 and flagh == 0 and flago == 0 and flagl == 0On266
Open buy2 longtgd == 1 and (month == (this_month) and dayofmonth == 3)On269
Close flagc == 0 and flagh == 0 and flago == 0 and flagl == 0On275
Open buy3 longtgd == 1 and (month == (this_month) and dayofmonth == 3)On277
Close flagc == 0 and flagh == 0 and flago == 0 and flagl == 0On283
Open buy4 longtgd == 1 and (month == (this_month) and dayofmonth == 3)On285
Close flagc == 0 and flagh == 0 and flago == 0 and flagl == 0On291

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.

4/4trades identical when replayed liveThe last 300 bars, from 26 Dec 2025, were fed to the engine as live ticks, four per bar, and compared with the historical run. Orders are decided once per closed bar, so nothing can change mid-bar.
  • 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.

MarketNetBuy and holdTradesWonProfit factorMax drawdownPeriod
BTCUSDT 1D+0.0%+102.5%667%4.120.0%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h+0.0%+5.5%2100%—0.0%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+0.0%+9.8%4100%—0.0%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h0.0%+8.4%00%—0.0%8 May 2026 – 21 Oct 2026
SOLUSDT 1D+0.0%+16.7%1100%16.120.6%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h−0.1%+21.5%10%0.000.2%8 May 2026 – 21 Oct 2026
BNBUSDT 1D+0.1%+148.3%5100%166.810.2%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h−0.0%+17.1%00%0.000.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 barsTradesWonP&L
Rising market4100%$31.53
Sideways market20%−$7.65
Falling market0—$0.00

Rising and falling mean the market moved more than 15% over the 90 bars before entry.

How bad could the drawdown be?

0.0%

The 95th percentile of the worst drawdown when the same 6 trades are reshuffled 5,000 times. The bar spans the 5th to 95th percentile, 0.0% to 0.0%; the tick is what actually happened, 0.0%. Order luck alone moves it this much.

0%1%
All 6 trades
SideEntryExitBarsP&L
long4 Oct 2024 60,752.704 Oct 2024 60,752.700−$1.50
long4 Oct 2025 122,232.0010 Oct 2025 121,662.006−$6.15
long4 Oct 2026 84,753.607 Oct 2026 85,549.903$7.88
long4 Oct 2026 84,753.607 Oct 2026 85,549.903$7.88
long4 Oct 2026 84,753.607 Oct 2026 85,549.903$7.88
long4 Oct 2026 84,753.607 Oct 2026 85,549.903$7.88

Similar scripts

Indicators and strategies built from the same calculations, run on BTCUSDT 1D with their own defaults so they can be compared directly.

ScriptSharesTypeNetTradesMax drawdown
Aphrodite this page—v4 strategy+0.0%60.0%
Double Bollinger Binary Options by Trade_by_DBsma stdevv5 strategyNo trades on this market
Improved Bollinger Swing Strategy Stock Nasdaq by exlux99sma stdevv4 strategy−20.4%722.3%
I11L Long Put-Call Ratio Inversion by I11Lsma stdevv5 strategyNo trades on this market
P-Signal Strategy by Kharevskystdev smav4 strategy−9.7%2934.6%
P-Signal Strategy & Alert by Kharevskystdev smav4 strategy−9.7%2934.6%

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 93 msWith a workaround 1,000 bars in 872 msNot measured
PineTSNo v5 and v6 only—Not measured

Zeal Terminal's engine currently reads an order side written as long = strategy.long as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 260, 269, 277, 285) 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. 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/// © Eliza123123//@version=4strategy("Aphrodite", default_qty_type = strategy.percent_of_equity, default_qty_value = 1, overlay=true, commission_type = strategy.commission.percent, commission_value=0.075, calc_on_every_tick=false, pyramiding = 999)// v4//pump/dump trend following strategy idea added.//Pseudo Random Number Generator Box Muller Normal Distribution Method - code from [RS]Function - Functions to generate Random values by RicardoSantos. Dots are calculated by an adaptation of the ideas//in this script.// volume accumulates when dots are green for buys, red for sells. This setup is just looking for buys but this is very easy to change //just go to trading day and swap all strategy.long commands for strategy.short commands// Exits on minutes where OHLC all return 'primeness'//Reinforced dots (with black) when last three dots are all of same colour//==================================================================================================================================================================================================================//UPDATE HISTORY:// v2// more workable version of yesterdays script. please still only use on assets $10 to $100 as scalability hasn't been added for all assets yet. BG colors are theres to show historic prevalence of "primeness".// The table in the top right will flash purple when the open high low or close encounters "primeness". // When they all light up thats when you can potentially expect a reversal. Use on lower time frame to see the effect quickly. Note this still isn't a foolproof method for finding primes but I will be improving it in later editions// v3// added scaling for pairs from $0.10 up to $1000. May still be slight different in indicator performance betwwen the two extremes of that scale.// Clear OHLC prime pivot points have been added// Introducing the volumeometer. Pretty self explanatory.//==================================================================================================================================================================================================================day_of_month = input(3, "Day of Month", input.integer)this_month =  input(10, "Month", input.integer)randomhour1 = floor(random(0,271))// randomflip = round(random(0,1))// randomflip2 = round(random(0,1))// randomflip3 = round(random(0,1))// day_before1 = day_of_month - 1// day_before2 = day_of_month - 2// day_before3 = day_of_month - 3// day_before4 = day_of_month - 4// day_before5 = day_of_month - 5// day_before6 = day_of_month - 6// day_before7 = day_of_month - 7// day_before8 = day_of_month - 8// day_before9 = day_of_month - 9// day_before10 = day_of_month - 10f_close = close, f_low = low, f_high = high, f_open = openflagc = 0, flagl = 0, flagh = 0, flago = 0//SCALING (JUST USE ASSETS $10 to $1000 as this needs more work still)////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Assets $0.10-1if close >= 0.100 and close < 0.9999    f_close := f_close * 100000if low >= 0.100 and low < 0.9999    f_low := f_low * 100000if high >= 0.100 and high < 0.9999    f_high := f_high * 100000if open >= 0.100 and open < 0.9999    f_open := f_open * 100000//Assets $1-10if close >= 1.000 and close < 9.999    f_close := f_close * 10000if low >= 1.000 and low < 9.999    f_low := f_low * 10000if high >= 1.000 and high < 9.999    f_high := f_high * 10000if open >= 1.000 and open < 9.999    f_open := f_open * 10000//Assets $10-100if close >= 10.000 and close < 99.999    f_close := f_close * 1000if low >= 10.000 and low < 99.999    f_low := f_low * 1000if high >= 10.000 and high < 99.999    f_high := f_high * 1000if open >= 10.000 and open < 99.999    f_open := f_open * 1000//Assets $100-1000if close >= 100.000 and close < 999.999    f_close := f_close * 100if low >= 100.000 and low < 999.999    f_low := f_low * 100if high >= 100.000 and high < 999.999    f_high := f_high * 100if open >= 100.000 and open < 999.999    f_open := f_open * 100    //Assets $1000-10000if close >= 1000.000 and close < 9999.999    f_close := f_close * 10if low >= 1000.000 and low < 9999.999    f_low := f_low * 10if high >= 1000.000 and high < 9999.999    f_high := f_high * 10if open >= 1000.000 and open < 9999.999    f_open := f_open * 10//Assets $10000-100000if close >= 10000.000 and close < 99999.999    f_close := f_closeif low >= 10000.000 and low < 99999.999    f_low := f_lowif high >= 10000.000 and high < 99999.999    f_high := f_highif open >= 10000.000 and open < 99999.999    f_open := f_open////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Prime Checking//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////if f_close > 1    for  i = 2 to 3        if (f_close % i) == 0            flagc := 1        for  i = 4 to 5            if (f_close % i) == 0                flagc := 1            for  i = 6 to 7                if (f_close % i) == 0                    flagc := 1                for  i = 8 to 9                    if (f_close % i) == 0                        flagc := 1if f_low > 1    for  i = 2 to 3        if (f_low % i) == 0            flagl := 1        for  i = 4 to 5            if (f_low % i) == 0                flagl := 1            for  i = 6 to 7                if (f_low % i) == 0                    flagl := 1                for  i = 8 to 9                    if (f_low % i) == 0                        flagl := 1if f_high > 1    for  i = 2 to 3        if (f_high % i) == 0            flagh := 1        for  i = 4 to 5            if (f_high % i) == 0                flagh := 1            for  i = 6 to 7                if (f_high % i) == 0                    flagh := 1                for  i = 8 to 9                    if (f_high % i) == 0                        flagh := 1if f_open > 1    for  i = 2 to 3        if (f_open % i) == 0            flago := 1        for  i = 4 to 5            if (f_open % i) == 0                flago := 1            for  i = 6 to 7                if (f_open % i) == 0                    flago := 1                for  i = 8 to 9                    if (f_open % i) == 0                        flago := 1////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Pseudo Random Number Generator Box Muller Normal Distribution Method - code from [RS]Function - Functions to generate Random values by RicardoSantos//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////f_pseudo_random_number(_range, _seed) =>    _return = 1.0    if na(_seed)        _return := 3.14159 * nz(_return[1], 1) % bar_index        _return    else        _return := 3.14159 * nz(_return[1], 1) % (bar_index + _seed)        _return    _return := _return % _range    _returnf_nd_pseudo_random(_mean, _dev, _seed) =>    _pi = 3.14159265359    _random_1 = f_pseudo_random_number(1.0, _seed)    _random_2 = f_pseudo_random_number(1.0, -_seed)    _return = sqrt(-2 * log(_random_1)) * cos(2 * _pi * _random_2) * _dev + _mean    _return//My added code:mean = sma(ohlc4, 27)dev = stdev(ohlc4, 27)rng = f_nd_pseudo_random(mean, dev, input(1.0))absrng = abs(rng)normalDistributionDots = abs(rng)trd = 0, tgd = 0if(abs(rng) > high) and (abs(rng)[1] > high[1]) and (abs(rng)[2] > high[2]) and bar_index    trd := 1    tgd := 0    if (abs(rng) < low) and (abs(rng)[1] < low[1]) and (abs(rng)[2] < low[2]) and bar_index    tgd := 1    trd := 0////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CONDITION////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////piBear=0if abs(rng) > high    piBear := 1piBull=0if abs(rng) < low    piBull := 1//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////MORE CALCS////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////volumesBeaten = 0for i = 1 to 1440    if volume > volume[i]        volumesBeaten := volumesBeaten + 1volume_percent_class = (volumesBeaten / 1440) * 100howManyreds = 0for i = 1 to 100    if open[i] > close[i]        howManyreds := howManyreds + 1        howManygreens = 0for i = 1 to 100    if open[i] < close[i]        howManygreens := howManygreens + 1// howManygreendots = 0// for i = 1 to 100//     if abs(rng)[i] < low[i]//         howManygreendots := howManygreendots + 1//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////OUTPUTS////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////    plot(series = normalDistributionDots, title="BLACK DOT", color = trd == 1 ? #000000 : na, linewidth=4, style=plot.style_circles, transp=0)plot(series = normalDistributionDots, title="BLACK DOT", color = tgd == 1 ? #000000 : na, linewidth=4, style=plot.style_circles, transp=0)plot(series = normalDistributionDots, title="Normally Distributed Pseudo Random Value", color = abs(rng) > high ? #fa0000 : #0efa00, linewidth=1, style=plot.style_circles, transp=0)plotcandle(open, high, low, close, color = abs(rng) > high ? #fa0000 : #0efa00, wickcolor= color.white)    bgcolor(color = abs(rng) > high ?  #fa0000 : na)bgcolor(color = trd == 1 ?  #fa0000 : na)bgcolor(color = abs(rng) < low ? #0efa00 : na)bgcolor(color = tgd == 1 ?  #0efa00 : na)bgcolor(color = flagc == 0 ? color.yellow : na, transp = 99)bgcolor(color = flagl == 0 ? color.yellow : na, transp = 99)bgcolor(color = flagh == 0 ? color.yellow : na, transp = 99)bgcolor(color = flago == 0 ? color.yellow : na, transp = 99)bgcolor(color = flago == 0 and flagh == 0 ? color.purple : na, transp = 98)bgcolor(color = flago == 0 and flagl == 0 ? color.purple : na, transp = 98)bgcolor(color = flago == 0 and flagc == 0 ? color.purple : na, transp = 98)bgcolor(color = flagl == 0 and flagc == 0 ? color.purple : na, transp = 98)bgcolor(color = flagl == 0 and flagh == 0 ? color.purple : na, transp = 98)bgcolor(color = flagc == 0 and flagh == 0 ? color.purple : na, transp = 98)bgcolor(color = flagc == 0 and flagh == 0 and flago == 0 ? color.fuchsia : na, transp = 97)bgcolor(color = flagc == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, transp = 97)bgcolor(color = flago == 0 and flagc == 0 and flagl == 0 ? color.fuchsia : na, transp = 97)bgcolor(color = flago == 0 and flagh == 0 and flagl == 0 ? color.fuchsia : na, transp = 97)var testTable = table.new(position = position.bottom_right, columns = 2, rows = 4, bgcolor = color.white, border_width = 1)if barstate.islast    table.cell(table_id = testTable, column = 0, row = 0, text = "Open is " + tostring(open), bgcolor = flago == 0 ? color.fuchsia : na, text_color = #000000)    table.cell(table_id = testTable, column = 1, row = 0, text = "Close is " + tostring(close), bgcolor = flagc == 0 ? color.fuchsia : na, text_color = #000000)    table.cell(table_id = testTable, column = 0, row = 1, text = "High is " + tostring(high), bgcolor = flagh == 0 ? color.fuchsia : na, text_color = #000000)    table.cell(table_id = testTable, column = 1, row = 1, text = "Low is " + tostring(low), bgcolor = flagl == 0 ? color.fuchsia : na, text_color = #000000)    table.cell(table_id = testTable, column = 0, row = 2, text = " Volume higher than " + tostring(volume_percent_class) + "% of recent data", bgcolor = #000000, text_color = color.white)    table.cell(table_id = testTable, column = 1, row = 2, text = "Reds " + tostring(howManyreds), bgcolor = #9f0000, text_color = color.white)    table.cell(table_id = testTable, column = 0, row = 3, text = "HOPE THIS HELPS! ELIZA x", bgcolor = #fc03a5, text_color = #d5ff03)    table.cell(table_id = testTable, column = 1, row = 3, text = "Greens " + tostring(howManygreens), bgcolor = #1e9f00, text_color = color.white)plotshape(flagc == 0 and flagh == 0 and flago == 0 and flagl == 0, location = location.belowbar, color = color.purple, text = "Piv", textcolor = color.white)////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////TRADING DAY////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1st order Buy Entriesif abs(rng) < low and (month == (this_month) and dayofmonth == 3)    strategy.entry(id = "buy",                 long = strategy.long,                 comment = "buy",                 alert_message = "Long("  + syminfo.ticker + "): Started"                 )else if flagc == 0 and flagh == 0 and flago == 0 and flagl == 0    strategy.close_all(comment = "close")//2nd order Buy entriesif tgd == 1 and (month == (this_month) and dayofmonth == 3)    strategy.entry(id = "buy2",                 long = strategy.long,                 comment = "buy",                 alert_message = "Long("  + syminfo.ticker + "): Started"                 )else if flagc == 0 and flagh == 0 and flago == 0 and flagl == 0    strategy.close_all(comment = "close")if tgd == 1 and (month == (this_month) and dayofmonth == 3)    strategy.entry(id = "buy3",                 long = strategy.long,                 comment = "buy",                 alert_message = "Long("  + syminfo.ticker + "): Started"                 )else if flagc == 0 and flagh == 0 and flago == 0 and flagl == 0    strategy.close_all(comment = "close")if tgd == 1 and (month == (this_month) and dayofmonth == 3)    strategy.entry(id = "buy4",                 long = strategy.long,                 comment = "buy",                 alert_message = "Long("  + syminfo.ticker + "): Started"                 )else if flagc == 0 and flagh == 0 and flago == 0 and flagl == 0    strategy.close_all(comment = "close")//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////