Zeal Terminal Open in Zeal Terminal

Pine Script v5 · Strategy

RELATIVE VALUE TRADE MANAGEMENT WEBHOOK

A Pine Script v5 strategy with no technical-analysis calculation. It has 4 order rules, 2 entries among them, and trades long and short with the default settings. Exits use a stop loss and a profit target. Each trade is one contract and pays no commission. 18 settings; defaults include Timeframe 4h, Nivel de entrada 0 and Nivel de SL 0.

Generated from the script's code by a template: every clause is a fact read from the source. Not written by a person or a model, and not taken from the author's description.

Does RELATIVE VALUE TRADE MANAGEMENT WEBHOOK repaint?
No
No repainting patterns were found in the source. The live replay was not measured: the script acts only when barstate.isconfirmed is true, which Zeal Terminal's engine never reports during a live replay (it does not run a bar's closing update in live mode), so the replay cannot test this script.
How did RELATIVE VALUE TRADE MANAGEMENT WEBHOOK 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 RELATIVE VALUE TRADE MANAGEMENT WEBHOOK run in Pine Script v6?
Not tested
Neither version placed a trade on any of the 8 markets, so there was nothing to compare. The v6 version is shown for reference and is not offered as a download.
Does RELATIVE VALUE TRADE MANAGEMENT WEBHOOK use a stop loss?
Yes
strategy.exit sets a stop on line 156, 160.
Does RELATIVE VALUE TRADE MANAGEMENT WEBHOOK run in Zeal Terminal?
Yes
It compiles in 1,544 ms and runs 1,000 bars in 121 ms, in the browser.

BTCUSDT · 1D · default settings

  • Winning trade
  • Losing trade
  • Equity
  • Buy and hold
40,00060,00080,000100,000120,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. The script plots nothing itself; the lines and the lower pane are its own calculations, drawn for reference. Zeal Terminal's engine currently reads an order side written as direction = strategy.long, direction = strategy.short as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 154, 158) so the engine trades the way the script says. The live re-run is not offered here: the script requests BINANCE:BTCUSDT 240, which this page cannot load in your browser.

Needs BINANCE:BTCUSDT 240 data, not available: a lower timeframe than the chart; the engine does not evaluate intrabar data Values that depend on it are empty on this chart.

Table drawn by the script, as it stood on the last bar
Ticker side:Invalid ticker
Actual Ticker:BINANCE:BTCUSDT
Signal id:Error. Unopened order.
R/R:NaN
Contracts:NaN
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.

  • Check

    No commission

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

  • Note

    No slippage

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

Settings

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

SettingDefaultType and rangeFeeds
-- ACTIVES --
Ticker LongThis is the EXACT ticker name of the active you want to be LONG. It is important add the exchange, or market, for a correct work. Example : BINANCE:SUSHIUSDTPERPstringcorrect_side o h l c
Ticker ShortThis is the EXACT ticker name of the active you want to be SHORT. It is important add the exchange, or market, for a correct work. Example : BINANCE:IOTXUSDTPERPstringo h l c correct_side
TimeframeSelect the timeframe for the orders. Also it is the timeframe of the RELATIVE GRAPH that you can deploy.4hstring · options ["15min", "1h", "4h", "D", "W"]time_scale
-- LEVELS --
Nivel de entradaIt is the entry level based in the relative graph.0float · min 0 · step 1stop_dif stop_per contracts rr filled long short Entry
Nivel de SLIt is the STOP LOSS level based in the relative graph.0float · min 0 · step 1stop_dif contracts rr filled sl
Nivel de TPIt is the TAKE PROFIT level based in the relative graph.0float · min 0 · step 1rr tp
-- MONEY MANAGEMENT --
Leverage1int · min 1contracts_zig entry_msg
RiskIt allows you to select the type of risk for the order. You can choose between a permanent qty (in dollars or other currency) or a percent of your equity.Money Amountstring · options ["Money Amount", "Equity Percent"]contracts
Quantity riskIt is the quantity you will lose if the STOP LOSS is triggered.10int · min 1contracts
Order close percentIt is the close percent of the order if the TAKE PROFIT is triggered.100int · min 1 · step 1update_msg exit id_out
-- DATES --
Date of beginningtimestamp("1 Jul 2020 00:00 +0300")timein_date
Date of endingtimestamp("20 Jul 2022 00:00 +0300")timein_date
-- IDs --
Long IDIf you have a current open position write here the LONG side ID in case that you want to close the signal via STOPs. If your position is not open leave it in blank.stringid_zig line 118 line 120
Short IDIf you have a current open position write here the SHORT side ID in case that you want to close the signal via STOPs. If your position is not open leave it in blank.stringid_zig line 122 line 124
-- DATA --
Deploy Tabletrueboolline 182
Table Background Colorcolor.graycolorstuff_table
Text Colorcolor.whitecolorline 183 line 184 line 185 line 186 line 187 line 188 line 189 line 190 line 191 line 192
Table PositionTop Rightstring · options ["Top Left", "Top Center", "Top Right", "Middle Left", "Middle Center", "Middle Right", "Bottom Left", "Bottom Center", "Bottom Right"]t_position

