Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

PowerX by jwitt98

A Pine Script v5 strategy built on RSI (close, 7), SMA or Stoch (3) and MACD (close, 12). It has 10 order rules and no entry of its own. Exits use a stop loss and a profit target. Each trade is one contract and pays no commission. 9 settings; defaults include Stop loss multiple 1.5, Profit target multiple 3.0 and Percent risk per trade 2.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 PowerX by jwitt98 repaint?
No
No repainting patterns were found in the source, and a live tick-by-tick replay matched history on 26 of 26 trades.
How did PowerX by jwitt98 do on BTCUSDT 1D with default settings?
+107.85%
From 26 Jan 2024 to 21 Oct 2026, over 78 closed trades, against +102.5% for buy and hold. A backtest, not investment advice.
Does PowerX by jwitt98 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: 78 before, 46 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 PowerX by jwitt98 use a stop loss?
Yes
strategy.exit sets a stop on line 93, 106.
Does PowerX by jwitt98 run in Zeal Terminal?
Yes
It compiles in 42 ms and runs 1,000 bars in 67 ms, in the browser.

BTCUSDT · 1D · default settings

  • Strategy equity
  • Current risk
  • Risk Factor
  • RSI(7)
  • Stoch %K
  • MACD Hist
  • Average daily range
  • 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 (9)
0.0050,000100,000AprJulOct2025AprJulOct2026AprJulOct$20,784$20,253Equity from $10,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.
Net profit
+107.85%
$10,785.20
Buy and hold
+102.5%
same period
Closed trades
78
26 won · 52 lost
Profitable
33.3%
of closed trades
Profit factor
1.08
gross profit ÷ gross loss
Max drawdown
107.84%
−$32,798.10

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

    No commission

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

  • Note

    2 settings have no label

    In the settings dialog startDate (line 13), endDate (line 14) show an empty name. The labels on this page come from the variable names.

  • Note

    No slippage

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

Settings

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

SettingDefaultType and rangeFeeds
Start Date (no label in the script)timestamp("1 Jan 2021 00:00 +0000")timeisInTimeRange
End Date (no label in the script)timestamp("1 Jan 2050 00:00 +0000")timeisInTimeRange
Allow long positionstrueboolexit Long limit/stop line 86
Allow short positionstrueboolexit Short limit/stop line 99
Keep risk at or above the set pointfalseboolline 41
Select the multipliers for the stop loss and profit targets
Stop loss multiple1.5floatlongStopLoss shortStopLoss qtyToTrade
Profit target multiple3.0floatlongProfitTarget shortProfitTarget
Money management
Use money managementfalseboolorder Enter long order Enter long order Enter short order Enter short line 35 line 87 line 100
Percent risk per trade2.0floatinitial_riskPerTrade currentRisk

What it calculates

  • RSIclose, 7rsiVal · line 53
  • SMA / Stochta.sma(ta.stoch(close, high, low, 14),3), 3stochKVal · line 55
  • MACDclose, 12, 26, 9macdLine · line 57
  • MACDclose, 12, 26, 9signalLine · line 57
  • MACDclose, 12, 26, 9histLine · line 57
  • SMAhigh, 7adr · line 59

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.

