Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

Vix FIX - StochRSI Strategy

A Pine Script v5 strategy built on SMA or Stoch (3), SMA (k, 3) and RSI (RSIprice, 14). It has 3 order rules, 2 entries among them, and trades long only with the default settings. Exits wait for a signal; there is no stop loss. Each trade is one contract and pays no commission. 30 settings; defaults include lookback length of Stochastic 14, Stochastic overbought condition 80 and Stochastic oversold condition 20.

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 Vix FIX - StochRSI Strategy repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 3 of 3 trades.
How did Vix FIX - StochRSI Strategy do on BTCUSDT 1D with default settings?
+1.02%
From 26 Jan 2024 to 21 Oct 2026, over 21 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Does Vix FIX - StochRSI Strategy 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: 21 before, 5 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 Vix FIX - StochRSI Strategy use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Vix FIX - StochRSI Strategy run in Zeal Terminal?
Yes
It compiles in 25 ms and runs 1,000 bars in 112 ms, in the browser.

BTCUSDT · 1D · default settings

  • SMA
  • SMA
  • Highest
  • Stdev
  • SMA
  • Highest
  • Crossover
  • 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 (30)
0.0050,000100,000AprJulOct2025AprJulOct2026AprJulOctRSI$1,010,220$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. The script plots nothing itself; the lines and the lower pane are its own calculations, drawn for reference.
Net profit
+1.02%
$10,197.60
Buy and hold
+102.5%
same period
Closed trades
21
13 won · 8 lost
Profitable
61.9%
of closed trades
Profit factor
1.17
gross profit ÷ gross loss
Max drawdown
10.71%
−$113,980.00

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

    15 settings do nothing

    “Stochastic oversold condition”, “RSI overbought condition”, “RSI oversold condition”, “-------Text Plots Below Use Original Criteria-------”, “Show Text Plot if WVF WAS True and IS Now False”, “Show Text Plot if WVF IS True”, “-------Text Plots Below Use FILTERED Criteria-------”, “Show Text Plot For Filtered Entry”, “Show Text Plot For AGGRESSIVE Filtered Entry”, “-------------------------Turn On/Off ALERTS Below---------------------”, “----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want----”, “Show Alert WVF = True?”, “Show Alert WVF Was True Now False?”, “Show Alert WVF Filtered?”, “Show Alert WVF AGGRESSIVE Filter?” are declared but never read.

  • Check

    No stop loss

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

  • Check

    No commission

    The backtest assumes free trading. Results on any real exchange will be lower.

  • Note

    No slippage

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

Settings

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

SettingDefaultType and rangeFeeds
lookback length of Stochastic14int · min 1k
Stochastic overbought condition80intisOverBought isOverBoughtv2
Stochastic oversold condition20intunused
smoothing of Stochastic %K 3intk
moving average of Stochastic %K3intd
lookback length of RSI14int · min 1vrsi
RSI overbought condition70intunused
RSI oversold condition30intunused
Enter on filtered signalstrueboolentry Long line 76
Enter on aggressive signalstrueboolentry Long line 79
LookBack Period Standard Deviation High22intwvf
Bolinger Band Length20intsDev midLine
Bollinger Band Standard Devaition Up2.0float · min 1 · max 5sDev
Look Back Period Percentile High50intrangeHigh
Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%.85floatrangeHigh
-------Text Plots Below Use Original Criteria-------falseboolunused
Show Text Plot if WVF WAS True and IS Now Falsefalseboolunused
Show Text Plot if WVF IS Truefalseboolunused
-------Text Plots Below Use FILTERED Criteria-------falseboolunused
Show Text Plot For Filtered Entrytrueboolunused
Show Text Plot For AGGRESSIVE Filtered Entrytrueboolunused
Long-Term Look Back Current Bar Has To Close Below This Value OR Medium Term--Default=4040float · min 25 · max 99alert3 alert4
Medium-Term Look Back Current Bar Has To Close Below This Value OR Long Term--Default=1414float · min 10 · max 20alert3 alert4
Entry Price Action Strength--Close > X Bars Back---Default=33int · min 1 · max 9alert3 alert4
-------------------------Turn On/Off ALERTS Below---------------------falseboolunused
----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want----falseboolunused
Show Alert WVF = True?falseboolunused
Show Alert WVF Was True Now False?falseboolunused
Show Alert WVF Filtered?falseboolunused
Show Alert WVF AGGRESSIVE Filter?falseboolunused

