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
- 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.
| Setting | Default | Type and range | Feeds |
|---|---|---|---|
| lookback length of Stochastic | 14 | int · min 1 | k |
| Stochastic overbought condition | 80 | int | isOverBought isOverBoughtv2 |
| Stochastic oversold condition | 20 | int | unused |
| smoothing of Stochastic %K | 3 | int | k |
| moving average of Stochastic %K | 3 | int | d |
| lookback length of RSI | 14 | int · min 1 | vrsi |
| RSI overbought condition | 70 | int | unused |
| RSI oversold condition | 30 | int | unused |
| Enter on filtered signals | true | bool | entry Long line 76 |
| Enter on aggressive signals | true | bool | entry Long line 79 |
| LookBack Period Standard Deviation High | 22 | int | wvf |
| Bolinger Band Length | 20 | int | sDev midLine |
| Bollinger Band Standard Devaition Up | 2.0 | float · min 1 · max 5 | sDev |
| Look Back Period Percentile High | 50 | int | rangeHigh |
| Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99% | .85 | float | rangeHigh |
| -------Text Plots Below Use Original Criteria------- | false | bool | unused |
| Show Text Plot if WVF WAS True and IS Now False | false | bool | unused |
| Show Text Plot if WVF IS True | false | bool | unused |
| -------Text Plots Below Use FILTERED Criteria------- | false | bool | unused |
| Show Text Plot For Filtered Entry | true | bool | unused |
| Show Text Plot For AGGRESSIVE Filtered Entry | true | bool | unused |
| Long-Term Look Back Current Bar Has To Close Below This Value OR Medium Term--Default=40 | 40 | float · min 25 · max 99 | alert3 alert4 |
| Medium-Term Look Back Current Bar Has To Close Below This Value OR Long Term--Default=14 | 14 | float · min 10 · max 20 | alert3 alert4 |
| Entry Price Action Strength--Close > X Bars Back---Default=3 | 3 | int · min 1 · max 9 | alert3 alert4 |
| -------------------------Turn On/Off ALERTS Below--------------------- | false | bool | unused |
| ----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want---- | false | bool | unused |
| Show Alert WVF = True? | false | bool | unused |
| Show Alert WVF Was True Now False? | false | bool | unused |
| Show Alert WVF Filtered? | false | bool | unused |
| Show Alert WVF AGGRESSIVE Filter? | false | bool | unused |
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, d
isOverBought · 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.
Order rules
| Order | Fires when | By default | Line |
|---|---|---|---|
| Open Long long | (filteredAlert and FilteredChecked == true) | On | 77 |
| Open Long long | (aggressiveAlert and AggressiveChecked == true) | On | 80 |
| Close Long | (isOverBought) | On | 82 |
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.
- ClearHigher-timeframe dataThe script requests no other symbol or timeframe.
- ClearFuture-bar referencesNo negative history offsets such as close[-1].
- ClearIntrabar recalculationNo varip, calc_on_every_tick or realtime-only state. Orders are decided once per closed bar.
- ClearOrder timingOrders fill at the next bar's open, after the signal bar has closed.
The checks read the source; the replay runs it. Together they catch the common causes, not every possible one.
Other markets
The same script with default settings on 8 Binance markets. Each row is a separate backtest over the most recent 1,000 bars.
| Market | Net | Buy and hold | Trades | Won | Profit factor | Max drawdown | Period |
|---|---|---|---|---|---|---|---|
| BTCUSDT 1D | +1.0% | +102.5% | 21 | 62% | 1.17 | 10.7% | 26 Jan 2024 – 21 Oct 2026 |
| BTCUSDT 4h | −2.6% | +5.5% | 11 | 73% | 0.20 | 4.6% | 8 May 2026 – 21 Oct 2026 |
| ETHUSDT 1D | −0.0% | +9.8% | 9 | 67% | 0.84 | 0.2% | 26 Jan 2024 – 21 Oct 2026 |
| ETHUSDT 4h | −0.2% | +8.4% | 13 | 54% | 0.40 | 0.4% | 8 May 2026 – 21 Oct 2026 |
| SOLUSDT 1D | +0.0% | +16.7% | 21 | 67% | 1.99 | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| SOLUSDT 4h | +0.0% | +21.5% | 14 | 57% | 13.18 | 0.0% | 8 May 2026 – 21 Oct 2026 |
| BNBUSDT 1D | +0.0% | +148.3% | 5 | 100% | — | 0.0% | 26 Jan 2024 – 21 Oct 2026 |
| BNBUSDT 4h | +0.0% | +17.1% | 13 | 92% | 4.99 | 0.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 bars | Trades | Won | P&L |
|---|---|---|---|
| Rising market | 10 | 70% | $28,032.80 |
| Sideways market | 6 | 83% | $26,413.20 |
| Falling market | 5 | 20% | −$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.
All 21 trades
| Side | Entry | Exit | Bars | P&L |
|---|---|---|---|---|
| long | 20 Apr 2024 63,818.00 | 21 May 2024 71,446.60 | 31 | $7,628.61 |
| long | 4 May 2024 62,882.00 | 21 May 2024 71,446.60 | 17 | $8,564.61 |
| long | 2 Jan 2025 94,591.80 | 1 May 2025 94,172.00 | 119 | −$419.78 |
| long | 3 Jan 2025 96,984.80 | 1 May 2025 94,172.00 | 118 | −$2,812.79 |
| long | 15 Jan 2025 96,560.90 | 1 May 2025 94,172.00 | 106 | −$2,388.85 |
| long | 2 Mar 2025 86,064.50 | 1 May 2025 94,172.00 | 60 | $8,107.46 |
| long | 13 Mar 2025 83,680.10 | 1 May 2025 94,172.00 | 49 | $10,491.90 |
| long | 2 Jun 2025 105,643.00 | 4 Jul 2025 109,585.00 | 32 | $3,941.84 |
| long | 8 Jun 2025 105,552.00 | 4 Jul 2025 109,585.00 | 26 | $4,032.62 |
| long | 24 Jun 2025 105,334.00 | 4 Jul 2025 109,585.00 | 10 | $4,250.83 |
| long | 25 Jun 2025 106,083.00 | 4 Jul 2025 109,585.00 | 9 | $3,501.77 |
| long | 5 Aug 2025 115,055.00 | 17 Sep 2025 116,789.00 | 43 | $1,733.93 |
| long | 23 Aug 2025 116,936.00 | 17 Sep 2025 116,789.00 | 25 | −$147.04 |
| long | 29 Aug 2025 112,567.00 | 17 Sep 2025 116,789.00 | 19 | $4,222.06 |
| long | 2 Sep 2025 109,237.00 | 17 Sep 2025 116,789.00 | 15 | $7,551.53 |
| long | 3 Sep 2025 111,240.00 | 17 Sep 2025 116,789.00 | 14 | $5,548.95 |
| long | 24 Nov 2025 86,830.00 | 16 Apr 2026 74,810.00 | 143 | −$12,020.00 |
| long | 25 Nov 2025 88,300.00 | 16 Apr 2026 74,810.00 | 142 | −$13,490.00 |
| long | 24 Jan 2026 89,600.30 | 16 Apr 2026 74,810.00 | 82 | −$14,790.30 |
| long | 28 Jan 2026 89,250.00 | 16 Apr 2026 74,810.00 | 78 | −$14,440.00 |
| long | 12 Jun 2026 63,626.00 | 16 Jul 2026 64,756.30 | 34 | $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.
| Script | Shares | Type | Net | Trades | Max drawdown |
|---|---|---|---|---|---|
| Vix FIX - StochRSI Strategy this page | — | v5 strategy | +1.0% | 21 | 10.7% |
| AVWAP Strategy by asfbhero | rsi stoch sma stdev | v5 strategy | does not run in Zeal Terminal | ||
| Volume and Moving average,will this model working in real-trade- by Ayden_C | sma rsi stdev highest | v4 strategy | −157,995.0% | 10 | 4,752.1% |
| Bottom catch strategy by footlz | sma stdev rsi | v4 strategy | +3.9% | 3 | 7.1% |
| Bull Trend Filtered StochRSI (BTFS) by SnarkyPuppy | highest rsi sma | v5 strategy | +36.9% | 21 | 21.5% |
| Madri by Mdemoio | rsi sma stdev | v4 strategy | +25.0% | 4 | 36.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.
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
| Engine | Compiles | Runs | Matches TradingView |
|---|---|---|---|
| Zeal Terminal · OpenPineScript v2 | Yes 25 ms | Yes 1,000 bars in 112 ms | Not measured |
| PineTS | Not tested | Not tested | Not 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)