What it calculates

No technical-analysis calculation: the script works on prices and settings directly.

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.

time_frameTimeframesetting · 4hopenopenprice datashort_tickTicker Shortsetting · highhighprice datalowlowprice dataclosecloseprice datalvl_inNivel de entradasetting · 0lvl_outNivel de SLsetting · 0qty_typeRisksetting · Money AmountqtyQuantity risksetting · 10lvl_tpNivel de TPsetting · 0leverageLeveragesetting · 1id_longLong IDsetting · id_shortShort IDsetting · qty_exitOrder close percentsetting · 100table_posTable Positionsetting · Top Righttimetimeprice datadate_inDate of beginningsetting · timestamp("1 Jul 20…date_outDate of endingsetting · timestamp("20 Jul 2…long_tickTicker Longsetting · confirm, open_graph, high_graph, low_graph, close_graph, tickerconfirm · open_graph +46 valuestime_scaletime_scalevalueoovaluehhvaluellvalueccvaluestop_difstop_difvaluestop_perstop_pervaluecontractscontractsvaluerrrrvalueid_in, side, price_zigid_in · side +13 valuesid_outid_outvalueslslvaluetptpvaluecontracts_zigcontracts_zigvalueid_zigid_zigvalueentry_msgentry_msgvalueexit_msgexit_msgvalueupdate_msgupdate_msgvaluet_positiont_positionvalueboughtboughtconditionlonglongconditionshortshortconditionin_datein_dateconditionfilledfilledconditionsoldsoldconditioncorrect_sidecorrect_sideconditionstuff_tableColourstuff_tableentry:id_inOpen id_instrategy.entryexit:id_outexit id_outstrategy.exitplotbar:163Relative Graphicplotbarhline:165Entryhlinehline:166Stop Losshlinehline:167Take Profithline

Order rules

OrderFires whenBy defaultLine
Open id_in longlongOn154
Exit id_out stop and limitboughtOn156
Open id_in shortshortOn158
Exit id_out stop and limitboughtOn160

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 measuredAn engine gap, not the scriptThe script acts only when barstate.isconfirmed is true, which Zeal Terminal's engine never reports during a live replay (it does not run a bar's closing update in live mode), so the replay cannot test this script. The answer comes from the checks on the source alone.
  • ClearHigher-timeframe data8 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 timingOrders fill at the next bar's open, after the signal bar has closed.

The checks read the source; the replay runs it. Together they catch the common causes, not every possible one.

Other markets

Not run on other markets: the script requests BINANCE:BTCUSDT 240, and that data is not available here (a lower timeframe than the chart; the engine does not evaluate intrabar data). 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.

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

Clean v5

Verified

Nothing to change.

Does it run in Pine Script v6?

Not tested

Neither version placed a trade on any of the 8 markets, so there was nothing to compare. The v6 version is shown for reference and is not offered as a download. It differs from the v5 version by 1 edit.