What it calculates

  • SMA / Stochta.stoch(close, high, low, Stochlength), smoothing of Stochastic %K (3)k · line 19
  • SMAk, moving average of Stochastic %K (3)d · line 20
  • RSIRSIprice, lookback length of RSI (14)vrsi · line 26
  • Highestclose, LookBack Period Standard Deviation High (22)wvf · line 53
  • Stdevwvf, Bolinger Band Length (20)sDev · line 54
  • SMAwvf, Bolinger Band Length (20)midLine · line 55
  • Highestwvf, Look Back Period Percentile High (50)rangeHigh · line 58
  • Crossoverk, disOverBought · line 72

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.

highhighprice datalowlowprice dataclosecloseprice dataStochlengthlookback length of Stoc…setting · 14smoothKsmoothing of Stochastic…setting · 3smoothDmoving average of Stoch…setting · 3RSIlengthlookback length of RSIsetting · 14pdLookBack Period Standar…setting · 22multBollinger Band Standard…setting · 2.0bblBolinger Band Lengthsetting · 20lbLook Back Period Percen…setting · 50phHighest Percentile - 0.…setting · .85StochOverBoughtStochastic overbought c…setting · 80strEntry Price Action Stre…setting · 3ltLBLong-Term Look Back Cur…setting · 40mtLBMedium-Term Look Back C…setting · 14openopenprice datakSMA / Stoch→ kdSMA→ dvrsiRSI→ vrsiwvfHighest→ wvfsDevStdev→ sDevmidLineSMA→ midLinerangeHighHighest→ rangeHighisOverBoughtCrossover→ isOverBoughtRSIpriceRSIpricevaluelowerBand, upperBandlowerBand · upperBand2 valuesalert1, alert2alert1 · alert22 valuesalert3alert3valuealert4alert4valueisOverBoughtv2isOverBoughtv2valuefilteredAlertfilteredAlertvalueaggressiveAlertaggressiveAlertvalueupRangeupRangeconditionupRange_AggrupRange_Aggrconditionfiltered, filtered_Aggrfiltered · filtered_Aggr2 conditionscolColourcolentry:LongOpen Longstrategy.entryclose:LongClose Longstrategy.close

Order rules

OrderFires whenBy defaultLine
Open Long long(filteredAlert and FilteredChecked == true)On77
Open Long long(aggressiveAlert and AggressiveChecked == true)On80
Close Long(isOverBought)On82

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.

3/3trades 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+1.0%+102.5%2162%1.1710.7%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h−2.6%+5.5%1173%0.204.6%8 May 2026 – 21 Oct 2026
ETHUSDT 1D−0.0%+9.8%967%0.840.2%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−0.2%+8.4%1354%0.400.4%8 May 2026 – 21 Oct 2026
SOLUSDT 1D+0.0%+16.7%2167%1.990.0%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h+0.0%+21.5%1457%13.180.0%8 May 2026 – 21 Oct 2026
BNBUSDT 1D+0.0%+148.3%5100%—0.0%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h+0.0%+17.1%1392%4.990.0%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 market1070%$28,032.80
Sideways market683%$26,413.20
Falling market520%−$44,248.40

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

How bad could the drawdown be?

4.2%

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

0%6%
All 21 trades
SideEntryExitBarsP&L
long20 Apr 2024 63,818.0021 May 2024 71,446.6031$7,628.61
long4 May 2024 62,882.0021 May 2024 71,446.6017$8,564.61
long2 Jan 2025 94,591.801 May 2025 94,172.00119−$419.78
long3 Jan 2025 96,984.801 May 2025 94,172.00118−$2,812.79
long15 Jan 2025 96,560.901 May 2025 94,172.00106−$2,388.85
long2 Mar 2025 86,064.501 May 2025 94,172.0060$8,107.46
long13 Mar 2025 83,680.101 May 2025 94,172.0049$10,491.90
long2 Jun 2025 105,643.004 Jul 2025 109,585.0032$3,941.84
long8 Jun 2025 105,552.004 Jul 2025 109,585.0026$4,032.62
long24 Jun 2025 105,334.004 Jul 2025 109,585.0010$4,250.83
long25 Jun 2025 106,083.004 Jul 2025 109,585.009$3,501.77
long5 Aug 2025 115,055.0017 Sep 2025 116,789.0043$1,733.93
long23 Aug 2025 116,936.0017 Sep 2025 116,789.0025−$147.04
long29 Aug 2025 112,567.0017 Sep 2025 116,789.0019$4,222.06
long2 Sep 2025 109,237.0017 Sep 2025 116,789.0015$7,551.53
long3 Sep 2025 111,240.0017 Sep 2025 116,789.0014$5,548.95
long24 Nov 2025 86,830.0016 Apr 2026 74,810.00143−$12,020.00
long25 Nov 2025 88,300.0016 Apr 2026 74,810.00142−$13,490.00
long24 Jan 2026 89,600.3016 Apr 2026 74,810.0082−$14,790.30
long28 Jan 2026 89,250.0016 Apr 2026 74,810.0078−$14,440.00
long12 Jun 2026 63,626.0016 Jul 2026 64,756.3034$1,130.28

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
Vix FIX - StochRSI Strategy this page—v5 strategy+1.0%2110.7%
AVWAP Strategy by asfbherorsi stoch sma stdevv5 strategydoes not run in Zeal Terminal
Volume and Moving average,will this model working in real-trade- by Ayden_Csma rsi stdev highestv4 strategy−157,995.0%104,752.1%
Bottom catch strategy by footlzsma stdev rsiv4 strategy+3.9%37.1%
Bull Trend Filtered StochRSI (BTFS) by SnarkyPuppyhighest rsi smav5 strategy+36.9%2121.5%
Madri by Mdemoiorsi sma stdevv4 strategy+25.0%436.4%

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.

  • 20 settings use the untyped input() (line 17, 18, 28, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 46, 47, 48, 49, 50, 51). 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 21 trades and the same P&L on BTCUSDT 1D, 1,000 bars, in Zeal Terminal's engine.

  • Line 17: input() → input.int()
  • Line 18: input() → input.int()
  • Line 28: input() → input.bool()
  • Line 29: input() → input.bool()
  • Line 31: input() → input.int()
  • Line 32: input() → input.int()
