Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

Co-relation and St-deviation Strategy - BNB-USDT 15min

A Pine Script v5 strategy built on Linreg or SMA or EMA or HMA or RMA or WMA or ALMA or SWMA or VWMA (volume, 7), Linreg (source_of_price_average, 7) and Rising (price_avg_14, 2). It has 5 order rules, 3 entries among them, and trades long only with the default settings. Exits wait for a signal; there is no stop loss. Each trade commits 33 in cash and pays 0.1% commission. 104 settings; defaults include From (DD/MM/YYYY) - 25, / 02 and / 2022.

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 Co-relation and St-deviation Strategy - BNB-USDT 15min repaint?
No
No repainting patterns were found in the source. The live replay was not measured: it had no trades to compare.
How did Co-relation and St-deviation Strategy - BNB-USDT 15min do on BTCUSDT 1D with default settings?
Not measured
It closed no trades there from 26 Jan 2024 to 21 Oct 2026 with the default settings, so there is no result to report. Its code limits trading to a date window, which can leave this period out. It closed no trades on the other markets either. A backtest, not investment advice.
Does Co-relation and St-deviation Strategy - BNB-USDT 15min run in Pine Script v6?
No
The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L1296:C50: cannot use 'float' as a condition — Pine Script v6 does not cast 'int' or 'float' to 'bool' implicitly. Wrap it in bool(). The v6 version is shown for reference and is not offered as a download.
Does Co-relation and St-deviation Strategy - BNB-USDT 15min use a stop loss?
No
Every exit waits for a signal; nothing limits a losing trade before it fires.
Does Co-relation and St-deviation Strategy - BNB-USDT 15min run in Zeal Terminal?
Yes
It compiles in 651 ms and runs 1,000 bars in 820 ms, in the browser.

BTCUSDT · 1D · default settings

  • Adj.Profit
  • o
  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
0.0050,000100,000AprJulOct2025AprJulOct2026AprJulOct$1,000$2,025Equity from $1,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. The engine's host API cannot yet declare a chart's symbol and timeframe, so this page sets them on the engine directly for each market. The live re-run is not offered here: the script requests USI:ADVN.NY D, USI:DECL.NY D, USI:UNCH.NY D, which this page cannot load in your browser.

Needs USI:ADVN.NY D data, not available: not a Binance spot market Needs USI:DECL.NY D data, not available: not a Binance spot market Needs USI:UNCH.NY D data, not available: not a Binance spot market Values that depend on it are empty on this chart.

Table drawn by the script, as it stood on the last bar
Cumilative profit (USDT)0.00
Current ExpenditureNaN
Cash balance1000.00
Cumilative assert (USDT)1000.00
Count of open trades0.00
Strategy position Size0.00
Net profit
0.00%
$0.00
Buy and hold
+102.5%
same period
Closed trades
0
0 won · 0 lost
Profitable
0.0%
of closed trades
Profit factor
—
gross profit ÷ gross loss
Max drawdown
0.00%
$0.00

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

  • Likely bug

    ta.sma(source_of_sma, 200) ignores the settings line 677

    Line 677 hard-codes 200 where line 154 uses “General look back period for calculations”. Changing those settings moves one band but not this one.

    ta.sma(source_of_sma,200)ta.sma(source_of_sma, look_back_period)
  • Likely bug

    ta.sma(source_of_ema, 200) ignores the settings line 685

    Line 685 hard-codes 200 where line 154 uses “General look back period for calculations”. Changing those settings moves one band but not this one.

    ta.sma(source_of_ema,200)ta.sma(source_of_ema, look_back_period)
  • Likely bug

    ta.sma(close, 9) ignores the settings line 1263

    Line 1263 hard-codes 9 where line 154 uses “General look back period for calculations”. Changing those settings moves one band but not this one.

    ta.sma(close,9)ta.sma(close, look_back_period)
  • Likely bug

    ta.sma(close, 9) ignores the settings line 1299

    Line 1299 hard-codes 9 where line 154 uses “General look back period for calculations”. Changing those settings moves one band but not this one.

    ta.sma(close,9)ta.sma(close, look_back_period)
  • Likely bug

    ta.ema(source, 34) ignores the settings line 704

    Line 704 hard-codes 34 where line 156 uses “General look back period for calculations”. Changing those settings moves one band but not this one.

    ta.ema(source, 34)ta.ema(source, look_back_period)
  • Likely bug

    ta.ema(graph_16, 14) ignores the settings line 1416

    Line 1416 hard-codes 14 where line 156 uses “General look back period for calculations”. Changing those settings moves one band but not this one.

    ta.ema(graph_16,14)ta.ema(graph_16, look_back_period)
  • Likely bug

    ta.swma(volume) ignores the settings line 166

    Line 166 hard-codes volume where line 184 uses “Source of average price to determine selling and buying”. Changing those settings moves one band but not this one.

    ta.swma(volume)ta.swma(source_of_ma9)
  • Likely bug

    ta.swma(high) ignores the settings line 886

    Line 886 hard-codes high where line 184 uses “Source of average price to determine selling and buying”. Changing those settings moves one band but not this one.

    ta.swma(high)ta.swma(source_of_ma9)
  • Likely bug

    ta.swma(low) ignores the settings line 913

    Line 913 hard-codes low where line 184 uses “Source of average price to determine selling and buying”. Changing those settings moves one band but not this one.

    ta.swma(low)ta.swma(source_of_ma9)
  • Likely bug

    ta.swma(open) ignores the settings line 940

    Line 940 hard-codes open where line 184 uses “Source of average price to determine selling and buying”. Changing those settings moves one band but not this one.

    ta.swma(open)ta.swma(source_of_ma9)
  • Likely bug

    ta.swma(close) ignores the settings line 967

    Line 967 hard-codes close where line 184 uses “Source of average price to determine selling and buying”. Changing those settings moves one band but not this one.

    ta.swma(close)ta.swma(source_of_ma9)
  • Check

    2 settings do nothing

    “Look back period of average price to determine buy and sell”, “Source of Baseline of Bear Power” 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.

  • Note

    1 setting has no label

    In the settings dialog int_val_allocation (line 39) shows 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