⋯// The purpose of this script is send orders and provide stops levels for our relative trades.-//@version=5+//@version=6strategy("RELATIVES MANAGEMENT", overlay=true, margin_long=100, margin_short=100, initial_capital = 1000, precision = 8)⋯

Where it runs

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

Zeal Terminal's engine currently reads an order side written as direction = strategy.long, direction = strategy.short as a short, whatever it says; this page passes the same side as strategy.long or strategy.short (lines 154, 158) so the engine trades the way the script says.

“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/// © ExpensiveJok// The purpose of this script is send orders and provide stops levels for our relative trades.//@version=5strategy("RELATIVES MANAGEMENT", overlay=true, margin_long=100, margin_short=100, initial_capital = 1000, precision = 8)//----------------------------------------------------------------  TIPS    ---------------------------------------------------------------------------long_tick_tip   = "This is the EXACT ticker name of the active you want to be LONG. It is important add the exchange, or market, for a correct work. Example : BINANCE:SUSHIUSDTPERP"short_tick_tip  = "This is the EXACT ticker name of the active you want to be SHORT. It is important add the exchange, or market, for a correct work. Example : BINANCE:IOTXUSDTPERP"time_frame_tip  = "Select the timeframe for the orders. Also it is the timeframe of the RELATIVE GRAPH that you can deploy."lvl_in_tip  = "It is the entry level based in the relative graph."lvl_out_tip = "It is the STOP LOSS level based in the relative graph."lvl_tp_tip  = "It is the TAKE PROFIT level based in the relative graph."qty_type_tip= "It allows you to select the type of risk for the order. You can choose between a permanent qty (in dollars or other currency) or a percent of your equity."qty_tip     = "It is the quantity you will lose if the STOP LOSS is triggered."qty_exit_tip= "It is the close percent of the order if the TAKE PROFIT is triggered."id_long_tip = "If you have a current open position write here the LONG side ID in case that you want to close the signal via STOPs. If your position is not open leave it in blank."id_short_tip= "If you have a current open position write here the SHORT side ID in case that you want to close the signal via STOPs. If your position is not open leave it in blank."//----------------------------------------------------------------  INPUTS  ----------------------------------------------------------------------------long_tick   = input.string(title = "Ticker Long"    , defval = "", tooltip = long_tick_tip                                  , group = "--  ACTIVES  --")short_tick  = input.string(title = "Ticker Short"   , defval = "", tooltip = short_tick_tip                                 , group = "--  ACTIVES  --")time_frame  = input.string(title = "Timeframe"      , defval = "4h", options = ["15min", "1h", "4h", "D", "W"], tooltip = time_frame_tip, group = "--  ACTIVES  --")lvl_in  = input.float(title = "Nivel de entrada", defval = 0, step = 1, minval = 0, tooltip = lvl_in_tip    , group = "--  LEVELS --")lvl_out = input.float(title = "Nivel de SL"     , defval = 0, step = 1, minval = 0, tooltip = lvl_out_tip   , group = "--  LEVELS --")lvl_tp  = input.float(title = "Nivel de TP"     , defval = 0, step = 1, minval = 0, tooltip = lvl_tp_tip    , group = "--  LEVELS --")leverage= input.int     (title = "Leverage", defval = 1, minval = 1                                                                     , group = "--  MONEY MANAGEMENT --")qty_type= input.string  (title = "Risk", defval = "Money Amount", options = ["Money Amount", "Equity Percent"]  , tooltip = qty_type_tip, group = "--  MONEY MANAGEMENT --")qty     = input.int     (title = "Quantity risk"        , defval = 10, minval = 1                               , tooltip = qty_tip     , group = "--  MONEY MANAGEMENT --")qty_exit= input.int     (title = "Order close percent"  , defval = 100, minval = 1, step = 1                    , tooltip = qty_exit_tip, group = "--  MONEY MANAGEMENT --")        //DATEdate_in     = input.time  (title = "Date of beginning"  , defval = timestamp("1 Jul 2020 00:00 +0300")  , group = "--  DATES  --")date_out    = input.time  (title = "Date of ending"     , defval = timestamp("20 Jul 2022 00:00 +0300") , group = "--  DATES  --")        //ZIGNALYid_long = input.string(title = "Long ID", defval = "", tooltip = id_long_tip    , group = "--  IDs  --")id_short= input.string(title = "Short ID",defval = "", tooltip = id_short_tip   , group = "--  IDs  --")        //TABLEtable_on    = input.bool(title = "Deploy Table",   defval = true                                       , group = "--  DATA  --")table_bg_c  = input.color(defval = color.gray, title = "Table Background Color")table_txt_c = input.color(defval = color.white, title = "Text Color") table_pos   = input.string(defval = "Top Right", title = "Table Position", options = ["Top Left", "Top Center", "Top Right", "Middle Left", "Middle Center", "Middle Right", "Bottom Left",  "Bottom Center", "Bottom Right"])//----------------------------------------------------------------  PROCESS ----------------------------------------------------------------------------confirm     = barstate.isconfirmed ? 0 : 1         //------------- RELATIVES GRAPHtime_scale = switch time_frame    "15min" => "15"    "1h"    => "60"    "4h"    => "240"    "D"     => "1D"    "W"     =>"1W"    // I request the OHLC values to draw the graph in the same window.        // ACTIVES REQUESTohlc_side_long()   =>    o   = request.security(symbol = long_tick, timeframe = time_scale, expression = open[confirm], gaps = barmerge.gaps_on)    h   = request.security(symbol = long_tick, timeframe = time_scale, expression = high[confirm], gaps = barmerge.gaps_on)    l   = request.security(symbol = long_tick, timeframe = time_scale, expression =  low[confirm], gaps = barmerge.gaps_on)    c   = request.security(symbol = long_tick, timeframe = time_scale, expression =close[confirm], gaps = barmerge.gaps_on)    [o,h,l,c]ohlc_side_short() =>    o   = request.security(symbol = short_tick, timeframe = time_scale, expression = open[confirm], gaps = barmerge.gaps_on)    h   = request.security(symbol = short_tick, timeframe = time_scale, expression = high[confirm], gaps = barmerge.gaps_on)    l   = request.security(symbol = short_tick, timeframe = time_scale, expression =  low[confirm], gaps = barmerge.gaps_on)    c   = request.security(symbol = short_tick, timeframe = time_scale, expression =close[confirm], gaps = barmerge.gaps_on)    [o,h,l,c][open_long, high_long, low_long, close_long]    = ohlc_side_long()[open_short, high_short, low_short, close_short]= ohlc_side_short()open_graph  = open_long / open_shorthigh_graph  = high_long / high_shortlow_graph   = low_long  / low_shortclose_graph = close_long/ close_short    //------------------ STOPSstop_dif= (lvl_in - lvl_out) < 0 ?  (lvl_in - lvl_out) * (-1) : (lvl_in - lvl_out)      //Difference in points between the entry point and the stop.stop_per= (stop_dif * 100) / lvl_in                                                     //Percentage difference between the entry point and the stop.    //---------------- CONTRACTScontracts  = if qty_type == "Money Amount"    ((100 * qty) / (((lvl_in - lvl_out) < 0 ? (lvl_in - lvl_out) *(-1) : (lvl_in - lvl_out)) * 100 / lvl_in)) / close                          //lvl in - lvl out *100/lvl in is the % that I loss. With that % I can calculate the total value in the operation and then divide it by the close to find out the number of contracts.else if qty_type == "Equity Percent"    (100 * (strategy.equity * qty/100)) / (((lvl_in - lvl_out) < 0 ? (lvl_in - lvl_out) *(-1) : (lvl_in - lvl_out)) * 100 / lvl_in) / close    //---------------- RISK/REWARDrr = ((lvl_tp - lvl_in) < 0 ? ((lvl_tp - lvl_in)*(-1)) : (lvl_tp - lvl_in)) / ((lvl_in - lvl_out) < 0 ? ((lvl_in - lvl_out) *(-1)) : (lvl_in - lvl_out))//----------------------------------------------------------------  CONDITIONS -------------------------------------------------------------------------    //----- DATEin_date = time >= date_in and time <= date_out    //----- FILLED CONDITIONfilled = if (lvl_in != 0) and (lvl_out != 0)    trueelse    false    //------ ORDERS STUFFbought  = strategy.position_size > 0sold    = strategy.position_size < 0correct_side = if syminfo.tickerid == long_tick    "Long"else if syminfo.tickerid == short_tick    "Short"else if syminfo.tickerid != long_tick and syminfo.tickerid != short_tick    "Invalid ticker"long  = ((ta.crossunder(close_graph, lvl_in) or ta.crossover (close_graph, lvl_in))) and filled and not bought and not sold and correct_side == "Long"   and in_dateshort = ((ta.crossover (close_graph, lvl_in) or ta.crossunder(close_graph, lvl_in))) and filled and not bought and not sold and correct_side == "Short"  and in_date//That is an identifier for the orders.id_in   = long      ? ("Long"       + " " + str.tostring(syminfo.ticker)) : short   ? ("Short"      + " " + str.tostring(syminfo.ticker)) : "None"id_out  = bought    ? ("Long exit"  + " " + str.tostring(syminfo.ticker)) : sold    ? ("Short exit" + " " + str.tostring(syminfo.ticker)) : "None"//Set the SL and TP levelssl = lvl_out != 0 ? lvl_out : na tp = lvl_tp  != 0 ? lvl_tp  : na// I use Zignaly as a exchange but here you must set the correct JSON msg for your webhook.// ------------- ZIGNALY --------------------string zig_quote= '"'string zig_coma = ","string zig_sep  = ":"string system_key       = "XXXXXXXXXxx_YOUR KEY_xxXXXXXXXXX"contracts_zig           = (((contracts * (long ? close_long : short? close_short : na)) / leverage) * 100) / strategy.equitystring side             = (long) ? "Long" : (short) ? "Short" : "Flat"string price_zig        = long ? str.tostring(close_long) : short ? str.tostring(close_short) : na string ticker           = str.substring(syminfo.ticker, 0, end_pos = str.pos(syminfo.ticker, "PERP"))                       // Remove the PERP string in all tickers. That is optional, cheeck if you need it.        // ------  IDs  -----if id_long != ""    id_long := id_longelse if id_long == ""    id_long := str.tostring(syminfo.ticker)if id_short != ""    id_short := id_shortelse if id_short == ""    id_short := str.tostring(syminfo.ticker)id_zig = (long or bought) ? id_long : (short or sold) ? id_short : "Error. Unopened order."entry_msg = zig_quote + "key"               + zig_quote + zig_sep + zig_quote + system_key                                  + zig_quote + zig_coma +  zig_quote + "type"                         + zig_quote + zig_sep + zig_quote + "entry"                                     + zig_quote + zig_coma +  zig_quote + "exchange"                     + zig_quote + zig_sep + zig_quote + "zignaly"                                   + zig_quote + zig_coma + zig_quote + "exchangeAccountType"          + zig_quote + zig_sep + zig_quote + "futures"                                   + zig_quote + zig_coma + zig_quote + "pair"                         + zig_quote + zig_sep + zig_quote + ticker                                      + zig_quote + zig_coma +  zig_quote + "orderType"                    + zig_quote + zig_sep + zig_quote + "limit"                                     + zig_quote + zig_coma + zig_quote + "limitPrice"                   + zig_quote + zig_sep + zig_quote + price_zig                                   + zig_quote + zig_coma + zig_quote + "side"                         + zig_quote + zig_sep + zig_quote + str.tostring(side)                          + zig_quote + zig_coma + zig_quote + "leverage"                     + zig_quote + zig_sep + zig_quote + str.tostring(leverage)                      + zig_quote + zig_coma + zig_quote + "positionSizePercentage"       + zig_quote + zig_sep + zig_quote + str.tostring(contracts_zig)                 + zig_quote + zig_coma + zig_quote + "signalId"                     + zig_quote + zig_sep + zig_quote + id_zig                                      + zig_quoteexit_msg = zig_quote + "key"                + zig_quote + zig_sep + zig_quote + system_key                                  + zig_quote + zig_coma +  zig_quote + "type"                         + zig_quote + zig_sep + zig_quote + "exit"                                      + zig_quote + zig_coma +  zig_quote + "exchange"                     + zig_quote + zig_sep + zig_quote + "zignaly"                                   + zig_quote + zig_coma + zig_quote + "exchangeAccountType"          + zig_quote + zig_sep + zig_quote + "futures"                                   + zig_quote + zig_coma + zig_quote + "pair"                         + zig_quote + zig_sep + zig_quote + ticker                                      + zig_quote + zig_coma +  zig_quote + "orderType"                    + zig_quote + zig_sep + zig_quote + "market"                                    + zig_quote + zig_coma + zig_quote + "signalId"                     + zig_quote + zig_sep + zig_quote + id_zig                                      + zig_quote + zig_coma update_msg = zig_quote + "key"              + zig_quote + zig_sep + zig_quote + system_key                                  + zig_quote + zig_coma + zig_quote + "type"                         + zig_quote + zig_sep + zig_quote + "update"                                    + zig_quote + zig_coma + zig_quote + "exchange"                     + zig_quote + zig_sep + zig_quote + "zignaly"                                   + zig_quote + zig_coma + zig_quote + "exchangeAccountType"          + zig_quote + zig_sep + zig_quote + "futures"                                   + zig_quote + zig_coma + zig_quote + "pair"                         + zig_quote + zig_sep + zig_quote + ticker                                      + zig_quote + zig_coma +  zig_quote + "signalId"                     + zig_quote + zig_sep + zig_quote + id_zig                                      + zig_quote + zig_coma + zig_quote + "reduceTargetpercentage"       + zig_quote + zig_sep + zig_quote + str.tostring(qty_exit)                      + zig_quote     //--------- POSITIONSif long    strategy.entry(id = id_in, direction = strategy.long, qty = contracts, alert_message = entry_msg)if bought    strategy.exit(id = id_out, from_entry = id_in, qty_percent = qty_exit, limit = tp, stop = sl, alert_loss = exit_msg, alert_profit = update_msg)if short    strategy.entry(id = id_in, direction = strategy.short, qty = contracts, alert_message = entry_msg)if bought    strategy.exit(id = id_out, from_entry = id_in, qty_percent = qty_exit, limit = tp, stop = sl, alert_loss = exit_msg, alert_profit = update_msg)//----------------------------------------------------------------  PLOTS ----------------------------------------------------------------------------    //-----RELATIVE GRAPHICplotbar(open_graph, high_graph, low_graph, close_graph, title = "Relative Graphic", color = color.gray, editable = true)    //-----LEVELShline(lvl_in != 0? lvl_in : na, title = "Entry", color = color.purple, editable = true)hline(sl, title = "Stop Loss"    , color = color.yellow  , editable = true)hline(tp, title = "Take Profit"  , color = color.green   , editable = true)        //----------- TABLEt_position = switch table_pos    "Top Left"      => position.top_left    "Top Center"    => position.top_center    "Top Right"     => position.top_right    "Middle Left"   => position.middle_left    "Middle Center" => position.middle_center    "Middle Right"  => position.middle_right    "Bottom Left"   => position.bottom_left    "Bottom Center" => position.bottom_center    "Bottom Right"  => position.bottom_right    stuff_table = table.new(position = t_position, columns = 2, rows = 5, bgcolor = table_bg_c, frame_width = 0, border_width = 5, border_color = color.black)if table_on    table.cell(stuff_table, column = 0, row = 0, text = "Ticker side:"  , text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 1, row = 0, text = correct_side    , text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 0, row = 1, text = "Actual Ticker:", text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 1, row = 1, text = syminfo.tickerid, text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 0, row = 2, text = "Signal id:"    , text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 1, row = 2, text = id_zig          , text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 0, row = 3, text = "R/R:"          , text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 1, row = 3, text = str.tostring(rr), text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 0, row = 4, text = "Contracts:"    , text_color = table_txt_c, text_halign = text.align_left)    table.cell(stuff_table, column = 1, row = 4, text = str.tostring(contracts), text_color = table_txt_c, text_halign = text.align_left)