Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

VWMA-SMA 3Commas Bot

A Pine Script v5 strategy built on SMA (close, 13), VWMA (close, 13) and ATR (21). It has 6 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.06% commission. 14 settings; defaults include Risk Percentage 2.0, Entry Signal Fast Crosses and Take Profit Multiple 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 VWMA-SMA 3Commas Bot repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 32 of 32 trades.
What alerts does VWMA-SMA 3Commas Bot have?
6
{ "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}; { "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}; { "action": "close_at_market_price", "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}; { "action": "close_at_market_price", "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}; and more.
Does VWMA-SMA 3Commas Bot 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: 157 before, 102 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 VWMA-SMA 3Commas Bot use a stop loss?
Yes
strategy.exit sets a stop on line 102, 103.
Does VWMA-SMA 3Commas Bot run in Zeal Terminal?
Yes
It compiles in 43 ms and runs 1,000 bars in 198 ms, in the browser.

BTCUSDT · 1D · default settings

  • Slow SMA
  • Slow VWMA
  • Fast SMA
  • Fast VWMA
  • 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 (14)
40,00060,00080,000100,000120,000AprJulOct2025AprJulOct2026AprJulOct$-1,774,160,000$203Equity from $100
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.

The value of each line the script plots, on the last of 1,000 bars, with the default settings.

Review

What a careful reader of this script would point out, found by checking the source and the backtest.

  • Likely bug

    ta.sma(ta.stoch(close, high, low, 14), 6) ignores the settings line 56

    Line 56 hard-codes 6 where line 22 uses “Fast SMA Length”. Changing those settings moves one band but not this one.

    ta.sma(ta.stoch(close, high, low, 14), 6)ta.sma(ta.stoch(close, high, low, 14), i_lenFastSMA)
  • Likely bug

    ta.sma(k, 3) ignores the settings line 57

    Line 57 hard-codes 3 where line 22 uses “Fast SMA Length”. Changing those settings moves one band but not this one.

    ta.sma(k, 3)ta.sma(k, i_lenFastSMA)
  • Check

    2 settings do nothing

    “Long Trades?”, “Short Trades?” are declared but never read.

  • 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 100, 101, 102, 103, 104, 105. 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
Strategy Settings
Long Trades?If enabled, the Strategy will perform Long Trades.trueboolunused
Short Trades?If enabled, the Strategy will perform Short Trades.trueboolunused
Risk PercentageSet your desired Risk per Trade. For example, if you input 2, you will risk 2% of your account per trade.2.0float · min 0.1 · step 0.1risk
Entry SignalWhat signal triggers a trade. Fast Crosses are crosses of the Fast VWMA and Fast SMA. Medium Crosses are crosses of the Medium VWMA and Medium SMA. Slow Crosses are crosses of the Slow VWMA and Slow SMA.Fast Crossesstring · options ['Fast Crosses', 'Medium Crosses', 'Slow Crosses']line 44 line 47 line 50
Take Profit MultipleThe Average True Range Value at the time of an Entry Trigger will be multiplied against this value to determine your positions Take Profit distance.1.0float · step 0.5tp
Stop Loss MultipleThe Average True Range Value at the time of an Entry Trigger will be multiplied against this value to determine your positions Stop Loss distance.1.5float · step 0.5sl
VWMA/SMA Settings
Fast VWMA Length13int · min 1fastVWMA
Slow VWMA Length26int · min 1slowVWMA
Fast SMA Length13int · min 1fastSMA
Slow SMA Length26int · min 1slowSMA
SourceclosesourcefastSMA slowSMA fastVWMA slowVWMA
Backtesting Settings
Backtesting Start Timetimestamp('01 Jan 2022 13:30 +0000')timetimeCond
Backtesting End Timetimestamp('31 Dec 2099 19:30 +0000')timetimeCond
Stochastic RSI Settings
Use Stochastic RSI To Exit?If enabled, strategy will exit trades when the RSI crosses in Overbought or Oversold Conditionstrueboolline 64

