Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

P-Signal Strategy RVS.

A Pine Script v5 strategy built on Stdev (ser, int), SMA (ser, int) and SMA or Change (nIntr). 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 0.2% commission. 3 settings; defaults include Cardinality: 4 and |ΔErf|: 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 P-Signal Strategy RVS. repaint?
No
No repainting patterns were found in the source. The live replay was not measured: the script acts only when barstate.isconfirmed is true, which Zeal Terminal's engine never reports during a live replay (it does not run a bar's closing update in live mode), so the replay cannot test this script.
How did P-Signal Strategy RVS. do on BTCUSDT 1D with default settings?
+2.20%
From 26 Jan 2024 to 21 Oct 2026, over 131 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Does P-Signal Strategy RVS. 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: 131 before, 273 after on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine. It is shown for reference and is not offered as a download.
Does P-Signal Strategy RVS. use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does P-Signal Strategy RVS. run in Zeal Terminal?
Yes
It compiles in 27 ms and runs 1,000 bars in 53 ms, in the browser.

BTCUSDT · 1D · default settings

  • HLine
  • HLine
  • HLine
  • HLine
  • Plot
  • 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,000AprJulOct2025AprJulOct2026AprJulOctHLine$1,023,700$2,025,273Equity from $1,000,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.
Table drawn by the script, as it stood on the last bar
Long: 1Net P/L: 21983.2Open P/L: 1715.6
Net profit
+2.20%
$21,983.20
Buy and hold
+102.5%
same period
Closed trades
131
72 won · 59 lost
Profitable
55.0%
of closed trades
Profit factor
1.10
gross profit ÷ gross loss
Max drawdown
7.09%
−$74,837.00

One run with the author's default settings, $1,000,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.

  • Note

    No slippage

    Fills are assumed at the exact open price. Add slippage in the properties for a more realistic test.

  • Note

    Uses an argument v6 removed

    when = on line 31, 32. The upgraded version below moves each call inside an if block.

Settings

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

SettingDefaultType and rangeFeeds
Parameters of strategy.
Cardinality:4int · min 4 · max 200nIntr
|ΔErf|:0float · min 0 · max 1 · step 0.01entry short entry long hline
Observation time.
Start date:timestamp('30 Dec 1957 00:00 +0300')timeisStartDate

What it calculates

  • Stdevser, intnStDev · line 23
  • SMAser, intnSma · line 24
  • SMA / ChangefPSignal(ta.change(ohlc4), nIntr), nIntrnPSignal · line 27

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 datanPointsCardinality:setting · 4timetimeprice datatStartDateStart date:setting · timestamp('30 Dec 1…ndErf|ΔErf|:setting · 0nStDevStdev→ nStDevnSmaSMA→ nSmanPSignalSMA / Change→ nPSignalnIntrnIntrvaluenTnTvaluenAnsnAnsvaluendPSignalndPSignalvalueisStartDateisStartDatevalueTableColourTableentry:shortOpen shortstrategy.entryentry:longOpen longstrategy.entryhline:34hlinehlinehline:35hlinehlinehline:36hlinehlinehline:37hlinehlineplot:38plotplot

Order rules

OrderFires whenBy defaultLine
Open short shortisStartDate and nPSignal > ndErf and ndPSignal < 0On31
Open long longisStartDate and nPSignal < -ndErf and ndPSignal > 0On32

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.

Not measuredAn engine gap, not the scriptThe script acts only when barstate.isconfirmed is true, which Zeal Terminal's engine never reports during a live replay (it does not run a bar's closing update in live mode), so the replay cannot test this script. The answer comes from the checks on the source alone.
  • 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 timingprocess_orders_on_close = true: orders fill at the signal bar's close.

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+2.2%+102.5%13155%1.107.1%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h−5.6%+5.5%12639%0.465.8%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+0.2%+9.8%13349%1.220.3%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−0.2%+8.4%12837%0.370.2%8 May 2026 – 21 Oct 2026
SOLUSDT 1D−0.0%+16.7%13544%0.780.0%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h−0.0%+21.5%12247%0.830.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D−0.0%+148.3%13349%0.880.1%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h−0.0%+17.1%13042%0.530.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 market4567%$68,618.60
Sideways market5754%−$11,200.40
Falling market2938%−$35,269.10

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