Time Period Values
From (DD/MM/YYYY) - 25int · min 1 · max 31start
/02int · min 1 · max 12start
/2022int · min 1970start
Thru (DD/MM/YYYY) - 1int · min 1 · max 31finish
/1int · min 1 · max 12finish
/2112int · min 1970finish
Use data window to limit tradetrueboolline 19
Determination of buy or sell command
Factor of supertrend to determine buy command1intpinesupertrend pinedirection
ArtPeriod of supertrend to determine buy command24intpinesupertrend pinedirection
Source of Higher value of Look back periodhighsourcehi_high
Source of Lower value of Look back periodlowsourcelowerlowest
Look back period to determine lower low points280inthi_high lowerlowest
Source of Lower point to initiate purchaseopensourceentry long line 1290
Profit Calculations
Profit precentage will be7float · step 0.01cal_profit_precentage
Enable Swing Tradingfalseboolline 1107 line 1109
Swing Trading profit precentage will be2float · step 0.01close long line 1263 line 1299
Fund Management
Cumilative Investment1000floatint_val total_investment line 1146 line 1150 line 1170 line 1172
Value of Purchas will beEqual amountsstring · options ['Equal amounts','Incremental amounts']line 1199 line 1201 line 1203 line 1205 line 1216 line 1280 line 1282 line 1284
Value of Purchas will beEqual amounts with fixed USDTstring · options ['Equal amounts with fixed USDT','Equal amounts with fixed entries']line 1199 line 1201 line 1282 line 1284
Value of first purchase will beMinimum value of initial purchase will be 15USDT44floatint_val value_of_purchase max_trade_count line 1146 line 1148 line 1150 line 1152
Int val allocation (no label in the script)USDTstring · options ['% of cumilative investment', 'USDT']line 1146 line 1148 line 1150 line 1152 line 1203 line 1205
Numbers of pararal entries35intvalue_of_purchase max_trade_count line 1161 line 1164 line 1166 line 1168
Input parameters for fund management
r starting value5floatinstallment_2 r_f line 1177
Initiative value for r change1intr_change
Use r = 0.001 to finetune r valuefalseboolline 1156 line 1158
Calculated r value3.259floatvalue_of_purchase
Principle inputs
General look back period for calculations7intvolume_avg_14 ma_9 price_avg_14 st_dev_of_price_avg_14 st_dev_of_volume_avg_14 corelation_btw_price_avg_14_and_volume_avg_14 st_dev_of_bb_gap_of_sar_14 st_dev_of_indicator_sar_14 corelation_btw_price_avg_14_and_indicator_sar_14 st_dev_of_bb_gap_of_st_14 st_dev_of_indicator_st_14 corelation_btw_price_avg_14_and_indicator_st_14 indicator_rsi_14 st_dev_of_bb_gap_of_rsi_14 st_dev_of_indicator_rsi_14 corelation_btw_price_avg_14_and_indicator_rsi_14 indicator_mfi_14 st_dev_of_bb_gap_of_mfi_14 st_dev_of_indicator_mfi_14 corelation_btw_price_avg_14_and_indicator_mfi_14 bop_f bop_nf st_dev_of_bb_gap_of_bop_14 st_dev_of_indicator_bop_14 corelation_btw_price_avg_14_and_indicator_bop_14 indicator_mom_14 st_dev_of_bb_gap_of_mom_14 st_dev_of_indicator_mom_14 corelation_btw_price_avg_14_and_indicator_mom_14 indicator_cog_14 st_dev_of_bb_gap_of_cog_14 st_dev_of_indicator_cog_14 corelation_btw_price_avg_14_and_indicator_cog_14 st_dev_of_bb_gap_of_dmi_14 st_dev_of_indicator_dmi_14 corelation_btw_price_avg_14_and_indicator_dmi_14 stoch_nf stoch_f st_dev_of_bb_gap_of_stoch_14 st_dev_of_indicator_stoch_14 corelation_btw_price_avg_14_and_indicator_stoch_14 swma_f st_dev_of_bb_gap_of_swma_14 st_dev_of_indicator_swma_14 corelation_btw_price_avg_14_and_indicator_swma_14 st_dev_of_bb_gap_of_tsi_14 st_dev_of_indicator_tsi_14 corelation_btw_price_avg_14_and_indicator_tsi_14 wpr_f wpr_nf st_dev_of_bb_gap_of_wpr_14 st_dev_of_indicator_wpr_14 corelation_btw_price_avg_14_and_indicator_wpr_14 accdist_f st_dev_of_bb_gap_of_accdist_14 st_dev_of_indicator_accdist_14 corelation_btw_price_avg_14_and_indicator_accdist_14 iii_f st_dev_of_bb_gap_of_iii_14 st_dev_of_indicator_iii_14 corelation_btw_price_avg_14_and_indicator_iii_14 nvi_f st_dev_of_bb_gap_of_nvi_14 st_dev_of_indicator_nvi_14 corelation_btw_price_avg_14_and_indicator_nvi_14 pvi_f st_dev_of_bb_gap_of_pvi_14 st_dev_of_indicator_pvi_14 corelation_btw_price_avg_14_and_indicator_pvi_14 obv_f st_dev_of_bb_gap_of_obv_14 st_dev_of_indicator_obv_14 corelation_btw_price_avg_14_and_indicator_obv_14 pvt_f st_dev_of_bb_gap_of_pvt_14 st_dev_of_indicator_pvt_14 corelation_btw_price_avg_14_and_indicator_pvt_14 tr_f st_dev_of_bb_gap_of_tr_14 st_dev_of_indicator_tr_14 corelation_btw_price_avg_14_and_indicator_tr_14 vwap_f st_dev_of_bb_gap_of_vwap_14 st_dev_of_indicator_vwap_14 corelation_btw_price_avg_14_and_indicator_vwap_14 wad_f st_dev_of_bb_gap_of_wad_14 st_dev_of_indicator_wad_14 corelation_btw_price_avg_14_and_indicator_wad_14 wvad_f st_dev_of_bb_gap_of_wvad_14 st_dev_of_indicator_wvad_14 corelation_btw_price_avg_14_and_indicator_wvad_14 indicator_sma_14 st_dev_of_bb_gap_of_sma_14 st_dev_of_indicator_sma_14 corelation_btw_price_avg_14_and_indicator_sma_14 indicator_ema_14 st_dev_of_bb_gap_of_ema_14 st_dev_of_indicator_ema_14 corelation_btw_price_avg_14_and_indicator_ema_14 indicator_cci_14 st_dev_of_bb_gap_of_cci_14 st_dev_of_indicator_cci_14 corelation_btw_price_avg_14_and_indicator_cci_14 ema34_f st_dev_of_bb_gap_of_chop_zone_14 st_dev_of_indicator_chop_zone_14 corelation_btw_price_avg_14_and_indicator_chop_zone_14 eom_f st_dev_of_bb_gap_of_eom_14 st_dev_of_indicator_eom_14 corelation_btw_price_avg_14_and_indicator_eom_14 ma_f ma_nf barsback st_dev_of_bb_gap_of_dpo_14 st_dev_of_indicator_dpo_14 corelation_btw_price_avg_14_and_indicator_dpo_14 st_dev_of_bb_gap_of_adl_14 st_dev_of_indicator_adl_14 corelation_btw_price_avg_14_and_indicator_adl_14 bullp_f bearp_f bullp_nf bearp_nf st_dev_of_bb_gap_of_bbp_14 st_dev_of_indicator_bbp_14 corelation_btw_price_avg_14_and_indicator_bbp_14 high_f st_dev_of_bb_gap_of_high_14 st_dev_of_indicator_high_14 corelation_btw_price_avg_14_and_indicator_high_14 low_f st_dev_of_bb_gap_of_low_14 st_dev_of_indicator_low_14 corelation_btw_price_avg_14_and_indicator_low_14 open_f st_dev_of_bb_gap_of_open_14 st_dev_of_indicator_open_14 corelation_btw_price_avg_14_and_indicator_open_14 close_f st_dev_of_bb_gap_of_close_14 st_dev_of_indicator_close_14 corelation_btw_price_avg_14_and_indicator_close_14 st_dev_of_all_indicators_final_graph corelation_btw_price_avg_14_and_all_indicators_final_graph st_dev_of_final_graph_of_corelation corelation_btw_price_avg_14_and_final_graph_of_corelation st_dev_of_final_graph_of_st_dev corelation_btw_price_avg_14_and_final_graph_of_st_dev st_dev_of_second_degree_final_graph_of_corelation_one corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_one st_dev_of_second_degree_final_graph_of_corelation_two corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_two second_level_change_of_change_of_final_graph_of_corelation
Source of Average Priceclosesourceprice_avg_14
Look back period for price falling3intprice_falling
Source of average price to determine selling and buyinghl2sourcema_9
Look back period of average price to determine buy and sell3intunused
Calculation method of average priceExponentially Weighted Moving Average (EMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 169 line 171 line 173 line 175 line 177 line 179 line 181 line 183 line 185
Calculation method of volume profileLenior regressionstring · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 151 line 153 line 155 line 157 line 159 line 161 line 163 line 165 line 167
Parabolic Stop and Reverse (SAR)
Start value of SAR0.2float · min 0 · step 0.01indicator_sar_14
Increment value of SAR0.2float · min 0 · step 0.01indicator_sar_14
Max value of SAR0.2float · min 0 · step 0.01indicator_sar_14
Supertrend
Factor of Supertrend1int · min 0 · step 1supertrend direction
ArtPeriod of Supertrend10int · min 0 · step 1supertrend direction
Relative strength index (RSI)
Source of RSIclosesourceindicator_rsi_14
Money flow index (MFI)
Source of MFIclosesourceindicator_mfi_14
Balance of Power(BOP)
Calculation method of Balance of PowerLenior regressionstring · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 233 line 235 line 237 line 239 line 241 line 243 line 245 line 247 line 249
Chande Momentum Oscillator (MOM)
Source of MOMclosesourceindicator_mom_14
The Center of Gravity (COG)
Source of COGclosesourceindicator_cog_14
Directional movement index (DMI)
DI Length3int · min 0 · step 1diplus diminus indicator_dmi_14
ADX Smoothing length10int · min 0 · step 1diplus diminus indicator_dmi_14
Stochastic
Source of Stochasticclosesourcestoch_nf
Calculation method of StochasticLenior regressionstring · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 285 line 287 line 289 line 291 line 293 line 295 line 297 line 299 line 301
Symmetrically weighted moving average with fixed length
Source of SWMAclosesourceswma_nf
Calculation method of SWMALenior regressionstring · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 313 line 315 line 317 line 319 line 321 line 323 line 325 line 327 line 329
True strength index (TSI)
Source of TSIclosesourceindicator_tsi_14
Short Length of TSI14int · min 0 · step 1indicator_tsi_14
Long length of TSI28int · min 0 · step 1indicator_tsi_14
Williams %R
Calculation method of Williams %RExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 349 line 351 line 353 line 355 line 357 line 359 line 361 line 363 line 365 line 367
Accumulation/distribution Index
Calculation method of Accumulation/distribution IndexExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 379 line 381 line 383 line 385 line 387 line 389 line 391 line 393 line 395 line 397
Intraday Intensity Index
Calculation method of Intraday Intensity IndexExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 409 line 411 line 413 line 415 line 417 line 419 line 421 line 423 line 425 line 427
Negative Volume Index
Calculation method of Negative Volume IndexExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 439 line 441 line 443 line 445 line 447 line 449 line 451 line 453 line 455 line 457
Positive Volume Index
Calculation method of Positive Volume IndexExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 469 line 471 line 473 line 475 line 477 line 479 line 481 line 483 line 485 line 487
On Balance Volume
Calculation method of On Balance VolumeWeighted Moving Average (WMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 499 line 501 line 503 line 505 line 507 line 509 line 511 line 513 line 515 line 517
Price-Volume Trend
Calculation method of Price-Volume TrendExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 529 line 531 line 533 line 535 line 537 line 539 line 541 line 543 line 545 line 547
True range
Calculation method of True rangeExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 559 line 561 line 563 line 565 line 567 line 569 line 571 line 573 line 575 line 577
Volume-weighted average price
Calculation method of Volume-weighted average priceHull Moving Average (HMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 589 line 591 line 593 line 595 line 597 line 599 line 601 line 603 line 605 line 607
Williams Accumulation/Distribution
Calculation method of Williams Accumulation/DistributionExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 619 line 621 line 623 line 625 line 627 line 629 line 631 line 633 line 635 line 637
Williams Variable Accumulation/Distribution
Calculation method of Williams Variable Accumulation/DistributionExponentially Weighted Moving Average (EMA)string · options ['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 649 line 651 line 653 line 655 line 657 line 659 line 661 line 663 line 665 line 667
Simple Moving Average (SMA)
Source of Simple Moving Average (SMA)closesourceindicator_sma_14
Exponential Moving Average (EMA)
Source of Exponential Moving Average (EMA)closesourceindicator_ema_14
Commodity Channel Index (CCI)
Source of Commodity Channel Index (CCI)closesourceindicator_cci_14
Chop Zone (CZ)
Source of Chop Zone (CZ)closesourcesource
Source of Average of Chop Zone (CZ)hlc3sourceavg
Calculation method of Chop ZoneExponentially Weighted Moving Average (EMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 705 line 707 line 709 line 711 line 713 line 715 line 717 line 719 line 721
Ease of Movement
Source of Ease of Movement (EOM)hl2sourceeom_nf
Calculation method of Ease of MovementSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 751 line 753 line 755 line 757 line 759 line 761 line 763 line 765 line 767
Detrended Price Oscillator (DPO)
Source of Detrended Price Oscillator (DPO)closesourcema_f ma_nf
Alignment to center - Detrended Price Oscillator (DPO)falsebooldpo
Calculation method of Ease of MovementSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 780 line 782 line 784 line 786 line 788 line 790 line 792 line 794 line 796
Advance Decline Line (ADL)
Source of Advance Decline Line (ADL)closesourceline 809
Bull Bear Power (BBP)
Source of Bull Powerhighsourcebullp_f bullPower
Source of Bear Powerlowsourcebearp_f bearPower
Source of Baseline of Bull Powerclosesourcebullp_nf bearp_nf
Source of Baseline of Bear Powerclosesourceunused
Calculation method of Bull PowerSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 824 line 826 line 828 line 830 line 832 line 834 line 836 line 838 line 840
Calculation method of Bull PowerSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 842 line 844 line 846 line 848 line 850 line 852 line 854 line 856 line 858
Impact Calculation
Impact calculation method of highSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 871 line 873 line 875 line 877 line 879 line 881 line 883 line 885 line 887
Impact calculation method of lowSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 898 line 900 line 902 line 904 line 906 line 908 line 910 line 912 line 914
Impact calculation method of openSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 925 line 927 line 929 line 931 line 933 line 935 line 937 line 939 line 941
Impact calculation method of closeSimple Moving Average (SMA)string · options ['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)']line 952 line 954 line 956 line 958 line 960 line 962 line 964 line 966 line 968
Graphs
(1) Show Cumilative graph(CG)falseboolline 1335 (1) Cumilative graph(CG)
(2) CG corelation to pricefalseboolline 1339 (2) CG corelation to price
(3) St dev of CGfalseboolline 1343 (3) St dev of CG
(4) Degree of change - CGfalseboolline 1347 (4) Degree of change - CG
(5) Rate of change - CGfalseboolline 1351 (5) Rate of change - CG
& scale (n) will be 10 to the power n1int(5) Rate of change - CG
(6) Co-relation of CG (CCG), corelation to pricefalseboolline 1355 (6) corelation of CG (CCG), corelation to price
(7) St dev of corelation of CCGfalseboolline 1359 (7) St dev of corelation of CCG
(8) Degree of change - CCGfalseboolline 1363 (8) Degree of change - CCG
(9) Rate of change - CCGfalseboolline 1367 (9) Rate of change - CCG
& scale (n) will be 10 to the power n1int(9) Rate of change - CCG
(10) STDV of CG (SCG), corelation to pricefalseboolline 1371 (10) STDV of CG (SCG), corelation to price
(11) St dev of corelation of SCGfalseboolline 1375 (11) St dev of corelation of SCG
(12) Degree of change - SCGfalseboolline 1379 (12) Degree of change - SCG
(13) Rate of change - SCGfalseboolline 1383 (13) Rate of change - SCG
& scale (n) will be 10 to the power n1int(13) Rate of change - SCG
(14) Third degree cor to pricefalseboolline 1387 (14) Third degree cor to price
(15) Third degree cor to pricefalseboolline 1392 (15) Third degree cor to price
(16) Change of graph no 2falseboolline 1396 (16) Degree of change - SCG

What it calculates

  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAvolume, General look back period for calculations (7), 0volume_avg_14 · line 152
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMASource of average price to determine selling and buying (hl2), General look back period for calculations (7), 0ma_9 · line 170
  • Linreg(source_of_price_average), General look back period for calculations (7), 0price_avg_14 · line 147
  • Risingprice_avg_14, 2price_rising · line 148
  • Fallingprice_avg_14, Look back period for price falling (3)price_falling · line 149
  • Stdevprice_avg_14, General look back period for calculations (7)st_dev_of_price_avg_14 · line 187
  • Stdevvolume_avg_14, General look back period for calculations (7)st_dev_of_volume_avg_14 · line 188
  • Correlationvolume_avg_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_volume_avg_14 · line 189
  • SARStart value of SAR (0.2), Increment value of SAR (0.2), Max value of SAR (0.2)indicator_sar_14 · line 191
  • BBindicator_sar_14, 5, 4middle_sar_14 · line 192
  • BBindicator_sar_14, 5, 4upper_sar_14 · line 192
  • BBindicator_sar_14, 5, 4lower_sar_14 · line 192
  • Stdevbb_gap_of_sar_14, General look back period for calculations (7)st_dev_of_bb_gap_of_sar_14 · line 194
  • Stdevindicator_sar_14, General look back period for calculations (7)st_dev_of_indicator_sar_14 · line 195
  • Correlationindicator_sar_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_sar_14 · line 196
  • SupertrendFactor of Supertrend (1), ArtPeriod of Supertrend (10)supertrend · line 200
  • SupertrendFactor of Supertrend (1), ArtPeriod of Supertrend (10)direction · line 200
  • BBindicator_st_14, 5, 4middle_st_14 · line 208
  • BBindicator_st_14, 5, 4upper_st_14 · line 208
  • BBindicator_st_14, 5, 4lower_st_14 · line 208
  • Stdevbb_gap_of_st_14, General look back period for calculations (7)st_dev_of_bb_gap_of_st_14 · line 210
  • Stdevindicator_st_14, General look back period for calculations (7)st_dev_of_indicator_st_14 · line 211
  • Correlationindicator_st_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_st_14 · line 212
  • RSISource of RSI (close), General look back period for calculations (7)indicator_rsi_14 · line 215
  • BBindicator_rsi_14, 5, 4middle_rsi_14 · line 216
  • BBindicator_rsi_14, 5, 4upper_rsi_14 · line 216
  • BBindicator_rsi_14, 5, 4lower_rsi_14 · line 216
  • Stdevbb_gap_of_rsi_14, General look back period for calculations (7)st_dev_of_bb_gap_of_rsi_14 · line 218
  • Stdevindicator_rsi_14, General look back period for calculations (7)st_dev_of_indicator_rsi_14 · line 219
  • Correlationindicator_rsi_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_rsi_14 · line 220
  • MFISource of MFI (close), General look back period for calculations (7)indicator_mfi_14 · line 223
  • BBindicator_mfi_14, 5, 4middle_mfi_14 · line 224
  • BBindicator_mfi_14, 5, 4upper_mfi_14 · line 224
  • BBindicator_mfi_14, 5, 4lower_mfi_14 · line 224
  • Stdevbb_gap_of_mfi_14, General look back period for calculations (7)st_dev_of_bb_gap_of_mfi_14 · line 226
  • Stdevindicator_mfi_14, General look back period for calculations (7)st_dev_of_indicator_mfi_14 · line 227
  • Correlationindicator_mfi_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_mfi_14 · line 228
  • SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAbop_nf, General look back period for calculations (7)bop_f · line 234
  • Linreg(((close - open) / (high - low) * 100)+100)/2, General look back period for calculations (7), 0bop_nf · line 232
  • BBindicator_bop_14, 5, 4middle_bop_14 · line 252
  • BBindicator_bop_14, 5, 4upper_bop_14 · line 252
  • BBindicator_bop_14, 5, 4lower_bop_14 · line 252
  • Stdevbb_gap_of_bop_14, General look back period for calculations (7)st_dev_of_bb_gap_of_bop_14 · line 254
  • Stdevindicator_bop_14, General look back period for calculations (7)st_dev_of_indicator_bop_14 · line 255
  • Correlationindicator_bop_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_bop_14 · line 256
  • CMOSource of MOM (close), General look back period for calculations (7)indicator_mom_14 · line 259
  • BBindicator_mom_14, 5, 4middle_mom_14 · line 260
  • BBindicator_mom_14, 5, 4upper_mom_14 · line 260
  • BBindicator_mom_14, 5, 4lower_mom_14 · line 260
  • Stdevbb_gap_of_mom_14, General look back period for calculations (7)st_dev_of_bb_gap_of_mom_14 · line 262
  • Stdevindicator_mom_14, General look back period for calculations (7)st_dev_of_indicator_mom_14 · line 263
  • Correlationindicator_mom_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_mom_14 · line 264
  • COGSource of COG (close), General look back period for calculations (7)indicator_cog_14 · line 267
  • BBindicator_cog_14, 5, 4middle_cog_14 · line 268
  • BBindicator_cog_14, 5, 4upper_cog_14 · line 268
  • BBindicator_cog_14, 5, 4lower_cog_14 · line 268
  • Stdevbb_gap_of_cog_14, General look back period for calculations (7)st_dev_of_bb_gap_of_cog_14 · line 270
  • Stdevindicator_cog_14, General look back period for calculations (7)st_dev_of_indicator_cog_14 · line 271
  • Correlationindicator_cog_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_cog_14 · line 272
  • DMIDI Length (3), ADX Smoothing length (10)diplus · line 275
  • DMIDI Length (3), ADX Smoothing length (10)diminus · line 275
  • DMIDI Length (3), ADX Smoothing length (10)indicator_dmi_14 · line 275
  • BBindicator_dmi_14, 5, 4middle_dmi_14 · line 276
  • BBindicator_dmi_14, 5, 4upper_dmi_14 · line 276
  • BBindicator_dmi_14, 5, 4lower_dmi_14 · line 276
  • Stdevbb_gap_of_dmi_14, General look back period for calculations (7)st_dev_of_bb_gap_of_dmi_14 · line 278
  • Stdevindicator_dmi_14, General look back period for calculations (7)st_dev_of_indicator_dmi_14 · line 279
  • Correlationindicator_dmi_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_dmi_14 · line 280
  • StochSource of Stochastic (close), high, low, General look back period for calculations (7)stoch_nf · line 283
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAstoch_nf, General look back period for calculations (7), 0stoch_f · line 286
  • BBindicator_stoch_14, 5, 4middle_stoch_14 · line 304
  • BBindicator_stoch_14, 5, 4upper_stoch_14 · line 304
  • BBindicator_stoch_14, 5, 4lower_stoch_14 · line 304
  • Stdevbb_gap_of_stoch_14, General look back period for calculations (7)st_dev_of_bb_gap_of_stoch_14 · line 306
  • Stdevindicator_stoch_14, General look back period for calculations (7)st_dev_of_indicator_stoch_14 · line 307
  • Correlationindicator_stoch_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_stoch_14 · line 308
  • SWMASource of SWMA (close)swma_nf · line 311
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAswma_nf, General look back period for calculations (7), 0swma_f · line 314
  • BBindicator_swma_14, 5, 4middle_swma_14 · line 332
  • BBindicator_swma_14, 5, 4upper_swma_14 · line 332
  • BBindicator_swma_14, 5, 4lower_swma_14 · line 332
  • Stdevbb_gap_of_swma_14, General look back period for calculations (7)st_dev_of_bb_gap_of_swma_14 · line 334
  • Stdevindicator_swma_14, General look back period for calculations (7)st_dev_of_indicator_swma_14 · line 335
  • Correlationindicator_swma_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_swma_14 · line 336
  • TSISource of TSI (close), Short Length of TSI (14), Long length of TSI (28)indicator_tsi_14 · line 339
  • BBindicator_tsi_14, 5, 4middle_tsi_14 · line 340
  • BBindicator_tsi_14, 5, 4upper_tsi_14 · line 340
  • BBindicator_tsi_14, 5, 4lower_tsi_14 · line 340
  • Stdevbb_gap_of_tsi_14, General look back period for calculations (7)st_dev_of_bb_gap_of_tsi_14 · line 342
  • Stdevindicator_tsi_14, General look back period for calculations (7)st_dev_of_indicator_tsi_14 · line 343
  • Correlationindicator_tsi_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_tsi_14 · line 344
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAwpr_nf, General look back period for calculations (7), 0wpr_f · line 350
  • WPRGeneral look back period for calculations (7)wpr_nf · line 348
  • BBindicator_wpr_14, 5, 4middle_wpr_14 · line 370
  • BBindicator_wpr_14, 5, 4upper_wpr_14 · line 370
  • BBindicator_wpr_14, 5, 4lower_wpr_14 · line 370
  • Stdevbb_gap_of_wpr_14, General look back period for calculations (7)st_dev_of_bb_gap_of_wpr_14 · line 372
  • Stdevindicator_wpr_14, General look back period for calculations (7)st_dev_of_indicator_wpr_14 · line 373
  • Correlationindicator_wpr_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_wpr_14 · line 374
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAaccdist_nf, General look back period for calculations (7), 0accdist_f · line 380
  • Accdistaccdist_nf · line 378
  • BBindicator_accdist_14, 5, 4middle_accdist_14 · line 400
  • BBindicator_accdist_14, 5, 4upper_accdist_14 · line 400
  • BBindicator_accdist_14, 5, 4lower_accdist_14 · line 400
  • Stdevbb_gap_of_accdist_14, General look back period for calculations (7)st_dev_of_bb_gap_of_accdist_14 · line 402
  • Stdevindicator_accdist_14, General look back period for calculations (7)st_dev_of_indicator_accdist_14 · line 403
  • Correlationindicator_accdist_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_accdist_14 · line 404
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAiii_nf, General look back period for calculations (7), 0iii_f · line 410
  • IIIiii_nf · line 408
  • BBindicator_iii_14, 5, 4middle_iii_14 · line 430
  • BBindicator_iii_14, 5, 4upper_iii_14 · line 430
  • BBindicator_iii_14, 5, 4lower_iii_14 · line 430
  • Stdevbb_gap_of_iii_14, General look back period for calculations (7)st_dev_of_bb_gap_of_iii_14 · line 432
  • Stdevindicator_iii_14, General look back period for calculations (7)st_dev_of_indicator_iii_14 · line 433
  • Correlationindicator_iii_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_iii_14 · line 434
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAnvi_nf, General look back period for calculations (7), 0nvi_f · line 440
  • NVInvi_nf · line 438
  • BBindicator_nvi_14, 5, 4middle_nvi_14 · line 460
  • BBindicator_nvi_14, 5, 4upper_nvi_14 · line 460
  • BBindicator_nvi_14, 5, 4lower_nvi_14 · line 460
  • Stdevbb_gap_of_nvi_14, General look back period for calculations (7)st_dev_of_bb_gap_of_nvi_14 · line 462
  • Stdevindicator_nvi_14, General look back period for calculations (7)st_dev_of_indicator_nvi_14 · line 463
  • Correlationindicator_nvi_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_nvi_14 · line 464
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMApvi_nf, General look back period for calculations (7), 0pvi_f · line 470
  • PVIpvi_nf · line 468
  • BBindicator_pvi_14, 5, 4middle_pvi_14 · line 490
  • BBindicator_pvi_14, 5, 4upper_pvi_14 · line 490
  • BBindicator_pvi_14, 5, 4lower_pvi_14 · line 490
  • Stdevbb_gap_of_pvi_14, General look back period for calculations (7)st_dev_of_bb_gap_of_pvi_14 · line 492
  • Stdevindicator_pvi_14, General look back period for calculations (7)st_dev_of_indicator_pvi_14 · line 493
  • Correlationindicator_pvi_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_pvi_14 · line 494
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAobv_nf, General look back period for calculations (7), 0obv_f · line 500
  • OBVobv_nf · line 498
  • BBindicator_obv_14, 5, 4middle_obv_14 · line 520
  • BBindicator_obv_14, 5, 4upper_obv_14 · line 520
  • BBindicator_obv_14, 5, 4lower_obv_14 · line 520
  • Stdevbb_gap_of_obv_14, General look back period for calculations (7)st_dev_of_bb_gap_of_obv_14 · line 522
  • Stdevindicator_obv_14, General look back period for calculations (7)st_dev_of_indicator_obv_14 · line 523
  • Correlationindicator_obv_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_obv_14 · line 524
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMApvt_nf, General look back period for calculations (7), 0pvt_f · line 530
  • PVTpvt_nf · line 528
  • BBindicator_pvt_14, 5, 4middle_pvt_14 · line 550
  • BBindicator_pvt_14, 5, 4upper_pvt_14 · line 550
  • BBindicator_pvt_14, 5, 4lower_pvt_14 · line 550
  • Stdevbb_gap_of_pvt_14, General look back period for calculations (7)st_dev_of_bb_gap_of_pvt_14 · line 552
  • Stdevindicator_pvt_14, General look back period for calculations (7)st_dev_of_indicator_pvt_14 · line 553
  • Correlationindicator_pvt_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_pvt_14 · line 554
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAtr_nf, General look back period for calculations (7), 0tr_f · line 560
  • TRtr_nf · line 558
  • BBindicator_tr_14, 5, 4middle_tr_14 · line 580
  • BBindicator_tr_14, 5, 4upper_tr_14 · line 580
  • BBindicator_tr_14, 5, 4lower_tr_14 · line 580
  • Stdevbb_gap_of_tr_14, General look back period for calculations (7)st_dev_of_bb_gap_of_tr_14 · line 582
  • Stdevindicator_tr_14, General look back period for calculations (7)st_dev_of_indicator_tr_14 · line 583
  • Correlationindicator_tr_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_tr_14 · line 584
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAvwap_nf, General look back period for calculations (7), 0vwap_f · line 590
  • VWAPvwap_nf · line 588
  • BBindicator_vwap_14, 5, 4middle_vwap_14 · line 610
  • BBindicator_vwap_14, 5, 4upper_vwap_14 · line 610
  • BBindicator_vwap_14, 5, 4lower_vwap_14 · line 610
  • Stdevbb_gap_of_vwap_14, General look back period for calculations (7)st_dev_of_bb_gap_of_vwap_14 · line 612
  • Stdevindicator_vwap_14, General look back period for calculations (7)st_dev_of_indicator_vwap_14 · line 613
  • Correlationindicator_vwap_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_vwap_14 · line 614
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAwad_nf, General look back period for calculations (7), 0wad_f · line 620
  • WADwad_nf · line 618
  • BBindicator_wad_14, 5, 4middle_wad_14 · line 640
  • BBindicator_wad_14, 5, 4upper_wad_14 · line 640
  • BBindicator_wad_14, 5, 4lower_wad_14 · line 640
  • Stdevbb_gap_of_wad_14, General look back period for calculations (7)st_dev_of_bb_gap_of_wad_14 · line 642
  • Stdevindicator_wad_14, General look back period for calculations (7)st_dev_of_indicator_wad_14 · line 643
  • Correlationindicator_wad_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_wad_14 · line 644
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAwvad_nf, General look back period for calculations (7), 0wvad_f · line 650
  • WVADwvad_nf · line 648
  • BBindicator_wvad_14, 5, 4middle_wvad_14 · line 670
  • BBindicator_wvad_14, 5, 4upper_wvad_14 · line 670
  • BBindicator_wvad_14, 5, 4lower_wvad_14 · line 670
  • Stdevbb_gap_of_wvad_14, General look back period for calculations (7)st_dev_of_bb_gap_of_wvad_14 · line 672
  • Stdevindicator_wvad_14, General look back period for calculations (7)st_dev_of_indicator_wvad_14 · line 673
  • Correlationindicator_wvad_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_wvad_14 · line 674
  • SMASource of Simple Moving Average (SMA) (close), General look back period for calculations (7)indicator_sma_14 · line 677
  • BBindicator_sma_14, 5, 4middle_sma_14 · line 678
  • BBindicator_sma_14, 5, 4upper_sma_14 · line 678
  • BBindicator_sma_14, 5, 4lower_sma_14 · line 678
  • Stdevbb_gap_of_sma_14, General look back period for calculations (7)st_dev_of_bb_gap_of_sma_14 · line 680
  • Stdevindicator_sma_14, General look back period for calculations (7)st_dev_of_indicator_sma_14 · line 681
  • Correlationindicator_sma_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_sma_14 · line 682
  • EMA / SMASource of Exponential Moving Average (EMA) (close), General look back period for calculations (7)indicator_ema_14 · line 685
  • BBindicator_ema_14, 5, 4middle_ema_14 · line 686
  • BBindicator_ema_14, 5, 4upper_ema_14 · line 686
  • BBindicator_ema_14, 5, 4lower_ema_14 · line 686
  • Stdevbb_gap_of_ema_14, General look back period for calculations (7)st_dev_of_bb_gap_of_ema_14 · line 688
  • Stdevindicator_ema_14, General look back period for calculations (7)st_dev_of_indicator_ema_14 · line 689
  • Correlationindicator_ema_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_ema_14 · line 690
  • CCISource of Commodity Channel Index (CCI) (close), General look back period for calculations (7)indicator_cci_14 · line 693
  • BBindicator_cci_14, 5, 4middle_cci_14 · line 694
  • BBindicator_cci_14, 5, 4upper_cci_14 · line 694
  • BBindicator_cci_14, 5, 4lower_cci_14 · line 694
  • Stdevbb_gap_of_cci_14, General look back period for calculations (7)st_dev_of_bb_gap_of_cci_14 · line 696
  • Stdevindicator_cci_14, General look back period for calculations (7)st_dev_of_indicator_cci_14 · line 697
  • Correlationindicator_cci_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_cci_14 · line 698
  • Linreg / SMA / HMA / RMA / WMA / ALMA / SWMA / VWMAcz_nf, General look back period for calculations (7), 0ema34_f · line 706
  • EMAsource, 34cz_nf · line 704
  • HighestperiodshighestHigh · line 725
  • LowestperiodslowestLow · line 726
  • BBindicator_chop_zone_14, 5, 4middle_chop_zone_14 · line 737
  • BBindicator_chop_zone_14, 5, 4upper_chop_zone_14 · line 737
  • BBindicator_chop_zone_14, 5, 4lower_chop_zone_14 · line 737
  • Stdevbb_gap_of_chop_zone_14, General look back period for calculations (7)st_dev_of_bb_gap_of_chop_zone_14 · line 739
  • Stdevindicator_chop_zone_14, General look back period for calculations (7)st_dev_of_indicator_chop_zone_14 · line 740
  • Correlationindicator_chop_zone_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_chop_zone_14 · line 741
  • ChangeSource of Ease of Movement (EOM) (hl2)eom_nf · line 749
  • Linreg / SMA / HMA / RMA / WMA / ALMA / SWMA / VWMAeom_nf, General look back period for calculations (7), 0eom_f · line 752
  • BBindicator_eom_14, 5, 4middle_eom_14 · line 771
  • BBindicator_eom_14, 5, 4upper_eom_14 · line 771
  • BBindicator_eom_14, 5, 4lower_eom_14 · line 771
  • Stdevbb_gap_of_eom_14, General look back period for calculations (7)st_dev_of_bb_gap_of_eom_14 · line 773
  • Stdevindicator_eom_14, General look back period for calculations (7)st_dev_of_indicator_eom_14 · line 774
  • Correlationindicator_eom_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_eom_14 · line 775
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAma_nf, General look back period for calculations (7), 0ma_f · line 781
  • SMASource of Detrended Price Oscillator (DPO) (close), General look back period for calculations (7)ma_nf · line 779
  • BBindicator_dpo_14, 5, 4middle_dpo_14 · line 802
  • BBindicator_dpo_14, 5, 4upper_dpo_14 · line 802
  • BBindicator_dpo_14, 5, 4lower_dpo_14 · line 802
  • Stdevbb_gap_of_dpo_14, General look back period for calculations (7)st_dev_of_bb_gap_of_dpo_14 · line 804
  • Stdevindicator_dpo_14, General look back period for calculations (7)st_dev_of_indicator_dpo_14 · line 805
  • Correlationindicator_dpo_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_dpo_14 · line 806
  • CUMdifference > 0 ? math.sqrt(difference) : -math.sqrt(-difference)adline · line 811
  • BBindicator_adl_14, 5, 4middle_adl_14 · line 813
  • BBindicator_adl_14, 5, 4upper_adl_14 · line 813
  • BBindicator_adl_14, 5, 4lower_adl_14 · line 813
  • Stdevbb_gap_of_adl_14, General look back period for calculations (7)st_dev_of_bb_gap_of_adl_14 · line 815
  • Stdevindicator_adl_14, General look back period for calculations (7)st_dev_of_indicator_adl_14 · line 816
  • Correlationindicator_adl_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_adl_14 · line 817
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAbullp_nf, General look back period for calculations (7), 0bullp_f · line 825
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAbearp_nf, General look back period for calculations (7), 0bearp_f · line 843
  • EMASource of Baseline of Bull Power (close), General look back period for calculations (7)bullp_nf · line 822
  • EMASource of Baseline of Bull Power (close), General look back period for calculations (7)bearp_nf · line 823
  • BBindicator_bbp_14, 5, 4middle_bbp_14 · line 863
  • BBindicator_bbp_14, 5, 4upper_bbp_14 · line 863
  • BBindicator_bbp_14, 5, 4lower_bbp_14 · line 863
  • Stdevbb_gap_of_bbp_14, General look back period for calculations (7)st_dev_of_bb_gap_of_bbp_14 · line 865
  • Stdevindicator_bbp_14, General look back period for calculations (7)st_dev_of_indicator_bbp_14 · line 866
  • Correlationindicator_bbp_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_bbp_14 · line 867
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAhigh, General look back period for calculations (7), 0high_f · line 872
  • BBindicator_high_14, 5, 4middle_high_14 · line 890
  • BBindicator_high_14, 5, 4upper_high_14 · line 890
  • BBindicator_high_14, 5, 4lower_high_14 · line 890
  • Stdevbb_gap_of_high_14, General look back period for calculations (7)st_dev_of_bb_gap_of_high_14 · line 892
  • Stdevindicator_high_14, General look back period for calculations (7)st_dev_of_indicator_high_14 · line 893
  • Correlationindicator_high_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_high_14 · line 894
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAlow, General look back period for calculations (7), 0low_f · line 899
  • BBindicator_low_14, 5, 4middle_low_14 · line 917
  • BBindicator_low_14, 5, 4upper_low_14 · line 917
  • BBindicator_low_14, 5, 4lower_low_14 · line 917
  • Stdevbb_gap_of_low_14, General look back period for calculations (7)st_dev_of_bb_gap_of_low_14 · line 919
  • Stdevindicator_low_14, General look back period for calculations (7)st_dev_of_indicator_low_14 · line 920
  • Correlationindicator_low_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_low_14 · line 921
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAopen, General look back period for calculations (7), 0open_f · line 926
  • BBindicator_open_14, 5, 4middle_open_14 · line 944
  • BBindicator_open_14, 5, 4upper_open_14 · line 944
  • BBindicator_open_14, 5, 4lower_open_14 · line 944
  • Stdevbb_gap_of_open_14, General look back period for calculations (7)st_dev_of_bb_gap_of_open_14 · line 946
  • Stdevindicator_open_14, General look back period for calculations (7)st_dev_of_indicator_open_14 · line 947
  • Correlationindicator_open_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_open_14 · line 948
  • Linreg / SMA / EMA / HMA / RMA / WMA / ALMA / SWMA / VWMAclose, General look back period for calculations (7), 0close_f · line 953
  • BBindicator_close_14, 5, 4middle_close_14 · line 971
  • BBindicator_close_14, 5, 4upper_close_14 · line 971
  • BBindicator_close_14, 5, 4lower_close_14 · line 971
  • Stdevbb_gap_of_close_14, General look back period for calculations (7)st_dev_of_bb_gap_of_close_14 · line 973
  • Stdevindicator_close_14, General look back period for calculations (7)st_dev_of_indicator_close_14 · line 974
  • Correlationindicator_close_14, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_indicator_close_14 · line 975
  • Stdevall_indicators_final_graph, General look back period for calculations (7)st_dev_of_all_indicators_final_graph · line 980
  • Correlationall_indicators_final_graph, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_all_indicators_final_graph · line 981
  • Changeall_indicators_final_graph, 2first_degree_change_of_st_dev_of_all_indicators_final_graph · line 982
  • Changefirst_degree_change_of_st_dev_of_all_indicators_final_graph, 2first_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph · line 983
  • Stdevfinal_graph_of_corelation, General look back period for calculations (7)st_dev_of_final_graph_of_corelation · line 987
  • Correlationfinal_graph_of_corelation, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_final_graph_of_corelation · line 988
  • Changefinal_graph_of_corelation, 2second_degree_change_of_st_dev_of_final_graph_of_corelation · line 989
  • Changesecond_degree_change_of_st_dev_of_final_graph_of_corelation, 2second_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph_1 · line 990
  • Stdevfinal_graph_of_st_dev, General look back period for calculations (7)st_dev_of_final_graph_of_st_dev · line 994
  • Correlationfinal_graph_of_st_dev, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_final_graph_of_st_dev · line 995
  • Stdevsecond_degree_final_graph_of_corelation_one, General look back period for calculations (7)st_dev_of_second_degree_final_graph_of_corelation_one · line 1001
  • Correlationsecond_degree_final_graph_of_corelation_one, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_one · line 1002
  • Stdevsecond_degree_final_graph_of_corelation_two, General look back period for calculations (7)st_dev_of_second_degree_final_graph_of_corelation_two · line 1005
  • Correlationsecond_degree_final_graph_of_corelation_two, price_avg_14, General look back period for calculations (7)corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_two · line 1006
  • Correlation / Stdevchange_of_final_graph_of_corelation, price_avg_14, General look back period for calculations (7)second_level_change_of_change_of_final_graph_of_corelation · line 1010
  • HighestSource of Higher value of Look back period (high), Look back period to determine lower low points (280)hi_high · line 1056
  • LowestSource of Lower value of Look back period (low), Look back period to determine lower low points (280)lowerlowest · line 1057
  • SupertrendFactor of supertrend to determine buy command (1), ArtPeriod of supertrend to determine buy command (24)pinesupertrend · line 1069
  • SupertrendFactor of supertrend to determine buy command (1), ArtPeriod of supertrend to determine buy command (24)pinedirection · line 1069

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 544 named inputs, calculations, conditions and outputs, too many to draw legibly here; the tables above list them.

Order rules

OrderFires whenBy defaultLine
Open long long((buy_1 or buy_2 or buy_3 )) and window and strategy.position_size == 0 and source_of_lower_point < low_pointOn1291
Open long long((buy_1 or buy_2 or buy_3 or buy_4 ) and window and ma_9 < strategy.position_avg_price *.99 and strategy.position_size > 0 ) and strategy.opentrades <= (max_trade_count * 0.75)On1293
Open long long((buy_6) and ma_9 < strategy.position_avg_price and window and strategy.position_size > 0 ) and strategy.opentrades > (max_trade_count * 0.75) and strategy.opentrades <= max_trade_countOn1295
Close long(sell_comand==true) and profit_line < ma_9 and hi_point[1] and low_pointOn1297
Close longta.sma(close,9)> array_minval*(1 + profit_precentage_intermidiate/100) and int_selling == true and hi_point[1] and low_point and strategy.position_avg_price > ma_9On1300

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

Does it repaint?

No

No repainting patterns in the source.

Not measuredNo trades to compareThe last 300 bars, from 26 Dec 2025, were fed to the engine as live ticks, but neither the live nor the historical run produced any trades in them, so the replay says nothing either way.
  • ClearHigher-timeframe data1 request.security call(s), none with lookahead on.
  • 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

Not run on other markets: the script requests USI:ADVN.NY D, USI:DECL.NY D, USI:UNCH.NY D, and that data is not available here (not a Binance spot market; not a Binance spot market; not a Binance spot market). Its results would rest on empty values.

Similar scripts

No other indicator or strategy here shares enough of its calculations.

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.

  • 26 settings use the untyped input() (line 26, 27, 29, 32, 47, 49, 61, 63, 67, 69, 74, 77, 80, 106, 108, 110, 112, 113, 116, 119, 120, 123, 125, 126, 127, 128). 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

Not verified

Neither version placed a trade on any of the 8 markets, so there was nothing to compare.

  • Line 26: input() → input.source()
  • Line 27: input() → input.source()
  • Line 29: input() → input.source()
  • Line 32: input() → input.bool()
  • Line 47: input() → input.source()
  • Line 49: input() → input.source()
20 more edits
  • Line 61: input() → input.source()
  • Line 63: input() → input.source()
  • Line 67: input() → input.source()
  • Line 69: input() → input.source()
  • Line 74: input() → input.source()
  • Line 77: input() → input.source()
  • Line 80: input() → input.source()
  • Line 106: input() → input.source()
  • Line 108: input() → input.source()
  • Line 110: input() → input.source()
  • Line 112: input() → input.source()
  • Line 113: input() → input.source()
  • Line 116: input() → input.source()
  • Line 119: input() → input.source()
  • Line 120: input() → input.bool()
  • Line 123: input() → input.source()
  • Line 125: input() → input.source()
  • Line 126: input() → input.source()
  • Line 127: input() → input.source()
  • Line 128: input() → input.source()
⋯var artperiod_of_supertrend_to_determine_sell_comand            = input.int     (defval = 24,                                                                                           title = "ArtPeriod of supertrend to determine buy command",                         group = "Determination of buy or sell command")-buy_comand_high_value                                           = input         (defval = high,                                                                                         title = "Source of Higher value of Look back period",                               group = "Determination of buy or sell command")+buy_comand_high_value                                           = input.source         (defval = high,                                                                                         title = "Source of Higher value of Look back period",                               group = "Determination of buy or sell command")-buy_comand_low_value                                            = input         (defval = low,                                                                                          title = "Source of Lower value of Look back period",                                group = "Determination of buy or sell command")+buy_comand_low_value                                            = input.source         (defval = low,                                                                                          title = "Source of Lower value of Look back period",                                group = "Determination of buy or sell command")var buy_or_sell_lookback                                        = input.int     (defval = 280,                                                                                          title = "Look back period to determine lower low points",                           group = "Determination of buy or sell command")-source_of_lower_point                                           = input         (defval = open,                                                                                         title = "Source of Lower point to initiate purchase",                               group = "Determination of buy or sell command")+source_of_lower_point                                           = input.source         (defval = open,                                                                                         title = "Source of Lower point to initiate purchase",                               group = "Determination of buy or sell command")// Calculation of profit precentagevar profit_precentage                                           = input.float   (defval = 7,                                                                                            title = "Profit precentage will be",                                                group = "Profit Calculations",                                                                                          step = 0.01)-var intermidiate_selling                                        = input         (defval = false,                                                                                        title = "Enable Swing Trading",                                                     group = "Profit Calculations")+var intermidiate_selling                                        = input.bool         (defval = false,                                                                                        title = "Enable Swing Trading",                                                     group = "Profit Calculations")var profit_precentage_intermidiate                              = input.float   (defval = 2,                                                                                            title = "Swing Trading profit precentage will be",                                  group = "Profit Calculations",                                                                                          step = 0.01)⋯look_back_period                                                = input.int     (defval = 7,                                                                                            title = "General look back period for calculations",                                group = "Principle inputs")-source_of_price_average                                         = input         (defval = close,                                                                                        title = "Source of Average Price",                                                  group = "Principle inputs")+source_of_price_average                                         = input.source         (defval = close,                                                                                        title = "Source of Average Price",                                                  group = "Principle inputs")look_back_period_for_price_falling                              = input.int     (defval = 3,                                                                                            title = "Look back period for price falling",                                       group = "Principle inputs")-source_of_ma9                                                   = input         (defval = hl2,                                                                                          title = "Source of average price to determine selling and buying",                  group = "Principle inputs")+source_of_ma9                                                   = input.source         (defval = hl2,                                                                                          title = "Source of average price to determine selling and buying",                  group = "Principle inputs")look_back_period_of_sma9                                        = input.int     (defval = 3,                                                                                            title = "Look back period of average price to determine buy and sell",              group = "Principle inputs")⋯//Relative strength index (RSI)-source_of_rsi                                                   = input         (defval = close,                                                                                        title = "Source of RSI",                                                            group = "Relative strength index (RSI)")+source_of_rsi                                                   = input.source         (defval = close,                                                                                        title = "Source of RSI",                                                            group = "Relative strength index (RSI)")//Money flow index (MFI)-source_of_mfi                                                   = input         (defval = close,                                                                                        title = "Source of MFI",                                                            group = "Money flow index (MFI)")+source_of_mfi                                                   = input.source         (defval = close,                                                                                        title = "Source of MFI",                                                            group = "Money flow index (MFI)")//Balance of Power⋯//Chande Momentum Oscillator-source_of_mom                                                   = input         (defval = close,                                                                                        title = "Source of MOM",                                                            group = "Chande Momentum Oscillator (MOM)")+source_of_mom                                                   = input.source         (defval = close,                                                                                        title = "Source of MOM",                                                            group = "Chande Momentum Oscillator (MOM)")//Center of Gravity (COG)-source_of_cog                                                   = input         (defval = close,                                                                                        title = "Source of COG",                                                            group = "The Center of Gravity (COG)")+source_of_cog                                                   = input.source         (defval = close,                                                                                        title = "Source of COG",                                                            group = "The Center of Gravity (COG)")//Directional Movement Index (DMI)⋯//Stochastic-source_of_stoch                                                 = input         (defval = close,                                                                                        title = "Source of Stochastic",                                                     group = "Stochastic")+source_of_stoch                                                 = input.source         (defval = close,                                                                                        title = "Source of Stochastic",                                                     group = "Stochastic")stoch_calculation                                               = input.string  (defval ='Lenior regression',                                                                           title = "Calculation method of Stochastic",                                         group = "Stochastic",                                                                                                   options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Symmetrically weighted moving average with fixed length-source_of_swma                                                  = input         (defval = close,                                                                                        title = "Source of SWMA",                                                           group = "Symmetrically weighted moving average with fixed length")+source_of_swma                                                  = input.source         (defval = close,                                                                                        title = "Source of SWMA",                                                           group = "Symmetrically weighted moving average with fixed length")swma_calculation                                                = input.string  (defval ='Lenior regression',                                                                           title = "Calculation method of SWMA",                                               group = "Symmetrically weighted moving average with fixed length",                                                      options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//True strength index (TSI)-source_of_tsi                                                   = input         (defval = close,                                                                                        title = "Source of TSI",                                                            group = "True strength index (TSI)")+source_of_tsi                                                   = input.source         (defval = close,                                                                                        title = "Source of TSI",                                                            group = "True strength index (TSI)")var tsi_short_length                                            = input.int     (defval = 14,                                                                                           title = "Short Length of TSI",                                                      group = "True strength index (TSI)",                                                                                    minval = 0, step = 1)⋯//Simple Moving Average-source_of_sma                                                   = input         (defval = close,                                                                                        title = "Source of Simple Moving Average (SMA)",                                    group = "Simple Moving Average (SMA)")+source_of_sma                                                   = input.source         (defval = close,                                                                                        title = "Source of Simple Moving Average (SMA)",                                    group = "Simple Moving Average (SMA)")//Exponential Moving Average-source_of_ema                                                   = input         (defval = close,                                                                                        title = "Source of Exponential Moving Average (EMA)",                               group = "Exponential Moving Average (EMA)")+source_of_ema                                                   = input.source         (defval = close,                                                                                        title = "Source of Exponential Moving Average (EMA)",                               group = "Exponential Moving Average (EMA)")//CCI (commodity channel index)-source_of_cci                                                   = input         (defval = close,                                                                                        title = "Source of Commodity Channel Index (CCI)",                                  group = "Commodity Channel Index (CCI)")+source_of_cci                                                   = input.source         (defval = close,                                                                                        title = "Source of Commodity Channel Index (CCI)",                                  group = "Commodity Channel Index (CCI)")//Chop Zone-source_of_cz                                                    = input         (defval = close,                                                                                        title = "Source of Chop Zone (CZ)",                                                 group = " Chop Zone (CZ)")+source_of_cz                                                    = input.source         (defval = close,                                                                                        title = "Source of Chop Zone (CZ)",                                                 group = " Chop Zone (CZ)")-source_of_cz_avg                                                = input         (defval = hlc3,                                                                                         title = "Source of Average of Chop Zone (CZ)",                                      group = " Chop Zone (CZ)")+source_of_cz_avg                                                = input.source         (defval = hlc3,                                                                                         title = "Source of Average of Chop Zone (CZ)",                                      group = " Chop Zone (CZ)")cz_calculation                                                  = input.string  (defval = 'Exponentially Weighted Moving Average (EMA)',                                                title = "Calculation method of Chop Zone",                                          group = " Chop Zone (CZ)",                                                                                              options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Ease of Movement-source_of_eom                                                   = input         (defval = hl2,                                                                                          title = "Source of Ease of Movement (EOM)",                                         group = "Ease of Movement")+source_of_eom                                                   = input.source         (defval = hl2,                                                                                          title = "Source of Ease of Movement (EOM)",                                         group = "Ease of Movement")eom_calculation                                                 = input.string  (defval = 'Simple Moving Average (SMA)',                                                                title = "Calculation method of Ease of Movement",                                   group = "Ease of Movement",                                                                                             options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Detrended Price Oscillator-source_of_dpo                                                   = input         (defval = close,                                                                                        title = "Source of Detrended Price Oscillator (DPO)",                               group = "Detrended Price Oscillator (DPO)")+source_of_dpo                                                   = input.source         (defval = close,                                                                                        title = "Source of Detrended Price Oscillator (DPO)",                               group = "Detrended Price Oscillator (DPO)")-isCentered                                                      = input         (defval = false,                                                                                        title="Alignment to center - Detrended Price Oscillator (DPO)",                     group = "Detrended Price Oscillator (DPO)")+isCentered                                                      = input.bool         (defval = false,                                                                                        title="Alignment to center - Detrended Price Oscillator (DPO)",                     group = "Detrended Price Oscillator (DPO)")dpo_calculation                                                 = input.string  (defval='Simple Moving Average (SMA)',                                                                  title = "Calculation method of Ease of Movement",                                   group = "Detrended Price Oscillator (DPO)",                                                                             options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Advance Decline Line-source_of_adl                                                   = input         (defval = close,                                                                                        title = "Source of Advance Decline Line (ADL)",                                     group = "Advance Decline Line (ADL)")+source_of_adl                                                   = input.source         (defval = close,                                                                                        title = "Source of Advance Decline Line (ADL)",                                     group = "Advance Decline Line (ADL)")//Bull Bear Power-source_of_bullp                                                 = input         (defval = high,                                                                                         title = "Source of Bull Power",                                                     group = "Bull Bear Power (BBP)")+source_of_bullp                                                 = input.source         (defval = high,                                                                                         title = "Source of Bull Power",                                                     group = "Bull Bear Power (BBP)")-source_of_bearp                                                 = input         (defval = low,                                                                                          title = "Source of Bear Power",                                                     group = "Bull Bear Power (BBP)")+source_of_bearp                                                 = input.source         (defval = low,                                                                                          title = "Source of Bear Power",                                                     group = "Bull Bear Power (BBP)")-source_of_cal_bullp                                             = input         (defval = close,                                                                                        title = "Source of Baseline of Bull Power",                                         group = "Bull Bear Power (BBP)")+source_of_cal_bullp                                             = input.source         (defval = close,                                                                                        title = "Source of Baseline of Bull Power",                                         group = "Bull Bear Power (BBP)")-source_of_cal_bearp                                             = input         (defval = close,                                                                                        title = "Source of Baseline of Bear Power",                                         group = "Bull Bear Power (BBP)")+source_of_cal_bearp                                             = input.source         (defval = close,                                                                                        title = "Source of Baseline of Bear Power",                                         group = "Bull Bear Power (BBP)")bullp_calculation                                               = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Calculation method of Bull Power",                                         group = "Bull Bear Power (BBP)" ,                                                                                       options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])⋯

Does it run in Pine Script v6?

No

The v6 version does not run in Zeal Terminal's engine: Pine Script v6 Error at @L1296:C50: cannot use 'float' as a condition — Pine Script v6 does not cast 'int' or 'float' to 'bool' implicitly. Wrap it in bool(). The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯//version 35-//@version=5+//@version=6strategy("OPV15 V2 (Duplicate of Used for Signal Generation) - Co-relation and St-deviation Strategy - BNB/USDT 15min", shorttitle="OPV15 V2 Duplicate CS - BNB 15min", overlay=true, calc_on_order_fills=false, close_entries_rule = "FIFO", calc_on_every_tick=false, initial_capital = 1000,pyramiding = 999,precision = 4, process_orders_on_close=true, currency = currency.USD, default_qty_type = strategy.cash, default_qty_value = 33, commission_type = strategy.commission.percent, max_lines_count = 500, commission_value = 0.1)⋯

Where it runs

EngineCompilesRunsMatches TradingView
Zeal Terminal · OpenPineScript v2Yes 651 msWith a workaround 1,000 bars in 820 msNot measured
PineTSNot testedNot testedNot measured

The engine's host API cannot yet declare a chart's symbol and timeframe, so this page sets them on the engine directly for each market.

“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/// © pcooma//version 35//@version=5strategy("OPV15 V2 (Duplicate of Used for Signal Generation) - Co-relation and St-deviation Strategy - BNB/USDT 15min", shorttitle="OPV15 V2 Duplicate CS - BNB 15min", overlay=true, calc_on_order_fills=false, close_entries_rule = "FIFO", calc_on_every_tick=false, initial_capital = 1000,pyramiding = 999,precision = 4, process_orders_on_close=true, currency = currency.USD, default_qty_type = strategy.cash, default_qty_value = 33, commission_type = strategy.commission.percent, max_lines_count = 500, commission_value = 0.1)//Backtest datesfromDay                      = input.int(defval     = 25,      title    = "From (DD/MM/YYYY) - ",     minval = 1, maxval = 31,        group = 'Time Period Values', inline = 'From')fromMonth                    = input.int(defval     = 02,      title    = "/",                        minval = 1, maxval = 12,        group = 'Time Period Values', inline = 'From')fromYear                     = input.int(defval     = 2022,    title    = "/",                        minval = 1970,                  group = 'Time Period Values', inline = 'From')thruDay                      = input.int(defval     = 1,       title    = "Thru (DD/MM/YYYY) - ",     minval = 1, maxval = 31,        group = 'Time Period Values', inline = 'Thru')thruMonth                    = input.int(defval     = 1,       title    = "/",                        minval = 1, maxval = 12,        group = 'Time Period Values', inline = 'Thru')thruYear                     = input.int(defval     = 2112,    title    = "/",                        minval = 1970,                  group = 'Time Period Values', inline = 'Thru')start                        = timestamp(fromYear, fromMonth, fromDay, 00, 00)         // backtest start windowfinish                       = timestamp(thruYear, thruMonth, thruDay, 23, 59)         // backtest finish window//window()  => //    time >= start and time <= finish ? true : false                 // create function "within window of time"use_timeframe               = input.bool(defval = true, title = "Use data window to limit trade")var window = trueif use_timeframe == true    window  := time >= start and time <= finish ? true : falseelse    window := true//Buy and Sell rangevar factor_of_supertrend_to_determine_sell_comand               = input.int     (defval = 1,                                                                                            title = "Factor of supertrend to determine buy command",                            group = "Determination of buy or sell command")var artperiod_of_supertrend_to_determine_sell_comand            = input.int     (defval = 24,                                                                                           title = "ArtPeriod of supertrend to determine buy command",                         group = "Determination of buy or sell command")buy_comand_high_value                                           = input         (defval = high,                                                                                         title = "Source of Higher value of Look back period",                               group = "Determination of buy or sell command")buy_comand_low_value                                            = input         (defval = low,                                                                                          title = "Source of Lower value of Look back period",                                group = "Determination of buy or sell command")var buy_or_sell_lookback                                        = input.int     (defval = 280,                                                                                          title = "Look back period to determine lower low points",                           group = "Determination of buy or sell command")source_of_lower_point                                           = input         (defval = open,                                                                                         title = "Source of Lower point to initiate purchase",                               group = "Determination of buy or sell command")// Calculation of profit precentagevar profit_precentage                                           = input.float   (defval = 7,                                                                                            title = "Profit precentage will be",                                                group = "Profit Calculations",                                                                                          step = 0.01)var intermidiate_selling                                        = input         (defval = false,                                                                                        title = "Enable Swing Trading",                                                     group = "Profit Calculations")var profit_precentage_intermidiate                              = input.float   (defval = 2,                                                                                            title = "Swing Trading profit precentage will be",                                  group = "Profit Calculations",                                                                                          step = 0.01)//Fund Managementvar int_cap                                                     = input.float   (defval = 1000,                                                                                         title = "Cumilative Investment",                                                    group = "Fund Management")var purchaseing_method                                          = input.string  (defval ='Equal amounts',                                                                               title = "Value of Purchas will be",                                                 group = "Fund Management",                                                                                              options=['Equal amounts','Incremental amounts'])var dev_of_equal_amounts                                        = input.string  (defval ='Equal amounts with fixed USDT',                                                               title = "Value of Purchas will be",                                                 group = "Fund Management",                                                                                              options=['Equal amounts with fixed USDT','Equal amounts with fixed entries'])var int_val_prc                                                 = input.float   (defval = 44,                                                                                           title = "Value of first purchase will be",                                          group = "Fund Management",                                                                                              tooltip = "Minimum value of initial purchase will be 15USDT",       inline = "Investment")var int_val_allocation                                          = input.string  (defval ='USDT',                                                                                        title = "",                                                                         group = "Fund Management",                                                                                              options=['% of cumilative investment', 'USDT'],                                                                                                  inline = "Investment")  var piramiding                                                  = input.int     (defval = 35,                                                                                           title = "Numbers of pararal entries",                                               group = "Fund Management")var r                                                           = input.float   (defval = 5,                                                                                            title = "r starting value",                                                         group = "Input parameters for fund management")var r_change_input                                              = input.int     (defval = 1,                                                                                            title = "Initiative value for r change",                                            group = "Input parameters for fund management")var r_finetune                                                  = input.bool    (defval = false,                                                                                        title = "Use r = 0.001 to finetune r value",                                        group = "Input parameters for fund management")var r_value                                                     = input.float   (defval = 3.259,                                                                                        title = "Calculated r value",                                                       group = "Input parameters for fund management")//Principle inputlook_back_period                                                = input.int     (defval = 7,                                                                                            title = "General look back period for calculations",                                group = "Principle inputs")source_of_price_average                                         = input         (defval = close,                                                                                        title = "Source of Average Price",                                                  group = "Principle inputs")look_back_period_for_price_falling                              = input.int     (defval = 3,                                                                                            title = "Look back period for price falling",                                       group = "Principle inputs")source_of_ma9                                                   = input         (defval = hl2,                                                                                          title = "Source of average price to determine selling and buying",                  group = "Principle inputs")look_back_period_of_sma9                                        = input.int     (defval = 3,                                                                                            title = "Look back period of average price to determine buy and sell",              group = "Principle inputs")ma_9_calculation                                                = input.string  (defval = 'Exponentially Weighted Moving Average (EMA)',                                                title = "Calculation method of average price",                                      group = "Principle inputs",                                                                                             options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])volume_profile_calculation                                      = input.string  (defval = 'Lenior regression',                                                                          title = "Calculation method of volume profile",                                     group = "Principle inputs",                                                                                             options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Parabolic SAR (parabolic stop and reverse) var float sar_start_value                                       = input.float   (defval = 0.2,                                                                                          title = "Start value of SAR",                                                       group = "Parabolic Stop and Reverse (SAR)",                                                                             minval = 0, step = 0.01)var float sar_incrimant_value                                   = input.float   (defval = 0.2,                                                                                          title = "Increment value  of SAR",                                                  group = "Parabolic Stop and Reverse (SAR)",                                                                             minval = 0, step = 0.01)var float sar_mac_value                                         = input.float   (defval = 0.2,                                                                                          title = "Max value  of SAR",                                                        group = "Parabolic Stop and Reverse (SAR)",                                                                             minval = 0, step = 0.01)//Supertrendvar ST_factor_value                                             = input.int     (defval = 1,                                                                                            title = "Factor of Supertrend",                                                     group = "Supertrend",                                                                                                   minval = 0, step = 1)var ST_art_period_value                                         = input.int     (defval = 10,                                                                                           title = "ArtPeriod of Supertrend",                                                  group = "Supertrend",                                                                                                   minval = 0, step = 1)//Relative strength index (RSI)source_of_rsi                                                   = input         (defval = close,                                                                                        title = "Source of RSI",                                                            group = "Relative strength index (RSI)")//Money flow index (MFI)source_of_mfi                                                   = input         (defval = close,                                                                                        title = "Source of MFI",                                                            group = "Money flow index (MFI)")//Balance of Powerbop_calculation                                                 = input.string  (defval='Lenior regression',                                                                            title = "Calculation method of Balance of Power",                                   group = "Balance of Power(BOP)",                                                                                        options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Chande Momentum Oscillatorsource_of_mom                                                   = input         (defval = close,                                                                                        title = "Source of MOM",                                                            group = "Chande Momentum Oscillator (MOM)")//Center of Gravity (COG)source_of_cog                                                   = input         (defval = close,                                                                                        title = "Source of COG",                                                            group = "The Center of Gravity (COG)")//Directional Movement Index (DMI)var dmi_di_length                                               = input.int     (defval = 3,                                                                                            title = "DI Length",                                                                group = "Directional movement index (DMI)",                                                                             minval = 0, step = 1)var dmi_adx_smoothing_length                                    = input.int     (defval = 10,                                                                                           title = "ADX Smoothing length",                                                     group = "Directional movement index (DMI)",                                                                             minval = 0, step = 1)//Stochasticsource_of_stoch                                                 = input         (defval = close,                                                                                        title = "Source of Stochastic",                                                     group = "Stochastic")stoch_calculation                                               = input.string  (defval ='Lenior regression',                                                                           title = "Calculation method of Stochastic",                                         group = "Stochastic",                                                                                                   options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Symmetrically weighted moving average with fixed lengthsource_of_swma                                                  = input         (defval = close,                                                                                        title = "Source of SWMA",                                                           group = "Symmetrically weighted moving average with fixed length")swma_calculation                                                = input.string  (defval ='Lenior regression',                                                                           title = "Calculation method of SWMA",                                               group = "Symmetrically weighted moving average with fixed length",                                                      options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//True strength index (TSI)source_of_tsi                                                   = input         (defval = close,                                                                                        title = "Source of TSI",                                                            group = "True strength index (TSI)")var tsi_short_length                                            = input.int     (defval = 14,                                                                                           title = "Short Length of TSI",                                                      group = "True strength index (TSI)",                                                                                    minval = 0, step = 1)var tsi_long_length                                             = input.int     (defval = 28,                                                                                           title = "Long length of TSI",                                                       group = "True strength index (TSI)",                                                                                    minval = 0, step = 1)//Williams %Rwpr_calculation                                                 = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Williams %R",                                        group = "Williams %R",                                                                                                  options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Accumulation/distribution indexaccdist_calculation                                             = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Accumulation/distribution Index",                    group = "Accumulation/distribution Index",                                                                              options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Intraday Intensity Indexiii_calculation                                                 = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Intraday Intensity Index",                           group = "Intraday Intensity Index",                                                                                     options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Negative Volume Indexnvi_calculation                                                 = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Negative Volume Index",                              group = "Negative Volume Index",                                                                                        options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Positive Volume Indexpvi_calculation                                                 = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Positive Volume Index",                              group = "Positive Volume Index",                                                                                        options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//On Balance Volumeobv_calculation                                                 = input.string  (defval ='Weighted Moving Average (WMA)',                                                               title = "Calculation method of On Balance Volume",                                  group = "On Balance Volume",                                                                                            options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Price-Volume Trendpvt_calculation                                                 = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Price-Volume Trend",                                 group = "Price-Volume Trend",                                                                                           options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//True rangetr_calculation                                                  = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of True range",                                         group = "True range",                                                                                                   options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Volume-weighted average pricevwap_calculation                                                = input.string  (defval ='Hull Moving Average (HMA)',                                                                   title = "Calculation method of Volume-weighted average price",                      group = "Volume-weighted average price",                                                                                options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Williams Accumulation/Distributionwad_calculation                                                 = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Williams Accumulation/Distribution",                 group = "Williams Accumulation/Distribution",                                                                           options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Williams Variable Accumulation/Distributionwvad_calculation                                                = input.string  (defval ='Exponentially Weighted Moving Average (EMA)',                                                 title = "Calculation method of Williams Variable Accumulation/Distribution",        group = "Williams Variable Accumulation/Distribution",                                                                  options=['NONE','Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Simple Moving Averagesource_of_sma                                                   = input         (defval = close,                                                                                        title = "Source of Simple Moving Average (SMA)",                                    group = "Simple Moving Average (SMA)")//Exponential Moving Averagesource_of_ema                                                   = input         (defval = close,                                                                                        title = "Source of Exponential Moving Average (EMA)",                               group = "Exponential Moving Average (EMA)")//CCI (commodity channel index)source_of_cci                                                   = input         (defval = close,                                                                                        title = "Source of Commodity Channel Index (CCI)",                                  group = "Commodity Channel Index (CCI)")//Chop Zonesource_of_cz                                                    = input         (defval = close,                                                                                        title = "Source of Chop Zone (CZ)",                                                 group = " Chop Zone (CZ)")source_of_cz_avg                                                = input         (defval = hlc3,                                                                                         title = "Source of Average of Chop Zone (CZ)",                                      group = " Chop Zone (CZ)")cz_calculation                                                  = input.string  (defval = 'Exponentially Weighted Moving Average (EMA)',                                                title = "Calculation method of Chop Zone",                                          group = " Chop Zone (CZ)",                                                                                              options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Ease of Movementsource_of_eom                                                   = input         (defval = hl2,                                                                                          title = "Source of Ease of Movement (EOM)",                                         group = "Ease of Movement")eom_calculation                                                 = input.string  (defval = 'Simple Moving Average (SMA)',                                                                title = "Calculation method of Ease of Movement",                                   group = "Ease of Movement",                                                                                             options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Detrended Price Oscillatorsource_of_dpo                                                   = input         (defval = close,                                                                                        title = "Source of Detrended Price Oscillator (DPO)",                               group = "Detrended Price Oscillator (DPO)")isCentered                                                      = input         (defval = false,                                                                                        title="Alignment to center - Detrended Price Oscillator (DPO)",                     group = "Detrended Price Oscillator (DPO)")dpo_calculation                                                 = input.string  (defval='Simple Moving Average (SMA)',                                                                  title = "Calculation method of Ease of Movement",                                   group = "Detrended Price Oscillator (DPO)",                                                                             options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//Advance Decline Linesource_of_adl                                                   = input         (defval = close,                                                                                        title = "Source of Advance Decline Line (ADL)",                                     group = "Advance Decline Line (ADL)")//Bull Bear Powersource_of_bullp                                                 = input         (defval = high,                                                                                         title = "Source of Bull Power",                                                     group = "Bull Bear Power (BBP)")source_of_bearp                                                 = input         (defval = low,                                                                                          title = "Source of Bear Power",                                                     group = "Bull Bear Power (BBP)")source_of_cal_bullp                                             = input         (defval = close,                                                                                        title = "Source of Baseline of Bull Power",                                         group = "Bull Bear Power (BBP)")source_of_cal_bearp                                             = input         (defval = close,                                                                                        title = "Source of Baseline of Bear Power",                                         group = "Bull Bear Power (BBP)")bullp_calculation                                               = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Calculation method of Bull Power",                                         group = "Bull Bear Power (BBP)" ,                                                                                       options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])bearp_calculation                                               = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Calculation method of Bull Power",                                         group = "Bull Bear Power (BBP)",                                                                                        options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//highhigh_impact_calculation                                         = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Impact calculation method of high",                                        group = "Impact Calculation",                                                                                           options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//lowlow_impact_calculation                                          = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Impact calculation method of low",                                         group = "Impact Calculation",                                                                                           options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//openopen_impact_calculation                                         = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Impact calculation method of open",                                        group = "Impact Calculation",                                                                                           options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//closeclose_impact_calculation                                        = input.string  (defval ='Simple Moving Average (SMA)',                                                                 title = "Impact calculation method of close",                                       group = "Impact Calculation",                                                                                           options=['Lenior regression', 'Simple Moving Average (SMA)','Exponentially Weighted Moving Average (EMA)', 'Hull Moving Average (HMA)', 'Exponentially Weighted Moving average with alpha length (RMA)', 'Weighted Moving Average (WMA)', 'Arnaud Legoux Moving Average (ALMA)', 'Symmetrically weighted moving average with fixed length (SWMA)','Volume-weighted Moving Average (VWMA)'])//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////General Calculationsvar float volume_avg_14 = 0var float ma_9 = 0price_avg_14 = ta.linreg((source_of_price_average), look_back_period, 0)price_rising = ta.rising(price_avg_14,2)price_falling = ta.falling(price_avg_14,look_back_period_for_price_falling)//Volume profileif volume_profile_calculation == 'Lenior regression'    volume_avg_14 := ta.linreg(volume, look_back_period, 0)else if volume_profile_calculation == 'Simple Moving Average (SMA)'    volume_avg_14 := ta.sma(volume, look_back_period)else if volume_profile_calculation == 'Exponentially Weighted Moving Average (EMA)'    volume_avg_14 := ta.ema(volume, look_back_period)else if volume_profile_calculation == 'Hull Moving Average (HMA)'    volume_avg_14 := ta.hma(volume, look_back_period)else if volume_profile_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    volume_avg_14 := ta.rma(volume, look_back_period)else if volume_profile_calculation == 'Weighted Moving Average (WMA)'    volume_avg_14 := ta.wma(volume, look_back_period)else if volume_profile_calculation == 'Arnaud Legoux Moving Average (ALMA)'    volume_avg_14 := ta.alma(volume, look_back_period,0,3)else if volume_profile_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    volume_avg_14 := ta.swma(volume)else if volume_profile_calculation == 'Volume-weighted Moving Average (VWMA)'    volume_avg_14 := ta.vwma(volume, look_back_period)if ma_9_calculation == 'Lenior regression'    ma_9 := ta.linreg(source_of_ma9, look_back_period, 0)else if ma_9_calculation == 'Simple Moving Average (SMA)'    ma_9 := ta.sma(source_of_ma9, look_back_period)else if ma_9_calculation == 'Exponentially Weighted Moving Average (EMA)'    ma_9 := ta.ema(source_of_ma9, look_back_period)else if ma_9_calculation == 'Hull Moving Average (HMA)'    ma_9 := ta.hma(source_of_ma9, look_back_period)else if ma_9_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    ma_9 := ta.rma(source_of_ma9, look_back_period)else if ma_9_calculation == 'Weighted Moving Average (WMA)'    ma_9 := ta.wma(source_of_ma9, look_back_period)else if ma_9_calculation == 'Arnaud Legoux Moving Average (ALMA)'    ma_9 := ta.alma(source_of_ma9, look_back_period,0,3)else if ma_9_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    ma_9 := ta.swma(source_of_ma9)else if ma_9_calculation == 'Volume-weighted Moving Average (VWMA)'    ma_9 := ta.vwma(source_of_ma9, look_back_period)st_dev_of_price_avg_14 = ta.stdev(price_avg_14, look_back_period)st_dev_of_volume_avg_14 = ta.stdev(volume_avg_14, look_back_period)corelation_btw_price_avg_14_and_volume_avg_14 = ta.correlation(volume_avg_14,price_avg_14,look_back_period)//Parabolic SAR (parabolic stop and reverse) indicator_sar_14 = ta.sar(sar_start_value, sar_incrimant_value, sar_mac_value)[middle_sar_14, upper_sar_14, lower_sar_14] = ta.bb(indicator_sar_14, 5, 4)bb_gap_of_sar_14 = indicator_sar_14 - middle_sar_14st_dev_of_bb_gap_of_sar_14 = ta.stdev(bb_gap_of_sar_14, look_back_period)st_dev_of_indicator_sar_14 = ta.stdev(indicator_sar_14, look_back_period)corelation_btw_price_avg_14_and_indicator_sar_14 = ta.correlation(indicator_sar_14,price_avg_14,look_back_period)first_degree_indicator_sar_14 = st_dev_of_indicator_sar_14 * corelation_btw_price_avg_14_and_indicator_sar_14 //Supertrend (ST)var float st_line = 0[supertrend, direction] = ta.supertrend(ST_factor_value, ST_art_period_value)up_direction = direction < 0 ? supertrend : nadown_direction = direction < 0? na : supertrendif up_direction > 0    st_line := up_directionelse    st_line := down_directionindicator_st_14 = st_line[middle_st_14, upper_st_14, lower_st_14] = ta.bb(indicator_st_14, 5, 4)bb_gap_of_st_14 = indicator_st_14 - middle_st_14st_dev_of_bb_gap_of_st_14 = ta.stdev(bb_gap_of_st_14, look_back_period)st_dev_of_indicator_st_14 = ta.stdev(indicator_st_14, look_back_period)corelation_btw_price_avg_14_and_indicator_st_14 = ta.correlation(indicator_st_14,price_avg_14,look_back_period)first_degree_indicator_st_14 = st_dev_of_indicator_st_14 * corelation_btw_price_avg_14_and_indicator_st_14//Relative strength index (RSI)indicator_rsi_14 = ta.rsi(source_of_rsi,look_back_period)[middle_rsi_14, upper_rsi_14, lower_rsi_14] = ta.bb(indicator_rsi_14, 5, 4)bb_gap_of_rsi_14 = indicator_rsi_14 - middle_rsi_14st_dev_of_bb_gap_of_rsi_14 = ta.stdev(bb_gap_of_rsi_14, look_back_period)st_dev_of_indicator_rsi_14 = ta.stdev(indicator_rsi_14, look_back_period)corelation_btw_price_avg_14_and_indicator_rsi_14 = ta.correlation(indicator_rsi_14,price_avg_14,look_back_period)first_degree_indicator_rsi_14 = st_dev_of_indicator_rsi_14 * corelation_btw_price_avg_14_and_indicator_rsi_14 * st_dev_of_bb_gap_of_rsi_14//Money flow index (MFI)indicator_mfi_14 = ta.mfi(source_of_mfi,look_back_period)[middle_mfi_14, upper_mfi_14, lower_mfi_14] = ta.bb(indicator_mfi_14, 5, 4)bb_gap_of_mfi_14 = indicator_mfi_14 - middle_mfi_14st_dev_of_bb_gap_of_mfi_14 = ta.stdev(bb_gap_of_mfi_14, look_back_period)st_dev_of_indicator_mfi_14 = ta.stdev(indicator_mfi_14, look_back_period)corelation_btw_price_avg_14_and_indicator_mfi_14 = ta.correlation(indicator_mfi_14,price_avg_14,look_back_period)first_degree_indicator_mfi_14 = st_dev_of_indicator_mfi_14 * corelation_btw_price_avg_14_and_indicator_mfi_14 * st_dev_of_bb_gap_of_mfi_14//Balance of Power (BOP)var float bop_f = 0bop_nf = ta.linreg((((close - open) / (high - low) * 100)+100)/2, look_back_period, 0)if bop_calculation == 'Lenior regression'    bop_f := bop_nfelse if bop_calculation == 'Simple Moving Average (SMA)'    bop_f := ta.sma(bop_nf, look_back_period)else if bop_calculation == 'Exponentially Weighted Moving Average (EMA)'    bop_f := ta.ema(bop_nf, look_back_period)else if bop_calculation == 'Hull Moving Average (HMA)'    bop_f := ta.hma(bop_nf, look_back_period)else if bop_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    bop_f := ta.rma(bop_nf, look_back_period)else if bop_calculation == 'Weighted Moving Average (WMA)'    bop_f := ta.wma(bop_nf, look_back_period)else if bop_calculation == 'Arnaud Legoux Moving Average (ALMA)'    bop_f := ta.alma(bop_nf, look_back_period,0,3)else if bop_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    bop_f := ta.swma(bop_nf)else if bop_calculation == 'Volume-weighted Moving Average (VWMA)'    bop_f := ta.vwma(bop_nf, look_back_period)indicator_bop_14 = bop_f[middle_bop_14, upper_bop_14, lower_bop_14] = ta.bb(indicator_bop_14, 5, 4)bb_gap_of_bop_14 = indicator_bop_14 - middle_bop_14st_dev_of_bb_gap_of_bop_14 = ta.stdev(bb_gap_of_bop_14, look_back_period)st_dev_of_indicator_bop_14 = ta.stdev(indicator_bop_14, look_back_period)corelation_btw_price_avg_14_and_indicator_bop_14 = ta.correlation(indicator_bop_14,price_avg_14,look_back_period)first_degree_indicator_bop_14 = st_dev_of_indicator_bop_14 * corelation_btw_price_avg_14_and_indicator_bop_14 * st_dev_of_bb_gap_of_bop_14//Chande Momentum Oscillatorindicator_mom_14 = ta.cmo(source_of_mom,look_back_period)[middle_mom_14, upper_mom_14, lower_mom_14] = ta.bb(indicator_mom_14, 5, 4)bb_gap_of_mom_14 = indicator_mom_14 - middle_mom_14st_dev_of_bb_gap_of_mom_14 = ta.stdev(bb_gap_of_mom_14, look_back_period)st_dev_of_indicator_mom_14 = ta.stdev(indicator_mom_14, look_back_period)corelation_btw_price_avg_14_and_indicator_mom_14 = ta.correlation(indicator_mom_14,price_avg_14,look_back_period)first_degree_indicator_mom_14 = st_dev_of_indicator_mom_14 * corelation_btw_price_avg_14_and_indicator_mom_14 * st_dev_of_bb_gap_of_mom_14//Center of Gravity (COG)indicator_cog_14 = ta.cog(source_of_cog,look_back_period)[middle_cog_14, upper_cog_14, lower_cog_14] = ta.bb(indicator_cog_14, 5, 4)bb_gap_of_cog_14 = indicator_cog_14 - middle_cog_14st_dev_of_bb_gap_of_cog_14 = ta.stdev(bb_gap_of_cog_14, look_back_period)st_dev_of_indicator_cog_14 = ta.stdev(indicator_cog_14, look_back_period)corelation_btw_price_avg_14_and_indicator_cog_14 = ta.correlation(indicator_cog_14,price_avg_14,look_back_period)first_degree_indicator_cog_14 = st_dev_of_indicator_cog_14 * corelation_btw_price_avg_14_and_indicator_cog_14 * st_dev_of_bb_gap_of_cog_14//Directional Movement Index (DMI)[diplus, diminus,indicator_dmi_14] = ta.dmi(dmi_di_length, dmi_adx_smoothing_length)[middle_dmi_14, upper_dmi_14, lower_dmi_14] = ta.bb(indicator_dmi_14, 5, 4)bb_gap_of_dmi_14 = indicator_dmi_14 - middle_dmi_14st_dev_of_bb_gap_of_dmi_14 = ta.stdev(bb_gap_of_dmi_14, look_back_period)st_dev_of_indicator_dmi_14 = ta.stdev(indicator_dmi_14, look_back_period)corelation_btw_price_avg_14_and_indicator_dmi_14 = ta.correlation(indicator_dmi_14,price_avg_14,look_back_period)first_degree_indicator_dmi_14 = st_dev_of_indicator_dmi_14 * corelation_btw_price_avg_14_and_indicator_dmi_14 * st_dev_of_bb_gap_of_dmi_14//Stochasticstoch_nf = ta.stoch(source_of_stoch, high, low, look_back_period)var float stoch_f = 0if stoch_calculation == 'Lenior regression'    stoch_f := ta.linreg(stoch_nf, look_back_period, 0)else if stoch_calculation == 'Simple Moving Average (SMA)'    stoch_f := ta.sma(stoch_nf, look_back_period)else if stoch_calculation == 'Exponentially Weighted Moving Average (EMA)'    stoch_f := ta.ema(stoch_nf, look_back_period)else if stoch_calculation == 'Hull Moving Average (HMA)'    stoch_f := ta.hma(stoch_nf, look_back_period)else if stoch_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    stoch_f := ta.rma(stoch_nf, look_back_period)else if stoch_calculation == 'Weighted Moving Average (WMA)'    stoch_f := ta.wma(stoch_nf, look_back_period)else if stoch_calculation == 'Arnaud Legoux Moving Average (ALMA)'    stoch_f := ta.alma(stoch_nf, look_back_period,0,3)else if stoch_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    stoch_f := ta.swma(stoch_nf)else if stoch_calculation == 'Volume-weighted Moving Average (VWMA)'    stoch_f := ta.vwma(stoch_nf, look_back_period)indicator_stoch_14 = stoch_f[middle_stoch_14, upper_stoch_14, lower_stoch_14] = ta.bb(indicator_stoch_14, 5, 4)bb_gap_of_stoch_14 = indicator_stoch_14 - middle_stoch_14st_dev_of_bb_gap_of_stoch_14 = ta.stdev(bb_gap_of_stoch_14, look_back_period)st_dev_of_indicator_stoch_14 = ta.stdev(indicator_stoch_14, look_back_period)corelation_btw_price_avg_14_and_indicator_stoch_14 = ta.correlation(indicator_stoch_14,price_avg_14,look_back_period)first_degree_indicator_stoch_14 = st_dev_of_indicator_stoch_14 * corelation_btw_price_avg_14_and_indicator_stoch_14 * st_dev_of_bb_gap_of_stoch_14//Symmetrically weighted moving average with fixed lengthswma_nf = ta.swma(source_of_swma)var float swma_f = 0if swma_calculation == 'Lenior regression'    swma_f := ta.linreg(swma_nf, look_back_period, 0)else if swma_calculation == 'Simple Moving Average (SMA)'    swma_f := ta.sma(swma_nf, look_back_period)else if swma_calculation == 'Exponentially Weighted Moving Average (EMA)'    swma_f := ta.ema(swma_nf, look_back_period)else if swma_calculation == 'Hull Moving Average (HMA)'    swma_f := ta.hma(swma_nf, look_back_period)else if swma_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    swma_f := ta.rma(swma_nf, look_back_period)else if swma_calculation == 'Weighted Moving Average (WMA)'    swma_f := ta.wma(swma_nf, look_back_period)else if swma_calculation == 'Arnaud Legoux Moving Average (ALMA)'    swma_f := ta.alma(swma_nf, look_back_period,0,3)else if swma_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    swma_f := ta.swma(swma_nf)else if swma_calculation == 'Volume-weighted Moving Average (VWMA)'    swma_f := ta.vwma(swma_nf, look_back_period)indicator_swma_14 = swma_f[middle_swma_14, upper_swma_14, lower_swma_14] = ta.bb(indicator_swma_14, 5, 4)bb_gap_of_swma_14 = indicator_swma_14 - middle_swma_14st_dev_of_bb_gap_of_swma_14 = ta.stdev(bb_gap_of_swma_14, look_back_period)st_dev_of_indicator_swma_14 = ta.stdev(indicator_swma_14, look_back_period)corelation_btw_price_avg_14_and_indicator_swma_14 = ta.correlation(indicator_swma_14,price_avg_14,look_back_period)first_degree_indicator_swma_14 = st_dev_of_indicator_swma_14 * corelation_btw_price_avg_14_and_indicator_swma_14 *  st_dev_of_bb_gap_of_swma_14//True strength index (TSI)indicator_tsi_14 = ta.tsi(source_of_tsi, tsi_short_length, tsi_long_length)[middle_tsi_14, upper_tsi_14, lower_tsi_14] = ta.bb(indicator_tsi_14, 5, 4)bb_gap_of_tsi_14 = indicator_tsi_14 - middle_tsi_14st_dev_of_bb_gap_of_tsi_14 = ta.stdev(bb_gap_of_tsi_14, look_back_period)st_dev_of_indicator_tsi_14 = ta.stdev(indicator_tsi_14, look_back_period)corelation_btw_price_avg_14_and_indicator_tsi_14 = ta.correlation(indicator_tsi_14,price_avg_14,look_back_period)first_degree_indicator_tsi_14 = st_dev_of_indicator_tsi_14 * corelation_btw_price_avg_14_and_indicator_tsi_14 * st_dev_of_bb_gap_of_tsi_14//Williams %Rvar float wpr_f = 0wpr_nf = ta.wpr(look_back_period)if wpr_calculation == 'NONE'    wpr_f := wpr_nfelse if wpr_calculation == 'Lenior regression'    wpr_f := ta.linreg(wpr_nf, look_back_period, 0)else if wpr_calculation == 'Simple Moving Average (SMA)'    wpr_f := ta.sma(wpr_nf, look_back_period)else if wpr_calculation == 'Exponentially Weighted Moving Average (EMA)'    wpr_f := ta.ema(wpr_nf, look_back_period)else if wpr_calculation == 'Hull Moving Average (HMA)'    wpr_f := ta.hma(wpr_nf, look_back_period)else if wpr_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    wpr_f := ta.rma(wpr_nf, look_back_period)else if wpr_calculation == 'Weighted Moving Average (WMA)'    wpr_f := ta.wma(wpr_nf, look_back_period)else if wpr_calculation == 'Arnaud Legoux Moving Average (ALMA)'    wpr_f := ta.alma(wpr_nf, look_back_period,0,3)else if wpr_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    wpr_f := ta.swma(wpr_nf)else if wpr_calculation == 'Volume-weighted Moving Average (VWMA)'    wpr_f := ta.vwma(wpr_nf, look_back_period)indicator_wpr_14 = wpr_f[middle_wpr_14, upper_wpr_14, lower_wpr_14] = ta.bb(indicator_wpr_14, 5, 4)bb_gap_of_wpr_14 = indicator_wpr_14 - middle_wpr_14st_dev_of_bb_gap_of_wpr_14 = ta.stdev(bb_gap_of_wpr_14, look_back_period)st_dev_of_indicator_wpr_14 = ta.stdev(indicator_wpr_14, look_back_period)corelation_btw_price_avg_14_and_indicator_wpr_14 = ta.correlation(indicator_wpr_14,price_avg_14,look_back_period)first_degree_indicator_wpr_14 = st_dev_of_indicator_wpr_14 * corelation_btw_price_avg_14_and_indicator_wpr_14 * st_dev_of_bb_gap_of_wpr_14//Accumulation/distribution indexvar float accdist_f = 0accdist_nf = ta.accdistif accdist_calculation == 'NONE'    accdist_f := accdist_nfelse if accdist_calculation == 'Lenior regression'    accdist_f := ta.linreg(accdist_nf, look_back_period, 0)else if accdist_calculation == 'Simple Moving Average (SMA)'    accdist_f := ta.sma(accdist_nf, look_back_period)else if accdist_calculation == 'Exponentially Weighted Moving Average (EMA)'    accdist_f := ta.ema(accdist_nf, look_back_period)else if accdist_calculation == 'Hull Moving Average (HMA)'    accdist_f := ta.hma(accdist_nf, look_back_period)else if accdist_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    accdist_f := ta.rma(accdist_nf, look_back_period)else if accdist_calculation == 'Weighted Moving Average (WMA)'    accdist_f := ta.wma(accdist_nf, look_back_period)else if accdist_calculation == 'Arnaud Legoux Moving Average (ALMA)'    accdist_f := ta.alma(accdist_nf, look_back_period,0,3)else if accdist_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    accdist_f := ta.swma(accdist_nf)else if accdist_calculation == 'Volume-weighted Moving Average (VWMA)'    accdist_f := ta.vwma(accdist_nf, look_back_period)indicator_accdist_14 = accdist_f[middle_accdist_14, upper_accdist_14, lower_accdist_14] = ta.bb(indicator_accdist_14, 5, 4)bb_gap_of_accdist_14 = indicator_accdist_14 - middle_accdist_14st_dev_of_bb_gap_of_accdist_14 = ta.stdev(bb_gap_of_accdist_14, look_back_period)st_dev_of_indicator_accdist_14 = ta.stdev(indicator_accdist_14, look_back_period)corelation_btw_price_avg_14_and_indicator_accdist_14 = ta.correlation(indicator_accdist_14,price_avg_14,look_back_period)first_degree_indicator_accdist_14 = st_dev_of_indicator_accdist_14 * corelation_btw_price_avg_14_and_indicator_accdist_14 * st_dev_of_bb_gap_of_accdist_14//Intraday Intensity Indexvar float iii_f = 0iii_nf = ta.iiiif iii_calculation == 'NONE'    iii_f := iii_nfelse if iii_calculation == 'Lenior regression'    iii_f := ta.linreg(iii_nf, look_back_period, 0)else if iii_calculation == 'Simple Moving Average (SMA)'    iii_f := ta.sma(iii_nf, look_back_period)else if iii_calculation == 'Exponentially Weighted Moving Average (EMA)'    iii_f := ta.ema(iii_nf, look_back_period)else if iii_calculation == 'Hull Moving Average (HMA)'    iii_f := ta.hma(iii_nf, look_back_period)else if iii_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    iii_f := ta.rma(iii_nf, look_back_period)else if iii_calculation == 'Weighted Moving Average (WMA)'    iii_f := ta.wma(iii_nf, look_back_period)else if iii_calculation == 'Arnaud Legoux Moving Average (ALMA)'    iii_f := ta.alma(iii_nf, look_back_period,0,3)else if iii_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    iii_f := ta.swma(iii_nf)else if iii_calculation == 'Volume-weighted Moving Average (VWMA)'    iii_f := ta.vwma(iii_nf, look_back_period)indicator_iii_14 = iii_f[middle_iii_14, upper_iii_14, lower_iii_14] = ta.bb(indicator_iii_14, 5, 4)bb_gap_of_iii_14 = indicator_iii_14 - middle_iii_14st_dev_of_bb_gap_of_iii_14 = ta.stdev(bb_gap_of_iii_14, look_back_period)st_dev_of_indicator_iii_14 = ta.stdev(indicator_iii_14, look_back_period)corelation_btw_price_avg_14_and_indicator_iii_14 = ta.correlation(indicator_iii_14,price_avg_14,look_back_period)first_degree_indicator_iii_14 = st_dev_of_indicator_iii_14 * corelation_btw_price_avg_14_and_indicator_iii_14 * st_dev_of_bb_gap_of_iii_14//Negative Volume Indexvar float nvi_f = 0nvi_nf = ta.nviif nvi_calculation == 'NONE'    nvi_f := nvi_nfelse if nvi_calculation == 'Lenior regression'    nvi_f := ta.linreg(nvi_nf, look_back_period, 0)else if nvi_calculation == 'Simple Moving Average (SMA)'    nvi_f := ta.sma(nvi_nf, look_back_period)else if nvi_calculation == 'Exponentially Weighted Moving Average (EMA)'    nvi_f := ta.ema(nvi_nf, look_back_period)else if nvi_calculation == 'Hull Moving Average (HMA)'    nvi_f := ta.hma(nvi_nf, look_back_period)else if nvi_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    nvi_f := ta.rma(nvi_nf, look_back_period)else if nvi_calculation == 'Weighted Moving Average (WMA)'    nvi_f := ta.wma(nvi_nf, look_back_period)else if nvi_calculation == 'Arnaud Legoux Moving Average (ALMA)'    nvi_f := ta.alma(nvi_nf, look_back_period,0,3)else if nvi_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    nvi_f := ta.swma(nvi_nf)else if nvi_calculation == 'Volume-weighted Moving Average (VWMA)'    nvi_f := ta.vwma(nvi_nf, look_back_period)indicator_nvi_14 = nvi_f[middle_nvi_14, upper_nvi_14, lower_nvi_14] = ta.bb(indicator_nvi_14, 5, 4)bb_gap_of_nvi_14 = indicator_nvi_14 - middle_nvi_14st_dev_of_bb_gap_of_nvi_14 = ta.stdev(bb_gap_of_nvi_14, look_back_period)st_dev_of_indicator_nvi_14 = ta.stdev(indicator_nvi_14, look_back_period)corelation_btw_price_avg_14_and_indicator_nvi_14 = ta.correlation(indicator_nvi_14,price_avg_14,look_back_period)first_degree_indicator_nvi_14 = st_dev_of_indicator_nvi_14 * corelation_btw_price_avg_14_and_indicator_nvi_14*st_dev_of_bb_gap_of_nvi_14//Positive Volume Indexvar float pvi_f = 0pvi_nf = ta.pviif pvi_calculation == 'NONE'    pvi_f := pvi_nfelse if pvi_calculation == 'Lenior regression'    pvi_f := ta.linreg(pvi_nf, look_back_period, 0)else if pvi_calculation == 'Simple Moving Average (SMA)'    pvi_f := ta.sma(pvi_nf, look_back_period)else if pvi_calculation == 'Exponentially Weighted Moving Average (EMA)'    pvi_f := ta.ema(pvi_nf, look_back_period)else if pvi_calculation == 'Hull Moving Average (HMA)'    pvi_f := ta.hma(pvi_nf, look_back_period)else if pvi_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    pvi_f := ta.rma(pvi_nf, look_back_period)else if pvi_calculation == 'Weighted Moving Average (WMA)'    pvi_f := ta.wma(pvi_nf, look_back_period)else if pvi_calculation == 'Arnaud Legoux Moving Average (ALMA)'    pvi_f := ta.alma(pvi_nf, look_back_period,0,3)else if pvi_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    pvi_f := ta.swma(pvi_nf)else if pvi_calculation == 'Volume-weighted Moving Average (VWMA)'    pvi_f := ta.vwma(pvi_nf, look_back_period)indicator_pvi_14 = pvi_f[middle_pvi_14, upper_pvi_14, lower_pvi_14] = ta.bb(indicator_pvi_14, 5, 4)bb_gap_of_pvi_14 = indicator_pvi_14 - middle_pvi_14st_dev_of_bb_gap_of_pvi_14 = ta.stdev(bb_gap_of_pvi_14, look_back_period)st_dev_of_indicator_pvi_14 = ta.stdev(indicator_pvi_14, look_back_period)corelation_btw_price_avg_14_and_indicator_pvi_14 = ta.correlation(indicator_pvi_14,price_avg_14,look_back_period)first_degree_indicator_pvi_14 = st_dev_of_indicator_pvi_14 * corelation_btw_price_avg_14_and_indicator_pvi_14*st_dev_of_bb_gap_of_pvi_14//On Balance Volumevar float obv_f = 0obv_nf = ta.obvif obv_calculation == 'NONE'    obv_f := obv_nfelse if obv_calculation == 'Lenior regression'    obv_f := ta.linreg(obv_nf, look_back_period, 0)else if obv_calculation == 'Simple Moving Average (SMA)'    obv_f := ta.sma(obv_nf, look_back_period)else if obv_calculation == 'Exponentially Weighted Moving Average (EMA)'    obv_f := ta.ema(obv_nf, look_back_period)else if obv_calculation == 'Hull Moving Average (HMA)'    obv_f := ta.hma(obv_nf, look_back_period)else if obv_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    obv_f := ta.rma(obv_nf, look_back_period)else if obv_calculation == 'Weighted Moving Average (WMA)'    obv_f := ta.wma(obv_nf, look_back_period)else if obv_calculation == 'Arnaud Legoux Moving Average (ALMA)'    obv_f := ta.alma(obv_nf, look_back_period,0,3)else if obv_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    obv_f := ta.swma(obv_nf)else if obv_calculation == 'Volume-weighted Moving Average (VWMA)'    obv_f := ta.vwma(obv_nf, look_back_period)indicator_obv_14 = obv_f[middle_obv_14, upper_obv_14, lower_obv_14] = ta.bb(indicator_obv_14, 5, 4)bb_gap_of_obv_14 = indicator_obv_14 - middle_obv_14st_dev_of_bb_gap_of_obv_14 = ta.stdev(bb_gap_of_obv_14, look_back_period)st_dev_of_indicator_obv_14 = ta.stdev(indicator_obv_14, look_back_period)corelation_btw_price_avg_14_and_indicator_obv_14 = ta.correlation(indicator_obv_14,price_avg_14,look_back_period)first_degree_indicator_obv_14 = st_dev_of_indicator_obv_14 * corelation_btw_price_avg_14_and_indicator_obv_14*st_dev_of_bb_gap_of_obv_14//Price-Volume Trendvar float pvt_f = 0pvt_nf = ta.pvtif pvt_calculation == 'NONE'    pvt_f := pvt_nfelse if pvt_calculation == 'Lenior regression'    pvt_f := ta.linreg(pvt_nf, look_back_period, 0)else if pvt_calculation == 'Simple Moving Average (SMA)'    pvt_f := ta.sma(pvt_nf, look_back_period)else if pvt_calculation == 'Exponentially Weighted Moving Average (EMA)'    pvt_f := ta.ema(pvt_nf, look_back_period)else if pvt_calculation == 'Hull Moving Average (HMA)'    pvt_f := ta.hma(pvt_nf, look_back_period)else if pvt_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    pvt_f := ta.rma(pvt_nf, look_back_period)else if pvt_calculation == 'Weighted Moving Average (WMA)'    pvt_f := ta.wma(pvt_nf, look_back_period)else if pvt_calculation == 'Arnaud Legoux Moving Average (ALMA)'    pvt_f := ta.alma(pvt_nf, look_back_period,0,3)else if pvt_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    pvt_f := ta.swma(pvt_nf)else if pvt_calculation == 'Volume-weighted Moving Average (VWMA)'    pvt_f := ta.vwma(pvt_nf, look_back_period)indicator_pvt_14 = pvt_f[middle_pvt_14, upper_pvt_14, lower_pvt_14] = ta.bb(indicator_pvt_14, 5, 4)bb_gap_of_pvt_14 = indicator_pvt_14 - middle_pvt_14st_dev_of_bb_gap_of_pvt_14 = ta.stdev(bb_gap_of_pvt_14, look_back_period)st_dev_of_indicator_pvt_14 = ta.stdev(indicator_pvt_14, look_back_period)corelation_btw_price_avg_14_and_indicator_pvt_14 = ta.correlation(indicator_pvt_14,price_avg_14,look_back_period)first_degree_indicator_pvt_14 = st_dev_of_indicator_pvt_14 * corelation_btw_price_avg_14_and_indicator_pvt_14*st_dev_of_bb_gap_of_pvt_14//True rangevar float tr_f = 0tr_nf = ta.trif tr_calculation == 'NONE'    tr_f := tr_nfelse if tr_calculation == 'Lenior regression'    tr_f := ta.linreg(tr_nf, look_back_period, 0)else if tr_calculation == 'Simple Moving Average (SMA)'    tr_f := ta.sma(tr_nf, look_back_period)else if tr_calculation == 'Exponentially Weighted Moving Average (EMA)'    tr_f := ta.ema(tr_nf, look_back_period)else if tr_calculation == 'Hull Moving Average (HMA)'    tr_f := ta.hma(tr_nf, look_back_period)else if tr_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    tr_f := ta.rma(tr_nf, look_back_period)else if tr_calculation == 'Weighted Moving Average (WMA)'    tr_f := ta.wma(tr_nf, look_back_period)else if tr_calculation == 'Arnaud Legoux Moving Average (ALMA)'    tr_f := ta.alma(tr_nf, look_back_period,0,3)else if tr_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    tr_f := ta.swma(tr_nf)else if tr_calculation == 'Volume-weighted Moving Average (VWMA)'    tr_f := ta.vwma(tr_nf, look_back_period)indicator_tr_14 = tr_f[middle_tr_14, upper_tr_14, lower_tr_14] = ta.bb(indicator_tr_14, 5, 4)bb_gap_of_tr_14 = indicator_tr_14 - middle_tr_14st_dev_of_bb_gap_of_tr_14 = ta.stdev(bb_gap_of_tr_14, look_back_period)st_dev_of_indicator_tr_14 = ta.stdev(indicator_tr_14, look_back_period)corelation_btw_price_avg_14_and_indicator_tr_14 = ta.correlation(indicator_tr_14,price_avg_14,look_back_period)first_degree_indicator_tr_14 = st_dev_of_indicator_tr_14 * corelation_btw_price_avg_14_and_indicator_tr_14*st_dev_of_bb_gap_of_tr_14//Volume-weighted average pricevar float vwap_f = 0vwap_nf = ta.vwapif vwap_calculation == 'NONE'    vwap_f := vwap_nfelse if vwap_calculation == 'Lenior regression'    vwap_f := ta.linreg(vwap_nf, look_back_period, 0)else if vwap_calculation == 'Simple Moving Average (SMA)'    vwap_f := ta.sma(vwap_nf, look_back_period)else if vwap_calculation == 'Exponentially Weighted Moving Average (EMA)'    vwap_f := ta.ema(vwap_nf, look_back_period)else if vwap_calculation == 'Hull Moving Average (HMA)'    vwap_f := ta.hma(vwap_nf, look_back_period)else if vwap_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    vwap_f := ta.rma(vwap_nf, look_back_period)else if vwap_calculation == 'Weighted Moving Average (WMA)'    vwap_f := ta.wma(vwap_nf, look_back_period)else if vwap_calculation == 'Arnaud Legoux Moving Average (ALMA)'    vwap_f := ta.alma(vwap_nf, look_back_period,0,3)else if vwap_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    vwap_f := ta.swma(vwap_nf)else if vwap_calculation == 'Volume-weighted Moving Average (VWMA)'    vwap_f := ta.vwma(vwap_nf, look_back_period)indicator_vwap_14 = vwap_f[middle_vwap_14, upper_vwap_14, lower_vwap_14] = ta.bb(indicator_vwap_14, 5, 4)bb_gap_of_vwap_14 = indicator_vwap_14 - middle_vwap_14st_dev_of_bb_gap_of_vwap_14 = ta.stdev(bb_gap_of_vwap_14, look_back_period)st_dev_of_indicator_vwap_14 = ta.stdev(indicator_vwap_14, look_back_period)corelation_btw_price_avg_14_and_indicator_vwap_14 = ta.correlation(indicator_vwap_14,price_avg_14,look_back_period)first_degree_indicator_vwap_14 = st_dev_of_indicator_vwap_14 * corelation_btw_price_avg_14_and_indicator_vwap_14*st_dev_of_bb_gap_of_vwap_14//Williams Accumulation/Distributionvar float wad_f = 0wad_nf = ta.wadif wad_calculation == 'NONE'    wad_f := wad_nfelse if wad_calculation == 'Lenior regression'    wad_f := ta.linreg(wad_nf, look_back_period, 0)else if wad_calculation == 'Simple Moving Average (SMA)'    wad_f := ta.sma(wad_nf, look_back_period)else if wad_calculation == 'Exponentially Weighted Moving Average (EMA)'    wad_f := ta.ema(wad_nf, look_back_period)else if wad_calculation == 'Hull Moving Average (HMA)'    wad_f := ta.hma(wad_nf, look_back_period)else if wad_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    wad_f := ta.rma(wad_nf, look_back_period)else if wad_calculation == 'Weighted Moving Average (WMA)'    wad_f := ta.wma(wad_nf, look_back_period)else if wad_calculation == 'Arnaud Legoux Moving Average (ALMA)'    wad_f := ta.alma(wad_nf, look_back_period,0,3)else if wad_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    wad_f := ta.swma(wad_nf)else if wad_calculation == 'Volume-weighted Moving Average (VWMA)'    wad_f := ta.vwma(wad_nf, look_back_period)indicator_wad_14 = wad_f[middle_wad_14, upper_wad_14, lower_wad_14] = ta.bb(indicator_wad_14, 5, 4)bb_gap_of_wad_14 = indicator_wad_14 - middle_wad_14st_dev_of_bb_gap_of_wad_14 = ta.stdev(bb_gap_of_wad_14, look_back_period)st_dev_of_indicator_wad_14 = ta.stdev(indicator_wad_14, look_back_period)corelation_btw_price_avg_14_and_indicator_wad_14 = ta.correlation(indicator_wad_14,price_avg_14,look_back_period)first_degree_indicator_wad_14 = st_dev_of_indicator_wad_14 * corelation_btw_price_avg_14_and_indicator_wad_14*st_dev_of_bb_gap_of_wad_14//Williams Variable Accumulation/Distributionvar float wvad_f = 0wvad_nf = ta.wvadif wvad_calculation == 'NONE'    wvad_f := wvad_nfelse if wvad_calculation == 'Lenior regression'    wvad_f := ta.linreg(wvad_nf, look_back_period, 0)else if wvad_calculation == 'Simple Moving Average (SMA)'    wvad_f := ta.sma(wvad_nf, look_back_period)else if wvad_calculation == 'Exponentially Weighted Moving Average (EMA)'    wvad_f := ta.ema(wvad_nf, look_back_period)else if wvad_calculation == 'Hull Moving Average (HMA)'    wvad_f := ta.hma(wvad_nf, look_back_period)else if wvad_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    wvad_f := ta.rma(wvad_nf, look_back_period)else if wvad_calculation == 'Weighted Moving Average (WMA)'    wvad_f := ta.wma(wvad_nf, look_back_period)else if wvad_calculation == 'Arnaud Legoux Moving Average (ALMA)'    wvad_f := ta.alma(wvad_nf, look_back_period,0,3)else if wvad_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    wvad_f := ta.swma(wvad_nf)else if wvad_calculation == 'Volume-weighted Moving Average (VWMA)'    wvad_f := ta.vwma(wvad_nf, look_back_period)indicator_wvad_14 = wvad_f[middle_wvad_14, upper_wvad_14, lower_wvad_14] = ta.bb(indicator_wvad_14, 5, 4)bb_gap_of_wvad_14 = indicator_wvad_14 - middle_wvad_14st_dev_of_bb_gap_of_wvad_14 = ta.stdev(bb_gap_of_wvad_14, look_back_period)st_dev_of_indicator_wvad_14 = ta.stdev(indicator_wvad_14, look_back_period)corelation_btw_price_avg_14_and_indicator_wvad_14 = ta.correlation(indicator_wvad_14,price_avg_14,look_back_period)first_degree_indicator_wvad_14 = st_dev_of_indicator_wvad_14 * corelation_btw_price_avg_14_and_indicator_wvad_14*st_dev_of_bb_gap_of_wvad_14//Simple Moving Averageindicator_sma_14 = ta.sma(source_of_sma,look_back_period) - ta.sma(source_of_sma,200)[middle_sma_14, upper_sma_14, lower_sma_14] = ta.bb(indicator_sma_14, 5, 4)bb_gap_of_sma_14 = indicator_sma_14 - middle_sma_14st_dev_of_bb_gap_of_sma_14 = ta.stdev(bb_gap_of_sma_14, look_back_period)st_dev_of_indicator_sma_14 = ta.stdev(indicator_sma_14, look_back_period)corelation_btw_price_avg_14_and_indicator_sma_14 = ta.correlation(indicator_sma_14,price_avg_14,look_back_period)first_degree_indicator_sma_14 = st_dev_of_indicator_sma_14 * corelation_btw_price_avg_14_and_indicator_sma_14*st_dev_of_bb_gap_of_sma_14//Exponential Moving Averageindicator_ema_14 = ta.ema(source_of_ema,look_back_period) - ta.sma(source_of_ema,200)[middle_ema_14, upper_ema_14, lower_ema_14] = ta.bb(indicator_ema_14, 5, 4)bb_gap_of_ema_14 = indicator_ema_14 - middle_ema_14st_dev_of_bb_gap_of_ema_14 = ta.stdev(bb_gap_of_ema_14, look_back_period)st_dev_of_indicator_ema_14 = ta.stdev(indicator_ema_14, look_back_period)corelation_btw_price_avg_14_and_indicator_ema_14 = ta.correlation(indicator_ema_14,price_avg_14,look_back_period)first_degree_indicator_ema_14 = st_dev_of_indicator_ema_14 * corelation_btw_price_avg_14_and_indicator_ema_14*st_dev_of_bb_gap_of_ema_14//CCI (commodity channel index)indicator_cci_14 = ta.cci(source_of_cci, look_back_period)[middle_cci_14, upper_cci_14, lower_cci_14] = ta.bb(indicator_cci_14, 5, 4)bb_gap_of_cci_14 = indicator_cci_14 - middle_cci_14st_dev_of_bb_gap_of_cci_14 = ta.stdev(bb_gap_of_cci_14, look_back_period)st_dev_of_indicator_cci_14 = ta.stdev(indicator_cci_14, look_back_period)corelation_btw_price_avg_14_and_indicator_cci_14 = ta.correlation(indicator_cci_14,price_avg_14,look_back_period)first_degree_indicator_cci_14 = st_dev_of_indicator_cci_14 * corelation_btw_price_avg_14_and_indicator_cci_14 * st_dev_of_bb_gap_of_cci_14//Chop Zonesource = source_of_czavg = source_of_cz_avgvar float ema34_f = 0cz_nf = ta.ema(source, 34)if cz_calculation == 'Lenior regression'    ema34_f := ta.linreg(cz_nf, look_back_period, 0)else if cz_calculation == 'Simple Moving Average (SMA)'    ema34_f := ta.sma(cz_nf, look_back_period)else if cz_calculation == 'Exponentially Weighted Moving Average (EMA)'    ema34_f := cz_nfelse if cz_calculation == 'Hull Moving Average (HMA)'    ema34_f := ta.hma(cz_nf, look_back_period)else if cz_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    ema34_f := ta.rma(cz_nf, look_back_period)else if cz_calculation == 'Weighted Moving Average (WMA)'    ema34_f := ta.wma(cz_nf, look_back_period)else if cz_calculation == 'Arnaud Legoux Moving Average (ALMA)'    ema34_f := ta.alma(cz_nf, look_back_period,0,3)else if cz_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    ema34_f := ta.swma(cz_nf)else if cz_calculation == 'Volume-weighted Moving Average (VWMA)'    ema34_f := ta.vwma(cz_nf, look_back_period)pi = math.atan(1) * 4periods = 30highestHigh = ta.highest(periods)lowestLow = ta.lowest(periods)span = 25 / (highestHigh - lowestLow) * lowestLowema34 = ema34_fx1_ema34 = 0x2_ema34 = 1y1_ema34 = 0y2_ema34 = (ema34[1] - ema34) / avg * spanc_ema34 = math.sqrt((x2_ema34 - x1_ema34)*(x2_ema34 - x1_ema34) + (y2_ema34 - y1_ema34)*(y2_ema34 - y1_ema34))emaAngle_1 = math.round(180 * math.acos((x2_ema34 - x1_ema34)/c_ema34) / pi)emaAngle = y2_ema34 > 0? - emaAngle_1: emaAngle_1indicator_chop_zone_14 = emaAngle[middle_chop_zone_14, upper_chop_zone_14, lower_chop_zone_14] = ta.bb(indicator_chop_zone_14, 5, 4)bb_gap_of_chop_zone_14 = indicator_chop_zone_14 - middle_chop_zone_14st_dev_of_bb_gap_of_chop_zone_14 = ta.stdev(bb_gap_of_chop_zone_14, look_back_period)st_dev_of_indicator_chop_zone_14 = ta.stdev(indicator_chop_zone_14, look_back_period)corelation_btw_price_avg_14_and_indicator_chop_zone_14 = ta.correlation(indicator_chop_zone_14,price_avg_14,look_back_period)first_degree_indicator_chop_zone_14 = st_dev_of_indicator_chop_zone_14 * corelation_btw_price_avg_14_and_indicator_chop_zone_14 * st_dev_of_bb_gap_of_chop_zone_14//Ease of Movementvar cumVol = 0.cumVol += nz(volume)if barstate.islast and cumVol == 0    runtime.error("No volume is provided by the data vendor.")div = 10000 //input.int(10000, title="Divisor", minval=1)eom_nf = (div * ta.change(source_of_eom) * (high - low) / volume)var float eom_f = 0if eom_calculation == 'Lenior regression'    eom_f := ta.linreg(eom_nf, look_back_period, 0)else if eom_calculation == 'Simple Moving Average (SMA)'    eom_f := ta.sma(eom_nf, look_back_period)else if eom_calculation == 'Exponentially Weighted Moving Average (EMA)'    eom_f := eom_nfelse if eom_calculation == 'Hull Moving Average (HMA)'    eom_f := ta.hma(eom_nf, look_back_period)else if eom_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    eom_f := ta.rma(eom_nf, look_back_period)else if eom_calculation == 'Weighted Moving Average (WMA)'    eom_f := ta.wma(eom_nf, look_back_period)else if eom_calculation == 'Arnaud Legoux Moving Average (ALMA)'    eom_f := ta.alma(eom_nf, look_back_period,0,3)else if eom_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    eom_f := ta.swma(eom_nf)else if eom_calculation == 'Volume-weighted Moving Average (VWMA)'    eom_f := ta.vwma(eom_nf, look_back_period)eom = eom_findicator_eom_14 = eom[middle_eom_14, upper_eom_14, lower_eom_14] = ta.bb(indicator_eom_14, 5, 4)bb_gap_of_eom_14 = indicator_eom_14 - middle_eom_14st_dev_of_bb_gap_of_eom_14 = ta.stdev(bb_gap_of_eom_14, look_back_period)st_dev_of_indicator_eom_14 = ta.stdev(indicator_eom_14, look_back_period)corelation_btw_price_avg_14_and_indicator_eom_14 = ta.correlation(indicator_eom_14,price_avg_14,look_back_period)first_degree_indicator_eom_14 = st_dev_of_indicator_eom_14 * corelation_btw_price_avg_14_and_indicator_eom_14 * st_dev_of_bb_gap_of_eom_14//Detrended Price Oscillatorvar float ma_f = 0ma_nf = ta.sma(source_of_dpo, look_back_period)if dpo_calculation == 'Lenior regression'    ma_f:= ta.linreg(ma_nf, look_back_period, 0)else if dpo_calculation == 'Simple Moving Average (SMA)'    ma_f:= ta.sma(source_of_dpo, look_back_period)else if dpo_calculation == 'Exponentially Weighted Moving Average (EMA)'    ma_f:= ta.ema(source_of_dpo, look_back_period)else if dpo_calculation == 'Hull Moving Average (HMA)'    ma_f:= ta.hma(source_of_dpo, look_back_period)else if dpo_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    ma_f:= ta.rma(source_of_dpo, look_back_period)else if dpo_calculation == 'Weighted Moving Average (WMA)'    ma_f:= ta.wma(source_of_dpo, look_back_period)else if dpo_calculation == 'Arnaud Legoux Moving Average (ALMA)'    ma_f:= ta.alma(source_of_dpo, look_back_period,0,3)else if dpo_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    ma_f:= ta.swma(source_of_dpo)else if dpo_calculation == 'Volume-weighted Moving Average (VWMA)'    ma_f:= ta.vwma(source_of_dpo, look_back_period)barsback = look_back_period/2 + 1ma = ma_fdpo = isCentered ? close[barsback] - ma : close - ma[barsback]indicator_dpo_14 = dpo[middle_dpo_14, upper_dpo_14, lower_dpo_14] = ta.bb(indicator_dpo_14, 5, 4)bb_gap_of_dpo_14 = indicator_dpo_14 - middle_dpo_14st_dev_of_bb_gap_of_dpo_14 = ta.stdev(bb_gap_of_dpo_14, look_back_period)st_dev_of_indicator_dpo_14 = ta.stdev(indicator_dpo_14, look_back_period)corelation_btw_price_avg_14_and_indicator_dpo_14 = ta.correlation(indicator_dpo_14,price_avg_14,look_back_period)first_degree_indicator_dpo_14 = st_dev_of_indicator_dpo_14 * corelation_btw_price_avg_14_and_indicator_dpo_14 * st_dev_of_bb_gap_of_dpo_14//Advance Decline Linesym(s) => request.security(s, timeframe.period, source_of_adl)difference = (sym("USI:ADVN.NY") - sym("USI:DECL.NY"))/(sym("USI:UNCH.NY") + 1)adline = ta.cum(difference > 0 ? math.sqrt(difference) : -math.sqrt(-difference))indicator_adl_14 = adline[middle_adl_14, upper_adl_14, lower_adl_14] = ta.bb(indicator_adl_14, 5, 4)bb_gap_of_adl_14 = indicator_adl_14 - middle_adl_14st_dev_of_bb_gap_of_adl_14 = ta.stdev(bb_gap_of_adl_14, look_back_period)st_dev_of_indicator_adl_14 = ta.stdev(indicator_adl_14, look_back_period)corelation_btw_price_avg_14_and_indicator_adl_14 = ta.correlation(indicator_adl_14,price_avg_14,look_back_period)first_degree_indicator_adl_14 = st_dev_of_indicator_adl_14 * corelation_btw_price_avg_14_and_indicator_adl_14 * st_dev_of_bb_gap_of_adl_14//Bull Bear Powervar float bullp_f = 0var float bearp_f = 0bullp_nf = ta.ema(source_of_cal_bullp, look_back_period)bearp_nf = ta.ema(source_of_cal_bullp, look_back_period)if bullp_calculation == 'Lenior regression'    bullp_f := ta.linreg(bullp_nf, look_back_period, 0)else if bullp_calculation == 'Simple Moving Average (SMA)'    bullp_f := ta.sma(source_of_bullp, look_back_period)else if bullp_calculation == 'Exponentially Weighted Moving Average (EMA)'    bullp_f := ta.ema(source_of_bullp, look_back_period)else if bullp_calculation == 'Hull Moving Average (HMA)'    bullp_f := ta.hma(source_of_bullp, look_back_period)else if bullp_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    bullp_f := ta.rma(source_of_bullp, look_back_period)else if bullp_calculation == 'Weighted Moving Average (WMA)'    bullp_f := ta.wma(source_of_bullp, look_back_period)else if bullp_calculation == 'Arnaud Legoux Moving Average (ALMA)'    bullp_f := ta.alma(source_of_bullp, look_back_period,0,3)else if bullp_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    bullp_f := ta.swma(source_of_bullp)else if bullp_calculation == 'Volume-weighted Moving Average (VWMA)'    bullp_f := ta.vwma(source_of_bullp, look_back_period)if bearp_calculation == 'Lenior regression'    bearp_f := ta.linreg(bearp_nf, look_back_period, 0)else if bearp_calculation == 'Simple Moving Average (SMA)'    bearp_f := ta.sma(source_of_bearp, look_back_period)else if bearp_calculation == 'Exponentially Weighted Moving Average (EMA)'    bearp_f := ta.ema(source_of_bearp, look_back_period)else if bearp_calculation == 'Hull Moving Average (HMA)'    bearp_f := ta.hma(source_of_bearp, look_back_period)else if bearp_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    bearp_f := ta.rma(source_of_bearp, look_back_period)else if bearp_calculation == 'Weighted Moving Average (WMA)'    bearp_f := ta.wma(source_of_bearp, look_back_period)else if bearp_calculation == 'Arnaud Legoux Moving Average (ALMA)'    bearp_f := ta.alma(source_of_bearp, look_back_period,0,3)else if bearp_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    bearp_f := ta.swma(source_of_bearp)else if bearp_calculation == 'Volume-weighted Moving Average (VWMA)'    bearp_f := ta.vwma(source_of_bearp, look_back_period)bullPower = source_of_bullp - bullp_fbearPower = source_of_bearp - bearp_findicator_bbp_14 = bullPower + bearPower[middle_bbp_14, upper_bbp_14, lower_bbp_14] = ta.bb(indicator_bbp_14, 5, 4)bb_gap_of_bbp_14 = indicator_bbp_14 - middle_bbp_14st_dev_of_bb_gap_of_bbp_14 = ta.stdev(bb_gap_of_bbp_14, look_back_period)st_dev_of_indicator_bbp_14 = ta.stdev(indicator_bbp_14, look_back_period)corelation_btw_price_avg_14_and_indicator_bbp_14 = ta.correlation(indicator_bbp_14,price_avg_14,look_back_period)first_degree_indicator_bbp_14 = st_dev_of_indicator_bbp_14 * corelation_btw_price_avg_14_and_indicator_bbp_14 * st_dev_of_bb_gap_of_bbp_14//highvar float high_f = 0if high_impact_calculation == 'Lenior regression'    high_f := ta.linreg(high, look_back_period, 0)else if high_impact_calculation == 'Simple Moving Average (SMA)'    high_f := ta.sma(high, look_back_period)else if high_impact_calculation == 'Exponentially Weighted Moving Average (EMA)'    high_f := ta.ema(high, look_back_period)else if high_impact_calculation == 'Hull Moving Average (HMA)'    high_f := ta.hma(high, look_back_period)else if high_impact_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    high_f := ta.rma(high, look_back_period)else if high_impact_calculation == 'Weighted Moving Average (WMA)'    high_f := ta.wma(high, look_back_period)else if high_impact_calculation == 'Arnaud Legoux Moving Average (ALMA)'    high_f := ta.alma(high, look_back_period,0,3)else if high_impact_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    high_f := ta.swma(high)else if high_impact_calculation == 'Volume-weighted Moving Average (VWMA)'    high_f := ta.vwma(high, look_back_period)indicator_high_14 = high_f[middle_high_14, upper_high_14, lower_high_14] = ta.bb(indicator_high_14, 5, 4)bb_gap_of_high_14 = indicator_high_14 - middle_high_14st_dev_of_bb_gap_of_high_14 = ta.stdev(bb_gap_of_high_14, look_back_period)st_dev_of_indicator_high_14 = ta.stdev(indicator_high_14, look_back_period)corelation_btw_price_avg_14_and_indicator_high_14 = ta.correlation(indicator_high_14,price_avg_14,look_back_period)first_degree_indicator_high_14 = st_dev_of_indicator_high_14 * corelation_btw_price_avg_14_and_indicator_high_14 * st_dev_of_bb_gap_of_high_14//lowvar float low_f = 0if low_impact_calculation == 'Lenior regression'    low_f := ta.linreg(low, look_back_period, 0)else if low_impact_calculation == 'Simple Moving Average (SMA)'    low_f := ta.sma(low, look_back_period)else if low_impact_calculation == 'Exponentially Weighted Moving Average (EMA)'    low_f := ta.ema(low, look_back_period)else if low_impact_calculation == 'Hull Moving Average (HMA)'    low_f := ta.hma(low, look_back_period)else if low_impact_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    low_f := ta.rma(low, look_back_period)else if low_impact_calculation == 'Weighted Moving Average (WMA)'    low_f := ta.wma(low, look_back_period)else if low_impact_calculation == 'Arnaud Legoux Moving Average (ALMA)'    low_f := ta.alma(low, look_back_period,0,3)else if low_impact_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    low_f := ta.swma(low)else if low_impact_calculation == 'Volume-weighted Moving Average (VWMA)'    low_f := ta.vwma(low, look_back_period)indicator_low_14 = low_f[middle_low_14, upper_low_14, lower_low_14] = ta.bb(indicator_low_14, 5, 4)bb_gap_of_low_14 = indicator_low_14 - middle_low_14st_dev_of_bb_gap_of_low_14 = ta.stdev(bb_gap_of_low_14, look_back_period)st_dev_of_indicator_low_14 = ta.stdev(indicator_low_14, look_back_period)corelation_btw_price_avg_14_and_indicator_low_14 = ta.correlation(indicator_low_14,price_avg_14,look_back_period)first_degree_indicator_low_14 = st_dev_of_indicator_low_14 * corelation_btw_price_avg_14_and_indicator_low_14 * st_dev_of_bb_gap_of_low_14//openvar float open_f = 0if open_impact_calculation == 'Lenior regression'    open_f := ta.linreg(open, look_back_period, 0)else if open_impact_calculation == 'Simple Moving Average (SMA)'    open_f := ta.sma(open, look_back_period)else if open_impact_calculation == 'Exponentially Weighted Moving Average (EMA)'    open_f := ta.ema(open, look_back_period)else if open_impact_calculation == 'Hull Moving Average (HMA)'    open_f := ta.hma(open, look_back_period)else if open_impact_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    open_f := ta.rma(open, look_back_period)else if open_impact_calculation == 'Weighted Moving Average (WMA)'    open_f := ta.wma(open, look_back_period)else if open_impact_calculation == 'Arnaud Legoux Moving Average (ALMA)'    open_f := ta.alma(open, look_back_period,0,3)else if open_impact_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    open_f := ta.swma(open)else if open_impact_calculation == 'Volume-weighted Moving Average (VWMA)'    open_f := ta.vwma(open, look_back_period)indicator_open_14 = open_f[middle_open_14, upper_open_14, lower_open_14] = ta.bb(indicator_open_14, 5, 4)bb_gap_of_open_14 = indicator_open_14 - middle_open_14st_dev_of_bb_gap_of_open_14 = ta.stdev(bb_gap_of_open_14, look_back_period)st_dev_of_indicator_open_14 = ta.stdev(indicator_open_14, look_back_period)corelation_btw_price_avg_14_and_indicator_open_14 = ta.correlation(indicator_open_14,price_avg_14,look_back_period)first_degree_indicator_open_14 = st_dev_of_indicator_open_14 * corelation_btw_price_avg_14_and_indicator_open_14 * st_dev_of_bb_gap_of_open_14//closevar float close_f = 0if close_impact_calculation == 'Lenior regression'    close_f := ta.linreg(close, look_back_period, 0)else if close_impact_calculation == 'Simple Moving Average (SMA)'    close_f := ta.sma(close, look_back_period)else if close_impact_calculation == 'Exponentially Weighted Moving Average (EMA)'    close_f := ta.ema(close, look_back_period)else if close_impact_calculation == 'Hull Moving Average (HMA)'    close_f := ta.hma(close, look_back_period)else if close_impact_calculation == 'Exponentially Weighted Moving average with alpha length (RMA)'    close_f := ta.rma(close, look_back_period)else if close_impact_calculation == 'Weighted Moving Average (WMA)'    close_f := ta.wma(close, look_back_period)else if close_impact_calculation == 'Arnaud Legoux Moving Average (ALMA)'    close_f := ta.alma(close, look_back_period,0,3)else if close_impact_calculation == 'Symmetrically weighted moving average with fixed length (SWMA)'    close_f := ta.swma(close)else if close_impact_calculation == 'Volume-weighted Moving Average (VWMA)'    close_f := ta.vwma(close, look_back_period)indicator_close_14 = close_f[middle_close_14, upper_close_14, lower_close_14] = ta.bb(indicator_close_14, 5, 4)bb_gap_of_close_14 = indicator_close_14 - middle_close_14st_dev_of_bb_gap_of_close_14 = ta.stdev(bb_gap_of_close_14, look_back_period)st_dev_of_indicator_close_14 = ta.stdev(indicator_close_14, look_back_period)corelation_btw_price_avg_14_and_indicator_close_14 = ta.correlation(indicator_close_14,price_avg_14,look_back_period)first_degree_indicator_close_14 = st_dev_of_indicator_close_14 * corelation_btw_price_avg_14_and_indicator_close_14 * st_dev_of_bb_gap_of_close_14//Primary indicatorall_indicators_final_graph = first_degree_indicator_sar_14 + first_degree_indicator_st_14 + first_degree_indicator_rsi_14 + first_degree_indicator_mfi_14 + first_degree_indicator_bop_14 + first_degree_indicator_mom_14 + first_degree_indicator_cog_14+ first_degree_indicator_dmi_14 + first_degree_indicator_stoch_14 + first_degree_indicator_swma_14 + first_degree_indicator_wpr_14 + first_degree_indicator_tsi_14 + first_degree_indicator_iii_14 + first_degree_indicator_nvi_14 + first_degree_indicator_pvi_14 + first_degree_indicator_obv_14 + first_degree_indicator_accdist_14 + first_degree_indicator_pvt_14 + first_degree_indicator_tr_14 + first_degree_indicator_vwap_14 + first_degree_indicator_wad_14 + first_degree_indicator_sma_14 + first_degree_indicator_ema_14 + first_degree_indicator_cci_14 + first_degree_indicator_chop_zone_14 + first_degree_indicator_eom_14 + first_degree_indicator_dpo_14 + first_degree_indicator_adl_14 + first_degree_indicator_bbp_14 + first_degree_indicator_high_14 + first_degree_indicator_low_14 + first_degree_indicator_open_14 + first_degree_indicator_close_14                                                                                                                                                                                             //st. dev, co-relation, degree of change and rate of change of primary indicatorst_dev_of_all_indicators_final_graph = ta.stdev(all_indicators_final_graph, look_back_period)corelation_btw_price_avg_14_and_all_indicators_final_graph = ta.correlation(all_indicators_final_graph,price_avg_14,look_back_period)first_degree_change_of_st_dev_of_all_indicators_final_graph = ta.change(all_indicators_final_graph, 2)first_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph = 100 * (ta.change(first_degree_change_of_st_dev_of_all_indicators_final_graph, 2)/ first_degree_change_of_st_dev_of_all_indicators_final_graph[1])final_graph_of_corelation = all_indicators_final_graph * corelation_btw_price_avg_14_and_all_indicators_final_graphfinal_graph_of_st_dev = corelation_btw_price_avg_14_and_all_indicators_final_graph * st_dev_of_all_indicators_final_graph//final_graph_of_corelationst_dev_of_final_graph_of_corelation = ta.stdev(final_graph_of_corelation, look_back_period)corelation_btw_price_avg_14_and_final_graph_of_corelation = ta.correlation(final_graph_of_corelation,price_avg_14,look_back_period)second_degree_change_of_st_dev_of_final_graph_of_corelation = ta.change(final_graph_of_corelation, 2)second_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph_1 = 100 * (ta.change(second_degree_change_of_st_dev_of_final_graph_of_corelation, 2)/ second_degree_change_of_st_dev_of_final_graph_of_corelation[1])second_degree_final_graph_of_corelation_one = final_graph_of_corelation * corelation_btw_price_avg_14_and_final_graph_of_corelationsecond_degree_final_graph_of_st_dev_one = corelation_btw_price_avg_14_and_final_graph_of_corelation * st_dev_of_final_graph_of_corelation//final_graph_of_st_devst_dev_of_final_graph_of_st_dev = ta.stdev(final_graph_of_st_dev, look_back_period)corelation_btw_price_avg_14_and_final_graph_of_st_dev = ta.correlation(final_graph_of_st_dev,price_avg_14,look_back_period)second_degree_change_of_st_dev_of_final_graph_of_st_dev = st_dev_of_final_graph_of_st_dev - st_dev_of_final_graph_of_st_dev [1] second_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph_2 = second_degree_change_of_st_dev_of_final_graph_of_st_dev - second_degree_change_of_st_dev_of_final_graph_of_st_dev[1]second_degree_final_graph_of_corelation_two = final_graph_of_st_dev * corelation_btw_price_avg_14_and_final_graph_of_st_devsecond_degree_final_graph_of_st_dev_two = corelation_btw_price_avg_14_and_final_graph_of_st_dev * st_dev_of_final_graph_of_st_dev//second_degree_final_graph_of_corelation_onest_dev_of_second_degree_final_graph_of_corelation_one = ta.stdev(second_degree_final_graph_of_corelation_one, look_back_period)corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_one = ta.correlation(second_degree_final_graph_of_corelation_one,price_avg_14,look_back_period)third_degree_final_graph_of_corelation_three = second_degree_final_graph_of_corelation_one  * corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_one//second_degree_final_graph_of_corelation_twost_dev_of_second_degree_final_graph_of_corelation_two = ta.stdev(second_degree_final_graph_of_corelation_two, look_back_period)corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_two = ta.correlation(second_degree_final_graph_of_corelation_two,price_avg_14,look_back_period)third_degree_final_graph_of_corelation_four = st_dev_of_second_degree_final_graph_of_corelation_two * corelation_btw_price_avg_14_and_second_degree_final_graph_of_corelation_two//final_graph_of_corelationchange_of_final_graph_of_corelation = final_graph_of_corelation - final_graph_of_corelation[1]second_level_change_of_change_of_final_graph_of_corelation = (change_of_final_graph_of_corelation - change_of_final_graph_of_corelation[1])*math.pow(ta.correlation(change_of_final_graph_of_corelation,price_avg_14,look_back_period),3)*ta.stdev(change_of_final_graph_of_corelation, look_back_period)//Graph Identificationshow_graph_1 = input.bool(defval = false, title = "(1) Show Cumilative graph(CG)", group = "Graphs")show_graph_2 = input.bool(defval = false, title = "(2) CG corelation to price", group = "Graphs")show_graph_3 = input.bool(defval = false, title = "(3) St dev of CG", group = "Graphs")show_graph_4 = input.bool(defval = false, title = "(4) Degree of change - CG", group = "Graphs")show_graph_5 = input.bool(defval = false, title = "(5) Rate of change - CG", inline = 'Graph 5', group = "Graphs")scale_of_graph_5 = input.int(defval = 1, title = "& scale (n) will be 10 to the power n", inline = 'Graph 5', group = "Graphs")show_graph_6 = input.bool(defval = false, title = "(6) Co-relation of CG (CCG), corelation to price", group = "Graphs")show_graph_7 = input.bool(defval = false, title = "(7) St dev of corelation of CCG", group = "Graphs")show_graph_8 = input.bool(defval = false, title = "(8) Degree of change - CCG", group = "Graphs")show_graph_9 = input.bool(defval = false, title = "(9) Rate of change - CCG", inline = 'Graph 9', group = "Graphs")scale_of_graph_9 = input.int(defval = 1, title = "& scale (n) will be 10 to the power n", inline = 'Graph 9', group = "Graphs")show_graph_10 = input.bool(defval = false, title = "(10) STDV of CG (SCG), corelation to price", group = "Graphs")show_graph_11 = input.bool(defval = false, title = "(11) St dev of corelation of SCG", group = "Graphs")show_graph_12 = input.bool(defval = false, title = "(12) Degree of change - SCG", group = "Graphs")show_graph_13 = input.bool(defval = false, title = "(13) Rate of change - SCG", inline = 'Graph 13', group = "Graphs")scale_of_graph_13 = input.int(defval = 1, title = "& scale (n) will be 10 to the power n", inline = 'Graph 13', group = "Graphs")show_graph_14 = input.bool(defval = false, title = "(14) Third degree cor to price", group = "Graphs")show_graph_15 = input.bool(defval = false, title = "(15) Third degree cor to price", group = "Graphs")show_graph_16 = input.bool(defval = false, title = "(16) Change of graph no 2", group = "Graphs")graph_1 = all_indicators_final_graphgraph_2 = final_graph_of_corelationgraph_3 = final_graph_of_st_devgraph_4 = first_degree_change_of_st_dev_of_all_indicators_final_graphgraph_5 = first_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graphgraph_6 = second_degree_final_graph_of_corelation_onegraph_7 = second_degree_final_graph_of_st_dev_onegraph_8 = second_degree_change_of_st_dev_of_final_graph_of_corelationgraph_9 = second_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph_1graph_10 = second_degree_final_graph_of_corelation_twograph_11 = second_degree_final_graph_of_st_dev_twograph_12 = second_degree_change_of_st_dev_of_final_graph_of_st_devgraph_13 = second_degree_of_rate_of_change_first_degree_change_of_st_dev_of_all_indicators_final_graph_2graph_14 = third_degree_final_graph_of_corelation_threegraph_15 = third_degree_final_graph_of_corelation_fourgraph_16 = second_level_change_of_change_of_final_graph_of_corelation//buy signal generationbuy_1 = price_falling and ta.crossunder(graph_7,0)buy_2 = price_falling and ta.cross(graph_11,0)buy_3 = price_falling and ta.cross(graph_5,0) and ta.cross(graph_9,0) and ta.cross(graph_13,0)buy_4 = price_falling and ta.cross(graph_4,0) and ta.cross(graph_8,0) and ta.cross(graph_12,0)buy_5 = price_falling and ta.cross(graph_2,0) and ta.cross(graph_3,0) and ta.cross(graph_4,0)buy_6 = price_falling and ta.cross(graph_4,graph_8) and ta.cross(graph_4,graph_12) and ta.cross(graph_12,graph_8)// Trading Arrangement//Buy and Sell rangehi_high = ta.highest(buy_comand_high_value,buy_or_sell_lookback)lowerlowest = ta.lowest(buy_comand_low_value,buy_or_sell_lookback)var  float hi_point = navar  float low_point = nafor i = 1 to 0 by 1    if hi_high[i] < hi_high[i+1]        hi_point := hi_high[i+1]        else if lowerlowest [i] > lowerlowest [i+1]        low_point := lowerlowest [i+1]//Trading Arrangement// Generate sell signalvar bool sell_comand = false[pinesupertrend, pinedirection] = ta.supertrend(factor_of_supertrend_to_determine_sell_comand, artperiod_of_supertrend_to_determine_sell_comand)if pinedirection[1] < 0 and pinedirection > 0    sell_comand := trueelse if pinedirection > 0 and (buy_1 or buy_2 or buy_3 or buy_4 or buy_5 or buy_6)    sell_comand := trueelse    sell_comand := false//Intermediate selling count & Count of open tradesvar int open_trades = 0var int x = 0if strategy.position_size == 0    open_trades := 0else if strategy.position_size[1] == 0 and strategy.position_size > 0    open_trades := 1else if strategy.position_size[1] < strategy.position_size    open_trades := open_trades + 1else if strategy.position_size[1] > strategy.position_size and strategy.position_size > 0    open_trades := open_trades - 1else    open_trades := open_tradesif strategy.position_size[1] < strategy.position_size and strategy.position_size[1] > 0    x := open_tradeselse if strategy.position_size[1] < strategy.position_size and strategy.position_size[1] == 0    x := 1else if strategy.position_size[1] > strategy.position_size and strategy.position_size > 0    x := x - 1else if strategy.position_size[1] > strategy.position_size and strategy.position_size == 0    x := 0else    x := x// Max count of open tradesvar float max_open_trades = 0if strategy.opentrades > max_open_trades    max_open_trades := strategy.opentradeselse    max_open_trades := max_open_trades// Contrall Selling var bool int_selling = falseif strategy.opentrades == strategy.opentrades [1] and intermidiate_selling == true    int_selling := trueelse if strategy.opentrades  == strategy.opentrades [1] - 1 or intermidiate_selling == false    int_selling := false// Calculation of profit precentagevar float cal_profit_precentage = 0if strategy.position_size == 0    cal_profit_precentage := naelse if strategy.position_size > 0    cal_profit_precentage := (profit_precentage/100) + 1else     cal_profit_precentage := cal_profit_precentage//Open trades entry pricevar float result = 0for i = 0 to strategy.opentrades-1    result := strategy.opentrades.entry_price(i) var int y = 0var int z = 0if strategy.position_size[1] > 0 and strategy.position_size == 0    y := 0    z := 0else if strategy.position_size[1] == 0 and strategy.position_size > 0    y := 1    z := 1else if strategy.position_size[1] > strategy.position_size and strategy.position_size[1] > 0 and strategy.position_size > 0    y := y - 1    z := z + 1else if strategy.position_size[1] < strategy.position_size and strategy.position_size[1] > 0 and strategy.position_size > 0    z := z + 1    y := y + 1    m = result// Fund management - r value calculationvar float int_val_3 = 0var float installment_2 = 0var float installment_3 = 0var float installment_4 = 0var float r_f = 0var float int_val = 0if int_cap * int_val_prc/100 <= 15 and int_val_allocation != "USDT"    int_val := 15if int_val_prc <= 15 and int_val_allocation == "USDT"    int_val := 15if int_cap * int_val_prc/100 > 15 and int_val_allocation != "USDT"    int_val := int_cap * int_val_prc/100if int_val_prc > 15 and int_val_allocation == "USDT"    int_val := int_val_prc    var float r_change = 0if r_finetune == false    r_change := r_change_inputelse if r_finetune == true    r_change := 0.001    for i = 0 to piramiding+2 by 1    if i == 0        int_val_3 := int_val    if i <= piramiding        installment_2 := int_val_3*math.pow((1 + r/100),i)    if i >= 0 and i < piramiding+1        installment_3 := installment_3 + installment_2    if i == piramiding+1        installment_4 := installment_3 - installment_3[1]if installment_4 < int_cap    r := r + r_changeelse if installment_4 > int_cap    r := r - r_changeelse     r := r    if r[1] < r    r_f := r[1] //Fund Managementvar float total_investment = int_capif strategy.position_size[1] >0 and strategy.position_size == 0    total_investment := int_cap + strategy.netprofitelse     total_investment := total_investment    // Stratergy possition sizevar float last_purchase = 0if strategy.position_size[1] < strategy.position_size and strategy.position_size[1] == 0    last_purchase := strategy.position_sizeelse if strategy.position_size[1] < strategy.position_size and strategy.position_size[1] > 0    last_purchase := (strategy.position_size - strategy.position_size[1])else if strategy.position_size == 0    last_purchase :=  0else    last_purchase := last_purchase//Quantity Calculationvar float value_of_purchase = 0var float initial_quantity = 0if purchaseing_method == 'Equal amounts' and dev_of_equal_amounts == 'Equal amounts with fixed entries'    value_of_purchase := (total_investment/(piramiding + 1))else if purchaseing_method == 'Equal amounts' and dev_of_equal_amounts == 'Equal amounts with fixed USDT'    value_of_purchase := int_val_prcif purchaseing_method == 'Incremental amounts' and int_val_allocation == '% of cumilative investment'     value_of_purchase := (total_investment * (int_val_prc/100))* math.pow((1+(r_value/100)),y)else if purchaseing_method == 'Incremental amounts' and int_val_allocation == 'USDT'     value_of_purchase := (int_val_prc)* math.pow((1 + (r_value/100)),y)    var float final_value_of_purchase = 0if value_of_purchase <= 21    final_value_of_purchase := 21else     final_value_of_purchase := value_of_purchase    quantity = final_value_of_purchase/lowvar float r_ff = 0if purchaseing_method == 'Equal amounts'    r_ff := naelse     r_ff := r_f    //current expenditurecurrentexpenditure() =>    result_v2 = 0.    for i = 0 to strategy.opentrades-1        result_v2 += strategy.opentrades.entry_price(i) * strategy.opentrades.size(i)    strategy.opentrades > 0 ? result_v2  : na//cash in handvar float cash_in_hand = 0if currentexpenditure() > 0    cash_in_hand := total_investment  - currentexpenditure()else    cash_in_hand := total_investment//unrealised profitunrealised_profit = (high+low)/2*strategy.position_size - currentexpenditure()//last entry pricelastentryprice() =>    result_v3 = 0.    for i = 0 to strategy.opentrades-1        result_v3 := strategy.opentrades.entry_price(i)// * strategy.opentrades.size(i)    strategy.opentrades > 0 ? result_v3  : na    var float last_entry_price = 0var index_of_array_maxval = 0var index_of_array_minval = 0var entryprice = array.new_float(49)if currentexpenditure() [1] < currentexpenditure()    last_entry_price := lastentryprice()    array.push(entryprice, last_entry_price)else if strategy.opentrades [1] == 0 and strategy.opentrades > 0    last_entry_price := lastentryprice()    array.push(entryprice, last_entry_price)else if strategy.position_size == 0    last_entry_price := 0    array.clear(entryprice)array_maxval = array.max(entryprice)array_minval = array.min(entryprice)if array.lastindexof(entryprice, array_maxval) >= 0    index_of_array_maxval := array.lastindexof(entryprice, array_maxval) + 1    index_of_array_minval := array.lastindexof(entryprice, array_minval) + 1 else    index_of_array_maxval := na    index_of_array_minval := naif ta.sma(close,9)> array_minval*(1 + profit_precentage_intermidiate/100)// and int_selling == true and hi_point[1] and low_point and strategy.position_avg_price > ma_9    array.clear(entryprice)//Calculation of profit linevar float profit_line = 0profit_line_nf = strategy.position_avg_price * cal_profit_precentage//strategy.position_avg_price * cal_profit_precentageif strategy.position_size[1] == 0 and strategy.position_size > 0    profit_line := profit_line_nfelse if strategy.position_size [1] < strategy.position_size    profit_line := profit_line - profit_line_nf[1] + profit_line_nfelse if strategy.position_size [1] > strategy.position_size    profit_line := profit_line [1]else if strategy.opentrades == 0    profit_line := 0    // count of max trade countvar int max_trade_count = 0if purchaseing_method == 'Incremental amounts'    max_trade_count := piramiding - 1else if purchaseing_method == 'Equal amounts' and dev_of_equal_amounts == 'Equal amounts with fixed USDT'    max_trade_count := math.floor(total_investment / int_val_prc) - 1else if purchaseing_method == 'Equal amounts' and dev_of_equal_amounts == 'Equal amounts with fixed entries'    max_trade_count := piramiding - 1//Enter Coustom comand to perform buy and sell actions link with webhookstring buy_comment      =   "BUY" string sell_comment     =   "SELL" //Tradingif ((buy_1 or buy_2 or buy_3  )) and window and strategy.position_size == 0 and source_of_lower_point < low_point    strategy.entry("long", strategy.long, comment = buy_comment, qty = quantity)else if ((buy_1 or buy_2 or buy_3 or buy_4 )  and window and ma_9 < strategy.position_avg_price *.99 and  strategy.position_size > 0 ) and strategy.opentrades <= (max_trade_count * 0.75) //and source_of_lower_point < low_point    strategy.entry("long", strategy.long, comment = buy_comment, qty = quantity)else if ((buy_6)  and ma_9 < strategy.position_avg_price and window and  strategy.position_size > 0 ) and strategy.opentrades > (max_trade_count * 0.75) and strategy.opentrades <= max_trade_count //and source_of_lower_point < low_point    strategy.entry("long", strategy.long, comment = buy_comment, qty = quantity)if (sell_comand==true) and profit_line < ma_9 and hi_point[1] and low_point    strategy.close("long", qty = strategy.position_size, comment = sell_comment)//intermediate sellingif ta.sma(close,9)> array_minval*(1 + profit_precentage_intermidiate/100) and int_selling == true and hi_point[1] and low_point and strategy.position_avg_price > ma_9    strategy.close("long", qty = last_purchase[x], comment = sell_comment)    //Graphs//color changeplot(r_ff,                                      title = "Calculated R value",       color = color.new(color.white,100))plot(strategy.position_avg_price,               title = "AVG",                      color = color.green,                    style = plot.style_circles)plot(profit_line,                               title = "Adj.Profit",               color = color.yellow,                   style = plot.style_circles)plot(strategy.opentrades,                       title = "Numbers of open trades",   color = color.new(color.white,100))plot(max_open_trades,                           title = "Max Opentrades",           color = color.new(color.red,100))plot(strategy.netprofit,                        title = "Cumilative Profit",        color = color.new(color.white,100))plot(unrealised_profit,                         title = "Unrealised Profit",        color = color.new(color.blue,100))plot(currentexpenditure(),                      title = "Current Expenditure",      color = color.new(color.blue,100))plot(cash_in_hand,                              title = "Cash in Hand",             color = color.new(color.blue,100))plot(total_investment,                          title = "Total Investment",         color = color.new(color.white,100))plot(last_purchase,                             title = "Quantity Last purchase",   color = color.new(color.white,100))plot(final_value_of_purchase,                   title = "Value of Purchase",        color = color.new(color.white,100))//plot(last_entry_price,                          title = "Lastentry Price",          color = color.new(color.blue,100))//plot(result,                                    title = "Entry Price",              color = color.new(color.white,100))hidden_color = color.new(color.white,100)var color_1 = color.whitevar color_2 = color.redvar color_3 = color.yellowvar color_4 = color.bluevar color_5 = color.greenvar color_6 = color.orange //linevar color_7 = color.maroon //barvar color_8 = color.new(color.gray,50) //areavar color_9 = color.new(color.aqua,50) //areavar color_10 = color.orange //linevar color_11 = color.maroon //barvar color_12 = color.new(color.gray,50) //areavar color_13 = color.new(color.aqua,50) //areavar color_14 = color.orange //linevar color_15 = color.maroon //barvar color_16 = color.maroon //barif show_graph_1 == true    color_1 := color.whiteelse     color_1 := hidden_colorif show_graph_2 == true    color_2 := color.redelse     color_2 := hidden_colorif show_graph_3 == true    color_3 := color.new(color.yellow,50)else     color_3 := hidden_colorif show_graph_4 == true    color_4 := color.new(color.blue,50)else     color_4 := hidden_colorif show_graph_5 == true    color_5 := color.new(color.green,30)else     color_5 := hidden_colorif show_graph_6 == true    color_6 := color.orangeelse     color_6 := hidden_colorif show_graph_7 == true    color_7 := color.greenelse     color_7 := hidden_colorif show_graph_8 == true    color_8 := color.new(color.silver,50)else     color_8 := hidden_colorif show_graph_9 == true    color_9 := color.new(color.yellow,50)else     color_9 := hidden_colorif show_graph_10 == true    color_10 := color.new(color.teal,50)else     color_10 := hidden_colorif show_graph_11 == true    color_11 := color.new(color.maroon,50)else     color_11 := hidden_colorif show_graph_12 == true    color_12 := color.new(color.aqua,50)else     color_12 := hidden_colorif show_graph_13 == true    color_13 := color.new(color.red,50)else     color_13 := hidden_colorif show_graph_14 == true    color_14 := color.new(color.red,50)else     color_14 := hidden_color    if show_graph_15 == true    color_15 := color.new(color.blue,50)else     color_15 := hidden_colorif show_graph_16 == true    color_16 := color.new(color.blue,50)else     color_16 := hidden_colorhline(0, color = color.white, title = "o")plot(show_graph_1 == true ? graph_1:na, color = color_1, title = "(1) Cumilative graph(CG)", style = plot.style_linebr)plot(show_graph_2 == true ? graph_2:na, color = color_2, title = "(2) CG corelation to price", style = plot.style_linebr)plot(show_graph_3 == true ? graph_3:na, color = color_3, title = "(3) St dev of CG", style = plot.style_columns)plot(show_graph_4 == true ? graph_4:na, color = color_4, title = "(4) Degree of change - CG", style = plot.style_linebr)plot(show_graph_5 == true ? graph_5*math.pow(10,scale_of_graph_5):na, color = color_5, title = "(5) Rate of change - CG", style = plot.style_area)plot(show_graph_6 == true ? graph_6:na, color = color_6, title = "(6) corelation of CG (CCG), corelation to price", style = plot.style_linebr)plot(show_graph_7 == true ? graph_7:na, color = color_7, title = "(7) St dev of corelation of CCG", style = plot.style_columns)plot(show_graph_8 == true ? graph_8:na, color = color_8, title = "(8) Degree of change - CCG", style = plot.style_linebr)plot(show_graph_9 == true ? graph_9*math.pow(10,scale_of_graph_9):na, color = color_9, title = "(9) Rate of change - CCG", style = plot.style_area)plot(show_graph_10 == true ? graph_10:na, color = color_10, title = "(10) STDV of CG (SCG), corelation to price", style = plot.style_linebr)plot(show_graph_11 == true ? graph_11:na, color = color_11, title = "(11) St dev of corelation of SCG", style = plot.style_columns)plot(show_graph_12 == true ? graph_12:na, color = color_12, title = "(12) Degree of change - SCG", style = plot.style_linebr)plot(show_graph_13 == true ? graph_13*math.pow(10,scale_of_graph_13):na, color = color_13, title = "(13) Rate of change - SCG", style = plot.style_area)plot(show_graph_14 == true ? graph_14:na, color = color_14, title = "(14) Third degree cor to price", style = plot.style_linebr)plot(show_graph_15 == true ? graph_15:na, color = color_15, title = "(15) Third degree cor to price", style = plot.style_columns)plot(show_graph_16 == true ? ta.ema(graph_16,14):na, color = color_16, title = "(16) Degree of change - SCG", style = plot.style_area)plotshape(ma_9 < strategy.position_avg_price *.99 and strategy.opentrades <= (max_trade_count * 0.75)  ? buy_1: na, style = shape.arrowdown, location = location.abovebar, size = size.large, text = "1")plotshape(ma_9 < strategy.position_avg_price *.99 and strategy.opentrades <= (max_trade_count * 0.75)  ? buy_2: na, style = shape.arrowdown, location = location.abovebar, size = size.large, text = "2")plotshape(ma_9 < strategy.position_avg_price *.99 and strategy.opentrades <= (max_trade_count * 0.75)  ? buy_3: na, style = shape.arrowdown, location = location.abovebar, size = size.large, text = "3")plotshape(ma_9 < strategy.position_avg_price *.99 and strategy.opentrades <= (max_trade_count * 0.75)  ? buy_4: na, style = shape.arrowdown, location = location.abovebar, size = size.large, text = "4", color = color.green)plotshape(ma_9 < strategy.position_avg_price *.99 and strategy.opentrades <= (max_trade_count * 0.75)  ? buy_5: na, style = shape.arrowdown, location = location.abovebar, size = size.large, text = "5", color = color.red)plotshape(ma_9 < strategy.position_avg_price *.99 ? buy_6: na,                                                      style = shape.arrowdown, location = location.abovebar, size = size.large, text = "6", color = color.orange)//Tablevar tbl = table.new(position.top_right, 2, 9, frame_color=#151715, frame_width=1, border_width=2, border_color=color.new(color.white, 100))//column valuestable.cell(tbl, 0,0, text = "Cumilative profit (USDT)",                                                     text_color = color.white,       text_halign = text.align_left,      text_valign  = text.align_center, bgcolor = color.green)table.cell(tbl, 0,1, text = "Current Expenditure",                                                          text_color = color.red,         text_halign = text.align_left,      text_valign  = text.align_center)table.cell(tbl, 0,2, text = "Cash balance",                                                                 text_color = color.red,         text_halign = text.align_left,      text_valign  = text.align_center)table.cell(tbl, 0,3, text = "Cumilative assert (USDT)",                                                     text_color = color.red,         text_halign = text.align_left,      text_valign  = text.align_center)table.cell(tbl, 0,4, text = "Count of open trades",                                                         text_color = color.red,         text_halign = text.align_left,      text_valign  = text.align_center)table.cell(tbl, 0,5, text = "Strategy position Size",                                                       text_color = color.red,         text_halign = text.align_left,      text_valign  = text.align_center)    table.cell(tbl, 1,0, str.tostring(strategy.netprofit, format.mintick),                                      text_color = color.white,       text_halign = text.align_right,     text_valign  = text.align_center, bgcolor = color.green)table.cell(tbl, 1,1, str.tostring(currentexpenditure(), format.mintick),                                    text_color = color.red,         text_halign = text.align_right,     text_valign  = text.align_center)table.cell(tbl, 1,2, str.tostring(cash_in_hand, format.mintick),                                            text_color = color.red,         text_halign = text.align_right,     text_valign  = text.align_center)table.cell(tbl, 1,3, str.tostring(total_investment, format.mintick),                                        text_color = color.red,         text_halign = text.align_right,     text_valign  = text.align_center)table.cell(tbl, 1,4, str.tostring(strategy.opentrades, format.mintick), text_color = color.red,             text_halign = text.align_right, text_valign = text.align_center)table.cell(tbl, 1,5, str.tostring(strategy.position_size, format.mintick), text_color = color.red,          text_halign = text.align_right, text_valign = text.align_center)