What it calculates

  • SMASource (close), Fast SMA Length (13)fastSMA · line 22
  • SMASource (close), Slow SMA Length (26)slowSMA · line 23
  • VWMASource (close), Fast VWMA Length (13)fastVWMA · line 24
  • VWMASource (close), Slow VWMA Length (26)slowVWMA · line 25
  • ATR21atr · line 27
  • CrossoverfastVWMA, fastSMAfastUpCross · line 36
  • CrossoverfastVWMA, slowSMAmediumUpCross · line 37
  • CrossoverslowVWMA, slowSMAslowUpCross · line 38
  • CrossunderfastVWMA, fastSMAfastDownCross · line 39
  • CrossunderfastVWMA, slowSMAmediumDownCross · line 40
  • CrossunderslowVWMA, slowSMAslowDownCross · line 41
  • SMA / Stochta.stoch(close, high, low, 14), 6k · line 56
  • SMAk, 3d · line 57
  • Crossunderk, dstoch_crossunder · line 58
  • Crossoverk, dstoch_crossover · line 59
  • Crossunderk, dstoch_ob_crossunder · line 60
  • Crossoverk, dstoch_os_crossover · line 61
  • ValuewhenslowUpCross, close, 0valueAtClose · line 82
  • ValuewhenslowDownCross, close, 0valueAtCloseShort · line 84

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.

The script has 72 named inputs, calculations, conditions and outputs, too many to draw legibly here; the tables above list them.

Order rules

OrderFires whenBy defaultLine
Open Long longlongEntryOn100
Open Short shortshortEntryOn101
Exit Long Exit stop and limitstrategy.position_size > 0On102
Exit Short Exit stop and limitstrategy.position_size < 0On103
Close LongcloseFunctionstrategy.position_entry_name == 'Long' and high > longTakeLevel or strategy.position_entry_name == 'Long' and low < longStopLevel or strategy.position_entry_name == 'Long' and slowDownCross or exitLongOn104
Close ShortcloseFunctionShortstrategy.position_entry_name == 'Short' and low < shortTakeLevel or strategy.position_entry_name == 'Short' and high > shortStopLevel or strategy.position_entry_name == 'Short' and slowUpCross or exitShortOn105

Each order is guarded by the setting shown. “Off” orders never fire unless that setting is switched on.

Alerts