How bad could the drawdown be?

7.3%

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

0%8%
All 131 trades
SideEntryExitBarsP&L
short1 Feb 2024 43,082.9025 Feb 2024 51,728.8024−$8,835.53
long25 Feb 2024 51,728.801 Mar 2024 62,387.905$10,430.80
short1 Mar 2024 62,387.9019 Mar 2024 61,937.4018$201.85
long19 Mar 2024 61,937.4028 Mar 2024 70,780.609$8,577.76
short28 Mar 2024 70,780.605 Apr 2024 67,820.608$2,682.78
long5 Apr 2024 67,820.609 Apr 2024 69,146.004$1,051.45
short9 Apr 2024 69,146.0017 Apr 2024 61,277.408$7,607.78
long17 Apr 2024 61,277.4024 Apr 2024 64,289.607$2,761.09
short24 Apr 2024 64,289.6029 Apr 2024 63,866.005$167.28
long29 Apr 2024 63,866.007 May 2024 62,312.108−$1,806.28
short7 May 2024 62,312.1011 May 2024 60,826.004$1,239.81
long11 May 2024 60,826.0019 May 2024 66,274.008$5,193.82
short19 May 2024 66,274.0026 May 2024 68,507.707−$2,503.22
long26 May 2024 68,507.7028 May 2024 68,398.402−$383.09
short28 May 2024 68,398.402 Jun 2024 67,765.605$360.43
long2 Jun 2024 67,765.607 Jun 2024 69,355.605$1,315.73
short7 Jun 2024 69,355.6011 Jun 2024 67,314.204$1,768.02
long11 Jun 2024 67,314.203 Jul 2024 60,208.6022−$7,360.71
short3 Jul 2024 60,208.607 Jul 2024 55,857.804$4,118.64
long7 Jul 2024 55,857.8013 Jul 2024 59,204.006$3,116.09
short13 Jul 2024 59,204.0026 Jul 2024 67,908.0013−$8,958.19
long26 Jul 2024 67,908.0030 Jul 2024 66,188.004−$1,988.18
short30 Jul 2024 66,188.004 Aug 2024 58,161.005$7,778.30
long4 Aug 2024 58,161.0011 Aug 2024 58,712.607$317.84
short11 Aug 2024 58,712.6015 Aug 2024 57,541.104$939.02
long15 Aug 2024 57,541.1021 Aug 2024 61,156.006$3,377.58
short21 Aug 2024 61,156.0030 Aug 2024 59,124.009$1,791.48
long30 Aug 2024 59,124.0013 Sep 2024 60,498.0014$1,134.77
short13 Sep 2024 60,498.004 Oct 2024 62,086.0021−$1,833.17
long4 Oct 2024 62,086.008 Oct 2024 62,160.504−$174.00
short8 Oct 2024 62,160.5012 Oct 2024 63,206.204−$1,296.46
long12 Oct 2024 63,206.2017 Oct 2024 67,421.805$3,954.30
short17 Oct 2024 67,421.8025 Oct 2024 66,698.308$455.21
long25 Oct 2024 66,698.3031 Oct 2024 70,292.006$3,319.70
short31 Oct 2024 70,292.005 Nov 2024 69,372.005$640.67
long5 Nov 2024 69,372.0010 Nov 2024 80,370.005$10,698.50
short10 Nov 2024 80,370.0028 Nov 2024 95,644.0018−$15,626.00
long28 Nov 2024 95,644.002 Dec 2024 95,840.604−$186.33
short2 Dec 2024 95,840.605 Dec 2024 96,945.603−$1,490.58
long5 Dec 2024 96,945.609 Dec 2024 97,276.504−$57.60
short9 Dec 2024 97,276.5012 Dec 2024 100,004.003−$3,122.38
long12 Dec 2024 100,004.0018 Dec 2024 100,204.006−$200.70
short18 Dec 2024 100,204.0022 Dec 2024 95,186.304$4,626.96
long22 Dec 2024 95,186.3027 Dec 2024 94,299.005−$1,266.21
short27 Dec 2024 94,299.0031 Dec 2024 93,576.004$347.28
long31 Dec 2024 93,576.005 Jan 2025 98,363.605$4,403.73
short5 Jan 2025 98,363.6011 Jan 2025 94,600.006$3,377.69
long11 Jan 2025 94,600.0015 Jan 2025 100,497.004$5,507.17
short15 Jan 2025 100,497.005 Feb 2025 96,612.4021$3,490.70
long5 Feb 2025 96,612.4016 Feb 2025 96,118.1011−$879.77
short16 Feb 2025 96,118.1020 Feb 2025 98,305.004−$2,575.73
long20 Feb 2025 98,305.005 Mar 2025 90,606.0013−$8,076.81
short5 Mar 2025 90,606.0012 Mar 2025 83,680.107$6,577.32
long12 Mar 2025 83,680.1016 Mar 2025 82,574.504−$1,438.10
short16 Mar 2025 82,574.5020 Mar 2025 84,223.404−$1,982.46
long20 Mar 2025 84,223.4022 Mar 2025 83,840.602−$718.93
short22 Mar 2025 83,840.6031 Mar 2025 82,550.009$957.80
long31 Mar 2025 82,550.004 Apr 2025 83,889.904$1,006.98
short4 Apr 2025 83,889.909 Apr 2025 82,615.205$941.64
long9 Apr 2025 82,615.2013 Apr 2025 83,760.004$812.03
short13 Apr 2025 83,760.007 May 2025 97,030.5024−$13,632.10
long7 May 2025 97,030.5011 May 2025 104,118.004$6,685.20
short11 May 2025 104,118.0016 May 2025 103,464.005$238.94
long16 May 2025 103,464.0023 May 2025 107,318.007$3,432.84
short23 May 2025 107,318.0027 May 2025 108,938.004−$2,052.38
long27 May 2025 108,938.005 Jun 2025 101,509.009−$7,850.38
short5 Jun 2025 101,509.008 Jun 2025 105,734.003−$4,639.81
long8 Jun 2025 105,734.0011 Jun 2025 108,645.003$2,482.36
short11 Jun 2025 108,645.0016 Jun 2025 106,795.005$1,419.71
long16 Jun 2025 106,795.0028 Jun 2025 107,297.0012$74.08
short28 Jun 2025 107,297.008 Jul 2025 108,923.0010−$2,058.63
long8 Jul 2025 108,923.0014 Jul 2025 119,841.006$10,460.70
short14 Jul 2025 119,841.0018 Jul 2025 117,925.004$1,440.81
long18 Jul 2025 117,925.0025 Jul 2025 117,614.007−$781.61
short25 Jul 2025 117,614.003 Aug 2025 114,209.009$2,941.86
long3 Aug 2025 114,209.0011 Aug 2025 118,686.008$4,011.41
short11 Aug 2025 118,686.0019 Aug 2025 112,873.008$5,349.94
long19 Aug 2025 112,873.0025 Aug 2025 110,112.006−$3,206.93
short25 Aug 2025 110,112.0028 Aug 2025 112,567.003−$2,900.28
long28 Aug 2025 112,567.005 Sep 2025 110,660.008−$2,353.36
short5 Sep 2025 110,660.0024 Sep 2025 113,307.0019−$3,094.94
long24 Sep 2025 113,307.004 Oct 2025 122,391.0010$8,612.60
short4 Oct 2025 122,391.0012 Oct 2025 114,959.008$6,957.50
long12 Oct 2025 114,959.0023 Oct 2025 110,078.0011−$5,330.69
short23 Oct 2025 110,078.002 Nov 2025 110,541.0010−$903.74
long2 Nov 2025 110,541.004 Nov 2025 101,497.002−$9,467.54
short4 Nov 2025 101,497.007 Nov 2025 103,339.003−$2,251.53
long7 Nov 2025 103,339.0012 Nov 2025 101,654.005−$2,094.70
short12 Nov 2025 101,654.0016 Nov 2025 94,261.404$7,001.10
long16 Nov 2025 94,261.4028 Nov 2025 90,890.7012−$3,741.04
short28 Nov 2025 90,890.703 Dec 2025 93,429.905−$2,907.89
long3 Dec 2025 93,429.906 Dec 2025 89,236.803−$4,558.49
short6 Dec 2025 89,236.8016 Dec 2025 87,863.4010$1,019.17
long16 Dec 2025 87,863.4023 Dec 2025 87,486.007−$728.12
short23 Dec 2025 87,486.0027 Dec 2025 87,877.004−$741.74
long27 Dec 2025 87,877.001 Jan 2026 88,839.005$608.60
short1 Jan 2026 88,839.0011 Jan 2026 91,013.6010−$2,534.32
long11 Jan 2026 91,013.6016 Jan 2026 95,550.905$4,164.16
short16 Jan 2026 95,550.9022 Jan 2026 89,559.706$5,621.05
long22 Jan 2026 89,559.7017 Feb 2026 67,503.5026−$22,370.30
short17 Feb 2026 67,503.5020 Feb 2026 68,020.003−$787.54
long20 Feb 2026 68,020.0023 Feb 2026 64,656.003−$3,629.34
short23 Feb 2026 64,656.0026 Feb 2026 67,485.203−$3,093.44
long26 Feb 2026 67,485.206 Mar 2026 68,114.008$357.64
short6 Mar 2026 68,114.0010 Mar 2026 69,948.604−$2,110.74
long10 Mar 2026 69,948.6014 Mar 2026 71,211.904$981.00
short14 Mar 2026 71,211.9023 Mar 2026 70,906.409$21.26
long23 Mar 2026 70,906.4027 Mar 2026 66,407.304−$4,773.80
short27 Mar 2026 66,407.3030 Mar 2026 66,797.403−$656.50
long30 Mar 2026 66,797.403 Apr 2026 66,964.304−$100.59
short3 Apr 2026 66,964.305 Apr 2026 69,034.202−$2,341.88
long5 Apr 2026 69,034.209 Apr 2026 71,788.004$2,472.15
short9 Apr 2026 71,788.001 May 2026 78,231.1022−$6,743.20
long1 May 2026 78,231.107 May 2026 80,006.006$1,458.40
short7 May 2026 80,006.0016 May 2026 78,148.109$1,541.64
long16 May 2026 78,148.1027 May 2026 74,449.3011−$4,003.94
short27 May 2026 74,449.3031 May 2026 73,674.404$478.66
long31 May 2026 73,674.4016 Jun 2026 65,675.0016−$8,278.08
short16 Jun 2026 65,675.0021 Jun 2026 63,312.005$2,105.05
long21 Jun 2026 63,312.007 Jul 2026 63,364.0016−$201.35
short7 Jul 2026 63,364.0027 Jul 2026 63,755.9020−$646.11
long27 Jul 2026 63,755.907 Aug 2026 64,923.2011$909.97
short7 Aug 2026 64,923.2016 Aug 2026 62,900.009$1,767.54
long16 Aug 2026 62,900.0023 Aug 2026 77,734.007$14,552.70
short23 Aug 2026 77,734.001 Sep 2026 77,439.009−$15.35
long1 Sep 2026 77,439.007 Sep 2026 79,112.006$1,359.91
short7 Sep 2026 79,112.0012 Sep 2026 77,278.705$1,520.50
long12 Sep 2026 77,278.7022 Sep 2026 86,208.6010$8,602.86
short22 Sep 2026 86,208.6027 Sep 2026 84,472.005$1,395.20
long27 Sep 2026 84,472.005 Oct 2026 85,766.908$954.39
short5 Oct 2026 85,766.9010 Oct 2026 82,988.405$2,441.00

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
P-Signal Strategy RVS. this page—v5 strategy+2.2%1317.1%
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%