closecloseprice datalowlowprice datahighhighprice datainitial_riskPercentPercent risk per tradesetting · 2.0profitTargetMultipleProfit target multiplesetting · 3.0stopLossMultipleStop loss multiplesetting · 1.5timetimeprice datastartDateStart Datesetting · timestamp("1 Jan 20…endDateEnd Datesetting · timestamp("1 Jan 20…rsiValRSI→ rsiValstochKValSMA / Stoch→ stochKValmacdLineMACD→ macdLinesignalLineMACD→ signalLinehistLineMACD→ histLineadrSMA→ adrinitial_riskPerTradeinitial_riskPerTradevalueriskFactorriskFactorvaluecurrentProfitcurrentProfitvaluecurrentRiskcurrentRiskvaluelongStopLimitlongStopLimitvaluelongProfitTargetlongProfitTargetvaluelongStopLosslongStopLossvalueshortStopLimitshortStopLimitvalueshortProfitTargetshortProfitTargetvalueshortStopLossshortStopLossvalueqtyToTradeqtyToTradevalueisInTimeRangeisInTimeRangeconditiongreenBargreenBarconditionredBarredBarconditionblackBarblackBarconditioncurrentBarColorColourcurrentBarColororder:Enter longorder Enter longstrategy.orderexit:Long limit/stopexit Long limit/stopstrategy.exitcancel:Enter longcancel Enter longstrategy.cancelclose:Enter longClose Enter longstrategy.closeorder:Enter shortorder Enter shortstrategy.orderexit:Short limit/stopexit Short limit/stopstrategy.exitcancel:Enter shortcancel Enter shortstrategy.cancelclose:Enter shortClose Enter shortstrategy.closeplot:47Strategy equityplotplot:48Current riskplotplot:49Risk Factorplotplot:54RSI(7)plotplot:56Stoch %Kplotplot:58MACD Histplotplot:60Average daily rangeplotbarcolor:72barcolorbarcolor

Order rules

OrderFires whenBy defaultLine
order Enter long long(isUsingMoneyManagement)On88
order Enter long long(isUsingMoneyManagement)On91
Exit Long limit/stop stop and limit(greenBar and not greenBar[1] and isInTimeRange and isLongsAllowed)On93
cancel Enter long(blackBar or redBar)On96
Close Enter long(blackBar or redBar)On97
order Enter short short(isUsingMoneyManagement)On101
order Enter short short(isUsingMoneyManagement)On104
Exit Short limit/stop stop and limit(redBar and not redBar[1] and isInTimeRange and isShortsAllowed)On106
cancel Enter short(blackBar or greenBar)On108
Close Enter short(blackBar or greenBar)On109

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.

26/26trades 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+107.9%+102.5%7833%1.08107.8%26 Jan 2024 – 21 Oct 2026
BTCUSDT 4h−226.7%+5.5%8522%0.55221.2%8 May 2026 – 21 Oct 2026
ETHUSDT 1D+3.8%+9.8%8030%1.0514.9%26 Jan 2024 – 21 Oct 2026
ETHUSDT 4h−7.3%+8.4%8722%0.629.9%8 May 2026 – 21 Oct 2026
SOLUSDT 1D+2.8%+16.7%8232%1.610.7%26 Jan 2024 – 21 Oct 2026
SOLUSDT 4h−0.2%+21.5%8731%0.820.4%8 May 2026 – 21 Oct 2026
BNBUSDT 1D+6.6%+148.3%8237%1.463.6%26 Jan 2024 – 21 Oct 2026
BNBUSDT 4h−1.0%+17.1%8721%0.802.6%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 market3033%$1,372.65
Sideways market3145%$27,860.70
Falling market1712%−$18,448.10

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

How bad could the drawdown be?

98.2%

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

0%113%
All 78 trades
SideEntryExitBarsP&L
long29 Feb 2024 62,432.105 Mar 2024 60,057.305−$2,374.76
short22 Mar 2024 65,501.308 Apr 2024 72,339.8017−$6,838.55
short15 Apr 2024 65,661.901 May 2024 56,685.7016$8,976.11
short27 Apr 2024 63,770.001 May 2024 56,685.704$7,084.26
long7 May 2024 63,165.202 Jun 2024 67,766.8026$4,601.66
long10 May 2024 63,074.007 Jun 2024 68,979.5028$5,905.53
long14 May 2024 62,940.107 Jun 2024 68,979.5024$6,039.44
long16 May 2024 66,206.507 Jun 2024 68,979.5022$2,773.02
long6 Jun 2024 71,108.007 Jun 2024 68,979.501−$2,128.47
short12 Jun 2024 67,314.2012 Jun 2024 68,673.300−$1,359.09
short3 Jul 2024 62,135.505 Jul 2024 56,768.602$5,366.87
long16 Jul 2024 64,724.102 Aug 2024 65,354.0017$629.96
long20 Aug 2024 59,438.5027 Aug 2024 58,177.907−$1,260.55
long22 Aug 2024 61,156.0027 Aug 2024 58,177.905−$2,978.08
short31 Aug 2024 59,124.0013 Sep 2024 58,132.3013$991.68
long18 Sep 2024 60,314.004 Oct 2024 60,752.7016$438.73
short8 Oct 2024 62,224.0014 Oct 2024 65,179.106−$2,955.10
long15 Oct 2024 66,084.004 Nov 2024 67,253.4020$1,169.37
long29 Oct 2024 69,962.204 Nov 2024 67,253.406−$2,708.84
short5 Nov 2024 67,850.005 Nov 2024 70,414.400−$2,564.35
long8 Nov 2024 75,857.9011 Nov 2024 85,825.003$9,967.07
long17 Dec 2024 106,059.0018 Dec 2024 102,077.001−$3,981.73
short22 Dec 2024 97,292.006 Jan 2025 98,363.6015−$1,071.61
short27 Dec 2024 95,791.606 Jan 2025 101,409.0010−$5,617.54
short11 Jan 2025 94,726.1015 Jan 2025 97,885.204−$3,159.06
long17 Jan 2025 99,987.301 Feb 2025 102,430.0015$2,442.26
short25 Feb 2025 91,552.9026 Feb 2025 82,813.201$8,739.67
short4 Mar 2025 86,221.2024 Mar 2025 86,082.5020$138.66
short10 Mar 2025 80,734.509 Apr 2025 82,808.6030−$2,074.12
short7 Apr 2025 78,430.009 Apr 2025 82,808.602−$4,378.60
short11 Apr 2025 79,607.3014 Apr 2025 83,760.003−$4,152.70
long19 May 2025 106,454.0019 May 2025 102,521.000−$3,933.05
long22 May 2025 109,644.0029 May 2025 106,115.007−$3,529.40
short1 Jun 2025 104,592.009 Jun 2025 106,981.008−$2,389.60
long11 Jun 2025 110,274.0013 Jun 2025 105,594.002−$4,680.68
short20 Jun 2025 104,659.0025 Jun 2025 107,962.005−$3,303.70
long27 Jun 2025 106,947.0010 Jul 2025 115,810.0013$8,862.82
long3 Jul 2025 108,850.0010 Jul 2025 115,810.007$6,960.29
long23 Jul 2025 119,954.0025 Jul 2025 115,642.002−$4,312.39
short1 Aug 2025 115,764.0011 Aug 2025 119,345.0010−$3,580.62
long12 Aug 2025 118,686.0012 Aug 2025 118,321.000−$364.93
short19 Aug 2025 116,227.0010 Sep 2025 111,546.0022$4,680.67
short24 Aug 2025 115,438.0010 Sep 2025 113,419.0017$2,018.90
short5 Sep 2025 110,731.0010 Sep 2025 113,419.005−$2,688.29
short25 Sep 2025 113,307.0029 Sep 2025 114,004.004−$697.08
long2 Oct 2025 118,595.0010 Oct 2025 114,351.008−$4,243.54
short14 Oct 2025 115,166.0027 Oct 2025 114,559.0013$606.59
short4 Nov 2025 106,583.0018 Nov 2025 90,570.7014$16,012.40
short12 Nov 2025 103,059.0018 Nov 2025 90,570.706$12,488.30
long3 Dec 2025 91,277.9015 Dec 2025 86,885.4012−$4,392.50
long9 Dec 2025 90,634.4015 Dec 2025 86,885.406−$3,748.97
short18 Dec 2025 86,243.2022 Dec 2025 90,499.604−$4,256.36
long31 Dec 2025 88,485.5020 Jan 2026 87,904.8020−$580.68
long2 Jan 2026 88,839.1020 Jan 2026 87,904.8018−$934.23
long12 Jan 2026 91,013.7020 Jan 2026 87,904.808−$3,108.84
short21 Jan 2026 88,427.7031 Jan 2026 80,922.0010$7,505.63
long3 Mar 2026 68,830.1023 Mar 2026 67,859.0020−$971.06
long13 Mar 2026 70,541.3027 Mar 2026 68,820.3014−$1,721.03
long8 Apr 2026 71,924.204 May 2026 79,683.7026$7,759.47
long5 May 2026 79,861.0016 May 2026 77,816.5011−$2,044.47
short17 May 2026 78,148.102 Jun 2026 70,632.7016$7,515.34
short28 Jun 2026 60,029.002 Jul 2026 61,862.904−$1,833.89
short1 Jul 2026 58,624.702 Jul 2026 61,862.901−$3,238.19
long6 Jul 2026 63,650.0028 Jul 2026 63,139.9022−$510.10
long10 Jul 2026 63,230.0028 Jul 2026 63,139.9018−$90.10
long15 Jul 2026 65,044.0028 Jul 2026 63,139.9013−$1,904.08
long27 Jul 2026 65,400.0028 Jul 2026 63,139.901−$2,260.09
short29 Jul 2026 63,915.0030 Jul 2026 64,963.201−$1,048.17
short1 Aug 2026 62,887.905 Aug 2026 64,917.204−$2,029.29
long8 Aug 2026 64,923.2011 Aug 2026 63,661.903−$1,261.31
short14 Aug 2026 63,490.9017 Aug 2026 64,438.903−$948.00
long20 Aug 2026 69,334.8021 Aug 2026 75,123.901$5,789.13
long4 Sep 2026 81,270.408 Sep 2026 78,130.604−$3,139.76
short10 Sep 2026 78,306.4018 Sep 2026 78,358.708−$52.29
short16 Sep 2026 75,644.5018 Sep 2026 78,358.702−$2,714.24
long22 Sep 2026 86,620.0024 Sep 2026 83,091.702−$3,528.29
short10 Oct 2026 82,635.6021 Oct 2026 84,760.9011−$2,125.38
short13 Oct 2026 81,850.0021 Oct 2026 84,760.908−$2,910.93

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
PowerX by jwitt98 this page—v5 strategy+107.9%78107.8%
Simple Buy-Sell Strategy by BlockchainSpecialistssma macd rsiv4 strategy+43.7%615.5%
CCI Level Zone by Naruephatsma rsi stochv5 strategyNo trades on this market
AVWAP Strategy by asfbherorsi stoch smav5 strategydoes not run in Zeal Terminal
SRJ RSI Outperformer Strategy by Sapt_Jashrsi smav5 strategy+0.6%82.4%
RSI SMA Crossover Strategy by reeesrsi smav5 strategy+39.8%4230.8%

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.

  • No v6-only features. v6 is not needed to run this script.

Clean v5

Verified

Nothing to change.

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: 78 before, 46 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.

⋯//The PowerX strategy - based on the rules outlined in the book "The PowerX Strategy: How to Trade Stocks and Options in Only 15 Minutes a Day" by Markus Heitkoetter-//@version=5+//@version=6strategy("PowerX", overlay=true, initial_capital=10000)⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 42 msYes 1,000 bars in 67 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/// © jwitt98//The PowerX strategy - based on the rules outlined in the book "The PowerX Strategy: How to Trade Stocks and Options in Only 15 Minutes a Day" by Markus Heitkoetter//@version=5strategy("PowerX", overlay=true, initial_capital=10000)longEntry = "Enter long"shortEntry = "Enter short"longExit = "Exit long"shortExit = "Exit short"//*********************************Begin inputs*********************************//get time range inputs and set time range booltimeRangeGroup = "Select the trading range"startDate = input.time(timestamp("1 Jan 2021 00:00 +0000"), "Start date", "Select the start date for the trading range", "", timeRangeGroup)endDate = input.time(timestamp("1 Jan 2050 00:00 +0000"), "End date", "Select the end date for the trading range", "", timeRangeGroup)isInTimeRange = time >= startDate and time <= endDate//get long/short inputspositionsAllowedGroup = "Select the direction(s) of trades to allow"isLongsAllowed = input.bool(true, "Allow long positions", "Check the box if you want to allow long positions", "", positionsAllowedGroup)isShortsAllowed = input.bool(true, "Allow short positions", "Check the box if you want to allow short positions", "", positionsAllowedGroup)//get the stop loss and profit target multiples.  Per the PowerX rules the ratio shoud be 1:2.  1.5 and 3 are defaultsadrMultuplesGroup="Select the multipliers for the stop loss and profit targets"stopLossMultiple = input.float(1.5, "Stop loss multiple", 0.1, 10, 0.1, "The ADR is multiplied by the stop loss multiple to calculate the stop loss", group=adrMultuplesGroup)profitTargetMultiple=input.float(3.0, "Profit target multiple", 0.1, 10, 0.1, "The ADR is multiplied by the profit target multiple to calculate the profit target", group=adrMultuplesGroup)//get the option to use the money management stategy or not.  This is a fixed ratio type management systemmoneyManagementGroup="Money management"isUsingMoneyManagement=input.bool(false, "Use money management", "Check the box if you want to use a fixed ratio type money management system, such as the type described in PowerX", group=moneyManagementGroup)initial_riskPercent=input.float(2.0, "Percent risk per trade", .1, 100, .1, "The percentage of capital you want to risk when starting out.  This will increase or decrease base on the money management rules.  Only applicable if money managent is used", group=moneyManagementGroup)/100isRiskDowsideLimited=input.bool(false, "Keep risk at or above the set point", "Check the box if you don't want the risk to fall below the set \"risk per trade\" percentage, for example, when your equity is underwater. Only applicable if money management is used", "", moneyManagementGroup)initial_riskPerTrade=initial_riskPercent * strategy.initial_capital riskFactor = 0.0currentProfit = 0.0currentRisk = 0.0//*********************************End inputs*********************************//*********************************Begin money management*********************************if(isUsingMoneyManagement)    currentProfit := strategy.equity - strategy.initial_capital    if(currentProfit < 0)        currentProfit:=math.abs(currentProfit)        riskFactor := 0.5*(math.pow(1+8*currentProfit/(2*initial_riskPerTrade), 0.5)+1)        currentRisk := 1/riskFactor * initial_riskPercent * strategy.initial_capital        if(isRiskDowsideLimited)            currentRisk := initial_riskPerTrade    else        riskFactor := 0.5*(math.pow(1+8*currentProfit/(2*initial_riskPerTrade), 0.5)+1)        currentRisk := riskFactor * initial_riskPercent * strategy.initial_capital        plot(strategy.equity, "Strategy equity", display=display.data_window)plot(currentRisk, "Current risk", display=display.data_window)plot(riskFactor, "Risk Factor", display=display.data_window)//*********************************End money management*********************************//*********************************Begin indicators*********************************//4 indicators are used in this strategy, RSI(7), Stochastics(14, 3, 3), MACD(12, 26, 9), and ADR(7)rsiVal = ta.rsi(close, 7)//this checks outplot(rsiVal, "RSI(7)", color.lime, display=display.data_window)stochKVal = ta.sma(ta.sma(ta.stoch(close, high, low, 14),3),3)//this formula checks outplot(stochKVal, "Stoch %K", color.lime, display=display.data_window)[macdLine, signalLine, histLine] = ta.macd(close, 12, 26, 9)plot(histLine, "MACD Hist", color.lime, display=display.data_window)adr = ta.sma(high, 7) - ta.sma(low, 7)plot(adr, "Average daily range", color.orange, display=display.data_window)//*********************************End indicators*********************************//*********************************Define the bar colors*********************************greenBar = rsiVal > 50 and stochKVal > 50 and histLine > 0redBar = rsiVal < 50 and stochKVal < 50 and histLine < 0blackBar = not greenBar and not redBarcolor currentBarColor = switch    greenBar => color.green    redBar => color.red    blackBar => color.gray //because black is too hard to see in dark mmode    => color.yellow    barcolor(currentBarColor)//*********************************End defining the bar colors*********************************//*********************************Define the entry, stop loss and profit target*********************************longStopLimit = high + .01longProfitTarget = high + (profitTargetMultiple * adr)longStopLoss = high - (stopLossMultiple * adr)shortStopLimit = low - .01shortProfitTarget = low - (profitTargetMultiple * adr)shortStopLoss = low + (stopLossMultiple * adr)qtyToTrade= math.floor(currentRisk / (stopLossMultiple * adr))//only if using money managementif(qtyToTrade * high > strategy.equity)    qtyToTrade := math.floor(strategy.equity / high)//*********************************End defining stop loss and profit targets*********************************//*********************************Execute trades, set rules, stop loss and profit targets*********************************if (greenBar and not greenBar[1] and isInTimeRange and isLongsAllowed)    if(isUsingMoneyManagement)        strategy.order(longEntry, strategy.long, qtyToTrade, limit=longStopLimit, stop=longStopLimit)        //strategy.order(longEntry, strategy.long, qtyToTrade, stop=longStopLimit)    else        strategy.order(longEntry, strategy.long, limit=longStopLimit,stop=longStopLimit)        //strategy.order(longEntry, strategy.long, stop=longStopLimit)    strategy.exit("Long limit/stop", from_entry=longEntry, limit=longProfitTarget, stop=longStopLoss)    if(blackBar or redBar)    strategy.cancel(longEntry)    strategy.close(longEntry, longExit)    if (redBar and not redBar[1] and isInTimeRange and isShortsAllowed)    if(isUsingMoneyManagement)        strategy.order(shortEntry, strategy.short, qtyToTrade, limit=shortStopLimit, stop=shortStopLimit)        //strategy.order(shortEntry, strategy.short, qtyToTrade, stop=shortStopLimit)    else        strategy.order(shortEntry, strategy.short, limit=shortStopLimit, stop=shortStopLimit)        //strategy.order(shortEntry, strategy.short, stop=shortStopLimit)    strategy.exit("Short limit/stop", from_entry=shortEntry, limit=shortProfitTarget, stop=shortStopLoss)if(blackBar or greenBar)    strategy.cancel(shortEntry)    strategy.close(shortEntry, shortExit)    //*********************************End execute trades, set rules, stop loss and profit targets*********************************