AlertCallMessageLine
(no title)alert{ "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}116
(no title)alert{ "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}118
(no title)alert{ "action": "close_at_market_price", "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}120
(no title)alert{ "action": "close_at_market_price", "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0}122
(no title)alert{ "action": "add_funds_in_quote", "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0, "volume":' + str.tostring(positionSize) + '}124
(no title)alert{ "action": "add_funds_in_quote", "message_type": "bot", "bot_id": insert your bot id here, "email_token": "insert your email token between these quotes", "delay_seconds": 0, "volume":' + str.tostring(positionSizeShort) + '}126

Does it repaint?

No

No repainting patterns in the source, and the live replay matched history.

32/32trades 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 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−1,774,150,000.0%+102.5%15734%0.0250,545.9%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h−131,575.0%+5.5%41113%0.14154,028.0%8 May 2026 – 21 Oct 2026
ETHUSDT 1D−6,089.9%+9.8%20529%0.407,264.7%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−1,121.5%+8.4%27119%0.471,216.9%8 May 2026 – 21 Oct 2026
SOLUSDT 1D−141.6%+16.7%31520%0.84177.6%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h−211.5%+21.5%30917%0.18212.4%8 May 2026 – 21 Oct 2026
BNBUSDT 1D−818,210.0%+148.3%14233%0.18563.0%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h−1,322.5%+17.1%30613%0.141,325.2%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.

ScriptSharesTypeNetTradesMax drawdown
[fpemehd] Strategy Template by DuDu95atr sma valuewhenv5 strategy+10.5%4114.8%
Crypto EMA Trend Reversal Strategy by ADHDCRYPT0sma atr valuewhenv4 strategy+37.5%3718.3%
Stochastic Moving Average by LucasVivienstoch sma atrv5 strategy+2.8%74.4%
Impulse Strategy Signals V2 by danieljordisma atr valuewhenv5 strategyNo trades on this market
Bollinger band & Volume based strategy V2 by Ayden_Csma atr valuewhenv4 strategy−0.1%50.2%

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.

  • 6 strategy calls use the when = argument (line 100, 101, 102, 103, 104, 105). It is deprecated in v5 and removed in v6, where each call moves inside an if block.
  • 1 setting uses the untyped input() (line 20). It still compiles in v6; input.int, input.float or input.source state the type.
  • No v6-only features. v6 is not needed to run this script.

Clean v5

VerifiedDownload the v5 script

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

  • Line 20: input() → input.source()
  • Line 100: when = longEntry → if block
  • Line 101: when = shortEntry → if block
  • Line 102: when = strategy.position_size > 0 → if block
  • Line 103: when = strategy.position_size < 0 → if block
  • Line 104: when = closeFunction → if block
  • Line 105: when = closeFunctionShort → if block
⋯i_lenSlowSMA = input.int(26, title='Slow SMA Length', minval=1, group = i_vwmaSettings)-i_src = input(title='Source', defval=close, group = i_vwmaSettings)+i_src = input.source(title='Source', defval=close, group = i_vwmaSettings)// VWMA/SMA Calculations⋯//Strategy Stuff-strategy.entry('Long', strategy.long, when = longEntry, qty = positionSize)+if longEntry+    strategy.entry('Long', strategy.long, qty = positionSize)-strategy.entry('Short', strategy.short, when = shortEntry, qty = positionSizeShort)+if shortEntry+    strategy.entry('Short', strategy.short, qty = positionSizeShort)-strategy.exit('Long Exit', from_entry='Long', limit = longTakeLevel, stop = longStopLevel, when = strategy.position_size > 0)+if strategy.position_size > 0+    strategy.exit('Long Exit', from_entry='Long', limit = longTakeLevel, stop = longStopLevel)-strategy.exit('Short Exit', from_entry = 'Short', limit = shortTakeLevel, stop = shortStopLevel, when = strategy.position_size < 0)+if strategy.position_size < 0+    strategy.exit('Short Exit', from_entry = 'Short', limit = shortTakeLevel, stop = shortStopLevel)-strategy.close('Long', when = closeFunction)+if closeFunction+    strategy.close('Long')-strategy.close('Short', when = closeFunctionShort)+if closeFunctionShort+    strategy.close('Short')// Automation Stuff ⋯

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: 157 before, 102 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.

⋯// Copyright © 2022 by CrackingCryptocurrency-//@version=5+//@version=6strategy(title="VWMA/SMA 3Commas Bot", shorttitle="VWMA/SMA 3,,, Bot", overlay=true, initial_capital=100, currency="USD",⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 43 msYes 1,000 bars in 198 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.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// Copyright © 2022 by CrackingCryptocurrency//@version=5strategy(title="VWMA/SMA 3Commas Bot", shorttitle="VWMA/SMA 3,,, Bot", overlay=true, initial_capital=100, currency="USD",   calc_on_every_tick=false, pyramiding=1, calc_on_order_fills=true, process_orders_on_close = true, commission_type=strategy.commission.percent, commission_value=0.06, margin_long = 0, precision = 8)// INPUTS:i_strategySettings = 'Strategy Settings'i_longTrades = input.bool(defval = true, title = 'Long Trades?', tooltip = 'If enabled, the Strategy will perform Long Trades.', group = i_strategySettings)i_shortTrades = input.bool(defval = true, title = 'Short Trades?', tooltip = 'If enabled, the Strategy will perform Short Trades.', group = i_strategySettings)i_risk = input.float(defval = 2.0, title = 'Risk Percentage', minval = 0.1, step = 0.1, tooltip = 'Set your desired Risk per Trade. For example, if you input 2, you will risk 2% of your account per trade.', group = i_strategySettings)i_entryType = input.string(defval = 'Fast Crosses', title = 'Entry Signal', options = ['Fast Crosses', 'Medium Crosses', 'Slow Crosses'], group = i_strategySettings,  tooltip = 'What signal triggers a trade. Fast Crosses are crosses of the Fast VWMA and Fast SMA. Medium Crosses are crosses of the Medium VWMA and Medium SMA. Slow Crosses are crosses of the Slow VWMA and Slow SMA.')i_tpmult = input.float(defval = 1.0, title = 'Take Profit Multiple', step = 0.5, tooltip = 'The Average True Range Value at the time of an Entry Trigger will be multiplied against this value to determine your positions Take Profit distance.', group = i_strategySettings)i_slmult = input.float(defval = 1.5, title = 'Stop Loss Multiple', step = 0.5, tooltip = 'The Average True Range Value at the time of an Entry Trigger will be multiplied against this value to determine your positions Stop Loss distance.', group = i_strategySettings)i_vwmaSettings = 'VWMA/SMA Settings'i_lenFastVWMA = input.int(13, title='Fast VWMA Length', minval=1, group = i_vwmaSettings)i_lenSlowVWMA = input.int(26, title='Slow VWMA Length', minval=1, group = i_vwmaSettings)i_lenFastSMA = input.int(13, title='Fast SMA Length', minval=1, group = i_vwmaSettings)i_lenSlowSMA = input.int(26, title='Slow SMA Length', minval=1, group = i_vwmaSettings)i_src = input(title='Source', defval=close, group = i_vwmaSettings)// VWMA/SMA CalculationsfastSMA = ta.sma(i_src, i_lenFastSMA)slowSMA = ta.sma(i_src, i_lenSlowSMA)fastVWMA = ta.vwma(i_src, i_lenFastVWMA)slowVWMA = ta.vwma(i_src, i_lenSlowVWMA)//ATR Calculationatr = ta.atr(21)tp = atr * i_tpmultsl = atr * i_slmult//  Strategy Backtest Limiting Algorithmbacktest_group = 'Backtesting Settings'i_startTime = input.time(defval=timestamp('01 Jan 2022 13:30 +0000'), title='Backtesting Start Time', group = backtest_group)i_endTime = input.time(defval=timestamp('31 Dec 2099 19:30 +0000'), title='Backtesting End Time', group = backtest_group)timeCond = time > i_startTime and time < i_endTime// Trading SignalsfastUpCross = ta.crossover(fastVWMA, fastSMA)mediumUpCross = ta.crossover(fastVWMA, slowSMA)slowUpCross = ta.crossover(slowVWMA, slowSMA)fastDownCross = ta.crossunder(fastVWMA, fastSMA)mediumDownCross = ta.crossunder(fastVWMA, slowSMA)slowDownCross = ta.crossunder(slowVWMA, slowSMA)longEntry = falseshortEntry = falseif i_entryType == 'Fast Crosses' and timeCond    longEntry := fastUpCross    shortEntry := fastDownCrossif i_entryType == 'Medium Crosses' and timeCond    longEntry := mediumUpCross    shortEntry := mediumDownCrossif i_entryType == 'Slow Crosses' and timeCond    longEntry := slowUpCross    shortEntry := slowDownCross// Stochastic RSI - For Exiting Trades stoch_group = 'Stochastic RSI Settings'useStoch = input.bool(defval = true, title = 'Use Stochastic RSI To Exit?', tooltip = 'If enabled, strategy will exit trades when the RSI crosses in Overbought or Oversold Conditions', group = stoch_group)k = ta.sma(ta.stoch(close, high, low, 14), 6)d = ta.sma(k, 3)stoch_crossunder = ta.crossunder(k, d)stoch_crossover = ta.crossover(k, d)stoch_ob_crossunder = ta.crossunder(k, d) ? math.avg(k, d) >= 80 : nastoch_os_crossover = ta.crossover(k, d) ? math.avg(k, d) <= 20 : naexitLong = falseexitShort = falseif useStoch    exitLong := stoch_ob_crossunder    exitShort := stoch_os_crossover    // Take Profit and Stop Loss - Here we calculate our Take Profit and Stop Loss Levels at the moment we receive a Trading Signal. longTakeLevel = 0.0longTakeLevel := slowUpCross ? close + tp : longTakeLevel[1]longStopLevel = 0.0longStopLevel := slowUpCross ? close - sl : longStopLevel[1]shortTakeLevel = 0.0shortTakeLevel := slowDownCross ? close - tp : shortTakeLevel[1]shortStopLevel = 0.0shortStopLevel := slowDownCross ? close + sl : shortStopLevel[1]// Position Sizing - This is how we calculate our Position Size for our Backtest and for our DCA Bot.initialCapital = strategy.initial_capitalbalance = initialCapital + strategy.netprofitrisk = i_risk / 100loss = balance * riskvalueAtClose = ta.valuewhen(slowUpCross, close, 0)distanceToStop = math.abs(valueAtClose - longStopLevel) / valueAtClosevalueAtCloseShort = ta.valuewhen(slowDownCross, close, 0)distanceToStopShort = math.abs(valueAtCloseShort - shortStopLevel) / valueAtCloseShortpositionSize = (loss / (distanceToStop / valueAtClose)) / valueAtClosepositionSizeShort = (loss / (distanceToStopShort / valueAtCloseShort)) / valueAtCloseShortif positionSize > 1000000    positionSize := 1000000if positionSize < 0    positionSize := 1if positionSizeShort > 1000000    positionSizeShort := 1000000if positionSizeShort < 0    positionSizeShort := 1// Close Function - This will cause the Bot to close the trade when the specified actions occur. closeFunction = strategy.position_entry_name == 'Long' and high > longTakeLevel or strategy.position_entry_name == 'Long' and low < longStopLevel or strategy.position_entry_name == 'Long' and slowDownCross or exitLongcloseFunctionShort = strategy.position_entry_name == 'Short' and low < shortTakeLevel or strategy.position_entry_name == 'Short' and high > shortStopLevel or strategy.position_entry_name == 'Short' and slowUpCross or exitShort//Strategy Stuffstrategy.entry('Long', strategy.long, when = longEntry, qty = positionSize)strategy.entry('Short', strategy.short, when = shortEntry, qty = positionSizeShort)strategy.exit('Long Exit', from_entry='Long', limit = longTakeLevel, stop = longStopLevel, when = strategy.position_size > 0)strategy.exit('Short Exit', from_entry = 'Short', limit = shortTakeLevel, stop = shortStopLevel, when = strategy.position_size < 0)strategy.close('Long', when = closeFunction)strategy.close('Short', when = closeFunctionShort)// Automation Stuff // Note for Users - Simply replace the JSON messages below with your Bot Message from your 3Commas DCA Bot. // If you have any issues with the Bot not sizing your trades up to your correct position size, try putting a 3-6 second delay in your 'addAlert' variable. Simply replace the 0 after "delay_seconds" with a number between 3-6.buyAlert = '{  "message_type": "bot",  "bot_id": insert your bot id here,  "email_token": "insert your email token between these quotes",  "delay_seconds": 0}'exitAlert = '{  "action": "close_at_market_price",  "message_type": "bot",  "bot_id": insert your bot id here,  "email_token": "insert your email token between these quotes",  "delay_seconds": 0}'addAlert = '{  "action": "add_funds_in_quote",  "message_type": "bot",  "bot_id": insert your bot id here,  "email_token": "insert your email token between these quotes",  "delay_seconds": 0,  "volume":' + str.tostring(positionSize) + '}'shortAlert = '{  "message_type": "bot",  "bot_id": insert your bot id here,  "email_token": "insert your email token between these quotes",  "delay_seconds": 0}'exitShortAlert = '{  "action": "close_at_market_price",  "message_type": "bot",  "bot_id": insert your bot id here,  "email_token": "insert your email token between these quotes",  "delay_seconds": 0}'addShortAlert = '{  "action": "add_funds_in_quote",  "message_type": "bot",  "bot_id": insert your bot id here,  "email_token": "insert your email token between these quotes",  "delay_seconds": 0,  "volume":' + str.tostring(positionSizeShort) + '}'if longEntry    alert(buyAlert, alert.freq_once_per_bar) if shortEntry    alert(shortAlert, alert.freq_once_per_bar)if closeFunction    alert(exitAlert, alert.freq_once_per_bar)if closeFunctionShort    alert(exitShortAlert, alert.freq_once_per_bar)if longEntry    alert(addAlert, alert.freq_once_per_bar)if shortEntry    alert(addShortAlert, alert.freq_once_per_bar)// Plots s0 = plot(slowSMA, title='Slow SMA', color=color.new(color.red, 0), linewidth=2)v0 = plot(slowVWMA, title='Slow VWMA', color=color.new(color.green, 0), linewidth=2)s1 = plot(fastSMA, title='Fast SMA', color=color.new(color.fuchsia, 0), linewidth=2, style=plot.style_circles)v1 = plot(fastVWMA, title='Fast VWMA', color=color.new(color.teal, 0), linewidth=2, style=plot.style_circles)fill(s0, v0, color=slowSMA < slowVWMA ? color.new(color.green, 70) : color.new(color.red, 70))fill(s1, v1, color=fastSMA < fastVWMA ? color.new(color.teal, 80) : color.new(color.fuchsia, 80))