Upgrade and export

Written in Pine Script v5. The clean-v5 step types the settings and moves when = into if blocks, which v6 requires; it is run before and after like any upgrade.

  • 2 strategy calls use the when = argument (line 31, 32). It is deprecated in v5 and removed in v6, where each call moves inside an if block.
  • No v6-only features. v6 is not needed to run this script.

Clean v5

VerifiedDownload the v5 script

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

  • Line 31: when = isStartDate and nPSignal > ndErf and ndPSignal < 0 → if block
  • Line 32: when = isStartDate and nPSignal < -ndErf and ndPSignal > 0 → if block
⋯// Reversal Strategy.-strategy.entry('short', strategy.short, when=isStartDate and nPSignal > ndErf and ndPSignal < 0)+if isStartDate and nPSignal > ndErf and ndPSignal < 0+    strategy.entry('short', strategy.short)-strategy.entry('long', strategy.long, when=isStartDate and nPSignal < -ndErf and ndPSignal > 0)+if isStartDate and nPSignal < -ndErf and ndPSignal > 0+    strategy.entry('long', strategy.long)// Plotting. ⋯

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: 131 before, 273 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.

-//@version=5+//@version=6// **********************************************************************************************************⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 27 msYes 1,000 bars in 53 msNot measured
PineTSNot testedNot testedNot 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.