14 more edits
  • Line 34: input() → input.int()
  • Line 35: input() → input.float()
  • Line 36: input() → input.bool()
  • Line 37: input() → input.bool()
  • Line 38: input() → input.bool()
  • Line 39: input() → input.bool()
  • Line 40: input() → input.bool()
  • Line 41: input() → input.bool()
  • Line 46: input() → input.bool()
  • Line 47: input() → input.bool()
  • Line 48: input() → input.bool()
  • Line 49: input() → input.bool()
  • Line 50: input() → input.bool()
  • Line 51: input() → input.bool()
⋯StochOverSold = input.int(20, title="Stochastic oversold condition")-smoothK = input(3, title="smoothing of Stochastic %K ")+smoothK = input.int(3, title="smoothing of Stochastic %K ")-smoothD = input(3, title="moving average of Stochastic %K")+smoothD = input.int(3, title="moving average of Stochastic %K")k = ta.sma(ta.stoch(close, high, low, Stochlength), smoothK)⋯///////////// Filtering-FilteredChecked = input(true, title="Enter on filtered signals")+FilteredChecked = input.bool(true, title="Enter on filtered signals")-AggressiveChecked = input(true, title="Enter on aggressive signals")+AggressiveChecked = input.bool(true, title="Enter on aggressive signals")///////////// Double strategy: RSI strategy + Stochastic strategy-pd = input(22, title="LookBack Period Standard Deviation High")+pd = input.int(22, title="LookBack Period Standard Deviation High")-bbl = input(20, title="Bolinger Band Length")+bbl = input.int(20, title="Bolinger Band Length")mult = input.float(2.0    , minval=1, maxval=5, title="Bollinger Band Standard Devaition Up")-lb = input(50  , title="Look Back Period Percentile High")+lb = input.int(50  , title="Look Back Period Percentile High")-ph = input(.85, title="Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%")+ph = input.float(.85, title="Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%")-new = input(false, title="-------Text Plots Below Use Original Criteria-------" )+new = input.bool(false, title="-------Text Plots Below Use Original Criteria-------" )-sbc = input(false, title="Show Text Plot if WVF WAS True and IS Now False")+sbc = input.bool(false, title="Show Text Plot if WVF WAS True and IS Now False")-sbcc = input(false, title="Show Text Plot if WVF IS True")+sbcc = input.bool(false, title="Show Text Plot if WVF IS True")-new2 = input(false, title="-------Text Plots Below Use FILTERED Criteria-------" )+new2 = input.bool(false, title="-------Text Plots Below Use FILTERED Criteria-------" )-sbcFilt = input(true, title="Show Text Plot For Filtered Entry")+sbcFilt = input.bool(true, title="Show Text Plot For Filtered Entry")-sbcAggr = input(true, title="Show Text Plot For AGGRESSIVE Filtered Entry")+sbcAggr = input.bool(true, title="Show Text Plot For AGGRESSIVE Filtered Entry")ltLB = input.float(40, minval=25, maxval=99, title="Long-Term Look Back Current Bar Has To Close Below This Value OR Medium Term--Default=40")⋯//Alerts Instructions and Options Below...Inputs Tab-new4 = input(false, title="-------------------------Turn On/Off ALERTS Below---------------------" )+new4 = input.bool(false, title="-------------------------Turn On/Off ALERTS Below---------------------" )-new5 = input(false, title="----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want----")+new5 = input.bool(false, title="----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want----")-sa1 = input(false, title="Show Alert WVF = True?")+sa1 = input.bool(false, title="Show Alert WVF = True?")-sa2 = input(false, title="Show Alert WVF Was True Now False?")+sa2 = input.bool(false, title="Show Alert WVF Was True Now False?")-sa3 = input(false, title="Show Alert WVF Filtered?")+sa3 = input.bool(false, title="Show Alert WVF Filtered?")-sa4 = input(false, title="Show Alert WVF AGGRESSIVE Filter?")+sa4 = input.bool(false, title="Show Alert WVF AGGRESSIVE Filter?")//Williams Vix Fix Formula⋯

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: 21 before, 5 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// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 25 msYes 1,000 bars in 112 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/// © timj//     ____      ____                                              _                                      // ________  ________  ________  _______   ___       _______   ________  ________  _________  _______               ________  ________  ________ ___  ___  ________  ________  ________  _________  _______               ________  ________  ___       ___  _________  _______   ________  ________  _________  _______          // |\   __  \|\   ____\|\   ____\|\  ___ \ |\  \     |\  ___ \ |\   __  \|\   __  \|\___   ___\\  ___ \             |\   __  \|\   __  \|\  _____\\  \|\  \|\   ____\|\   ____\|\   __  \|\___   ___\\  ___ \             |\   __  \|\   __  \|\  \     |\  \|\___   ___\\  ___ \ |\   __  \|\   __  \|\___   ___\\  ___ \         // \ \  \|\  \ \  \___|\ \  \___|\ \   __/|\ \  \    \ \   __/|\ \  \|\  \ \  \|\  \|___ \  \_\ \   __/|            \ \  \|\  \ \  \|\ /\ \  \__/\ \  \\\  \ \  \___|\ \  \___|\ \  \|\  \|___ \  \_\ \   __/|            \ \  \|\  \ \  \|\ /\ \  \    \ \  \|___ \  \_\ \   __/|\ \  \|\  \ \  \|\  \|___ \  \_\ \   __/|        //  \ \   __  \ \  \    \ \  \    \ \  \_|/_\ \  \    \ \  \_|/_\ \   _  _\ \   __  \   \ \  \ \ \  \_|/__           \ \  \\\  \ \   __  \ \   __\\ \  \\\  \ \_____  \ \  \    \ \   __  \   \ \  \ \ \  \_|/__           \ \  \\\  \ \   __  \ \  \    \ \  \   \ \  \ \ \  \_|/_\ \   _  _\ \   __  \   \ \  \ \ \  \_|/__      //   \ \  \ \  \ \  \____\ \  \____\ \  \_|\ \ \  \____\ \  \_|\ \ \  \\  \\ \  \ \  \   \ \  \ \ \  \_|\ \ ___       \ \  \\\  \ \  \|\  \ \  \_| \ \  \\\  \|____|\  \ \  \____\ \  \ \  \   \ \  \ \ \  \_|\ \ ___       \ \  \\\  \ \  \|\  \ \  \____\ \  \   \ \  \ \ \  \_|\ \ \  \\  \\ \  \ \  \   \ \  \ \ \  \_|\ \ ___ //    \ \__\ \__\ \_______\ \_______\ \_______\ \_______\ \_______\ \__\\ _\\ \__\ \__\   \ \__\ \ \_______\\__\       \ \_______\ \_______\ \__\   \ \_______\____\_\  \ \_______\ \__\ \__\   \ \__\ \ \_______\\__\       \ \_______\ \_______\ \_______\ \__\   \ \__\ \ \_______\ \__\\ _\\ \__\ \__\   \ \__\ \ \_______\\__\//    \|__|\|__|\|_______|\|_______|\|_______|\|_______|\|_______|\|__|\|__|\|__|\|__|    \|__|  \|_______\|__|        \|_______|\|_______|\|__|    \|_______|\_________\|_______|\|__|\|__|    \|__|  \|_______\|__|        \|_______|\|_______|\|_______|\|__|    \|__|  \|_______|\|__|\|__|\|__|\|__|    \|__|  \|_______\|__|//                                                                                                                                                           \|_________|                                                                                                                                                                                                                                                             strategy('Bottom Feeder - VIX Bottom dip buying strategy', overlay=false, pyramiding=9, margin_long=100, margin_short=100)Stochlength = input.int(14, minval=1, title="lookback length of Stochastic")StochOverBought = input.int(80, title="Stochastic overbought condition")StochOverSold = input.int(20, title="Stochastic oversold condition")smoothK = input(3, title="smoothing of Stochastic %K ")smoothD = input(3, title="moving average of Stochastic %K")k = ta.sma(ta.stoch(close, high, low, Stochlength), smoothK)d = ta.sma(k, smoothD)///////////// RSI RSIlength = input.int( 14, minval=1 , title="lookback length of RSI")RSIOverBought = input.int( 70  , title="RSI overbought condition")RSIOverSold = input.int( 30  , title="RSI oversold condition")RSIprice = closevrsi = ta.rsi(RSIprice, RSIlength)///////////// FilteringFilteredChecked = input(true, title="Enter on filtered signals")AggressiveChecked = input(true, title="Enter on aggressive signals")///////////// Double strategy: RSI strategy + Stochastic strategypd = input(22, title="LookBack Period Standard Deviation High")bbl = input(20, title="Bolinger Band Length")mult = input.float(2.0    , minval=1, maxval=5, title="Bollinger Band Standard Devaition Up")lb = input(50  , title="Look Back Period Percentile High")ph = input(.85, title="Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%")new = input(false, title="-------Text Plots Below Use Original Criteria-------" )sbc = input(false, title="Show Text Plot if WVF WAS True and IS Now False")sbcc = input(false, title="Show Text Plot if WVF IS True")new2 = input(false, title="-------Text Plots Below Use FILTERED Criteria-------" )sbcFilt = input(true, title="Show Text Plot For Filtered Entry")sbcAggr = input(true, title="Show Text Plot For AGGRESSIVE Filtered Entry")ltLB = input.float(40, minval=25, maxval=99, title="Long-Term Look Back Current Bar Has To Close Below This Value OR Medium Term--Default=40")mtLB = input.float(14, minval=10, maxval=20, title="Medium-Term Look Back Current Bar Has To Close Below This Value OR Long Term--Default=14")str = input.int(3, minval=1, maxval=9, title="Entry Price Action Strength--Close > X Bars Back---Default=3")//Alerts Instructions and Options Below...Inputs Tabnew4 = input(false, title="-------------------------Turn On/Off ALERTS Below---------------------" )new5 = input(false, title="----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want----")sa1 = input(false, title="Show Alert WVF = True?")sa2 = input(false, title="Show Alert WVF Was True Now False?")sa3 = input(false, title="Show Alert WVF Filtered?")sa4 = input(false, title="Show Alert WVF AGGRESSIVE Filter?")//Williams Vix Fix Formulawvf = ((ta.highest(close, pd)-low)/(ta.highest(close, pd)))*100sDev = mult * ta.stdev(wvf, bbl)midLine = ta.sma(wvf, bbl)lowerBand = midLine - sDevupperBand = midLine + sDevrangeHigh = (ta.highest(wvf, lb)) * ph//Filtered Bar CriteriaupRange = low > low[1] and close > high[1]upRange_Aggr = close > close[1] and close > open[1]//Filtered Criteriafiltered = ((wvf[1] >= upperBand[1] or wvf[1] >= rangeHigh[1]) and (wvf < upperBand and wvf < rangeHigh))filtered_Aggr = (wvf[1] >= upperBand[1] or wvf[1] >= rangeHigh[1]) and not (wvf < upperBand and wvf < rangeHigh)//Alerts Criteriaalert1 = wvf >= upperBand or wvf >= rangeHigh ? 1 : 0alert2 = (wvf[1] >= upperBand[1] or wvf[1] >= rangeHigh[1]) and (wvf < upperBand and wvf < rangeHigh) ? 1 : 0alert3 = upRange and close > close[str] and (close < close[ltLB] or close < close[mtLB]) and filtered ? 1 : 0alert4 = upRange_Aggr and close > close[str] and (close < close[ltLB] or close < close[mtLB]) and filtered_Aggr ? 1 : 0//Coloring Criteria of Williams Vix Fixcol = wvf >= upperBand or wvf >= rangeHigh ? color.lime : color.grayisOverBought = (ta.crossover(k,d) and k > StochOverBought) ? 1 : 0isOverBoughtv2 = k > StochOverBought ? 1 : 0filteredAlert = alert3 ? 1 : 0aggressiveAlert = alert4 ? 1 : 0if (filteredAlert and FilteredChecked == true)    strategy.entry("Long", strategy.long)    if (aggressiveAlert and AggressiveChecked == true)    strategy.entry("Long", strategy.long)    if (isOverBought)    strategy.close("Long")        //if (filteredAlert or aggressiveAlert)//    strategy.entry("Long", strategy.long)