Source

Copied verbatim from the author's published script, with its licence header intact. The author may have updated the original since this snapshot.

//@version=5// **********************************************************************************************************// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// P-Signal Strategy RVS © Kharevsky// **********************************************************************************************************strategy('P-Signal Strategy RVS.', precision=3, process_orders_on_close=true, pyramiding=0,      commission_type=strategy.commission.percent,     commission_value=0.2)// Parameters and const of P-Signal.nPoints = input.int(title='Cardinality:', defval=4, minval=4, maxval=200, group='Parameters of strategy.')ndErf = input.float(title='|ΔErf|:', defval=0, minval=0, maxval=1, step=0.01, group='Parameters of strategy.')tStartDate = input.time(title='Start date:', defval=timestamp('30 Dec 1957 00:00 +0300'), group='Observation time.')int nIntr = nPoints - 1// Horner's method for the error (Gauss) & P-Signal functions.fErf(x) =>    nT = 1.0 / (1.0 + 0.5 * math.abs(x))    nAns = 1.0 - nT * math.exp(-x * x - 1.26551223 +      nT * (1.00002368 + nT * (0.37409196 + nT * (0.09678418 +      nT * (-0.18628806 + nT * (0.27886807 + nT * (-1.13520398 +      nT * (1.48851587 + nT * (-0.82215223 + nT * 0.17087277)))))))))    x >= 0 ? nAns : -nAnsfPSignal(ser, int) =>    nStDev = ta.stdev(ser, int)    nSma = ta.sma(ser, int)    nStDev > 0 ? fErf(nSma / nStDev / math.sqrt(2)) : math.sign(nSma)// Data.float nPSignal = ta.sma(fPSignal(ta.change(ohlc4), nIntr), nIntr)float ndPSignal = math.sign(nPSignal[0] - nPSignal[1])bool isStartDate = time >= tStartDate ? true : false// Reversal Strategy.strategy.entry('short', strategy.short, when=isStartDate and nPSignal > ndErf and ndPSignal < 0)strategy.entry('long', strategy.long, when=isStartDate and nPSignal < -ndErf and ndPSignal > 0)// Plotting. hline(+1.0, color=color.new(color.orange, 70), linestyle=hline.style_dotted, editable=false)hline(-1.0, color=color.new(color.orange, 70), linestyle=hline.style_dotted, editable=false)hline(-ndErf, color=color.new(color.orange, 70), linestyle=hline.style_dotted, editable=false)hline(ndErf, color=color.new(color.orange, 70), linestyle=hline.style_dotted, editable=false)plot(nPSignal, color=color.new(color.blue, 0), style=plot.style_line)// Table of state.if barstate.isconfirmed    var Table = table.new(position=position.bottom_right, columns=3, rows=1,      frame_color=color.new(color.orange, 70), frame_width=1,      border_color=color.new(color.orange, 70), border_width=1)    table.cell(table_id=Table, column=0, row=0,      text=strategy.position_size > 0 ? 'Long: ' + str.tostring(strategy.position_size) : 'Short: ' + str.tostring(strategy.position_size),      text_color=strategy.position_size > 0 ? color.green : color.red)    table.cell(table_id=Table, column=1, row=0,      text='Net P/L: ' + str.tostring(strategy.netprofit, '#.#'),      text_color=strategy.netprofit > 0 ? color.green : color.red)    table.cell(table_id=Table, column=2, row=0,      text='Open P/L: ' + str.tostring(strategy.openprofit, '#.#'),      text_color=strategy.openprofit > 0 ? color.green : color.red)// The end.