Docs

Pine Script compatibility

Deepwick Script runs a subset of Pine Script. This page lists the 827 function and variable names the engine knows today, generated from the same reference the engine is tested against. For signatures and behaviour, see the Deepwick Script reference.

Paste from TradingView

In the chart's script editor, Paste from TradingView checks a pasted script against this list before it runs. Each call the engine doesn't know is reported with its line and column (1-based) and a suggestion. Unsupported calls stop a script, so you can import it as is, or with Run without unsupported lines, which disables those lines and every line that depends on them. If an order (strategy.entry, strategy.exit, strategy.close…) would be disabled, the import refuses and says which call is the cause. request.security() is flagged as a warning: it compiles but returns na.

Not supported yet

A function the engine does not know stops the script with "Unknown function" and the line and column.

  • import, request.dividends, request.earnings, request.financial, request.splits, request.economic, request.quandl, request.currency_rate, earnings.*, dividends.*, ticker.renko, ticker.kagi, ticker.linebreak, ticker.pointfigure: Libraries are not implemented yet. The functions that need a data feed we do not have — dividends, earnings, analyst data and currency rates — return na, and the chart types we do not build (Renko, Kagi, line break and point & figure) are not there either.
  • strategy.risk.*: The risk rules (max_position_size, max_intraday_loss, max_drawdown, allow_entry_in) are not supported. Trailing stops in strategy.exit() are: use trail_points and trail_offset.

Supported, by namespace

built-ins (124)

accdist aggressor_side alert alertcondition alma ask atr avg bar_index barcolor barssince bb bbw bgcolor bid bool box cci change close cmo cog color correlation cross crossover crossunder cum dayofmonth dayofweek dev dmi ema falling fill fixnan float high highest highestbars hl2 hlc3 hlcc4 hline hma hour iff indicator input int kc kcw label last_bar_index last_bar_time library line linefill linreg low lowest lowestbars macd max max_bars_back median mfi min minute mode mom month na nvi nz obv ohlc4 open percentrank pivothigh pivotlow plot plotarrow plotbar plotcandle plotchar plotshape pvi pvt range rci rising rma roc rsi sar second sma stoch strategy string study sum supertrend swma table time time_close time_tradingday timenow timestamp tr tsi valuewhen variance volume vwap vwma wad weekofyear wma wpr wvad year

aggressor.* (2)

aggressor.buy aggressor.sell

alert.* (3)

alert.freq_all alert.freq_once_per_bar alert.freq_once_per_bar_close

array.* (55)

array.abs array.avg array.binary_search array.binary_search_leftmost array.binary_search_rightmost array.clear array.concat array.copy array.covariance array.every array.fill array.first array.from array.get array.includes array.indexof array.insert array.join array.last array.lastindexof array.max array.median array.min array.mode array.new array.new_bool array.new_box array.new_color array.new_float array.new_int array.new_label array.new_line array.new_linefill array.new_string array.new_table array.percentile_linear_interpolation array.percentile_nearest_rank array.percentrank array.pop array.push array.range array.remove array.reverse array.set array.shift array.size array.slice array.some array.sort array.sort_indices array.standardize array.stdev array.sum array.unshift array.variance

backadjustment.* (3)

backadjustment.inherit backadjustment.off backadjustment.on

barstate.* (7)

barstate.isconfirmed barstate.isfirst barstate.ishistory barstate.islast barstate.islastconfirmedhistory barstate.isnew barstate.isrealtime

box.* (33)

box.all box.copy box.delete box.get_bottom box.get_left box.get_right box.get_top box.new box.set_bgcolor box.set_border_color box.set_border_style box.set_border_width box.set_bottom box.set_bottom_right_point box.set_extend box.set_left box.set_lefttop box.set_right box.set_rightbottom box.set_text box.set_text_color box.set_text_font_family box.set_text_formatting box.set_text_halign box.set_text_size box.set_text_valign box.set_text_wrap box.set_top box.set_top_left_point box.set_xloc box.style_dashed box.style_dotted box.style_solid

chart.* (17)

chart.bg_color chart.fg_color chart.is_heikinashi chart.is_kagi chart.is_linebreak chart.is_pnf chart.is_pointfigure chart.is_range chart.is_renko chart.is_standard chart.left_visible_bar_time chart.point.copy chart.point.from_index chart.point.from_time chart.point.new chart.point.now chart.right_visible_bar_time

color.* (24)

color.aqua color.b color.black color.blue color.from_gradient color.fuchsia color.g color.gray color.green color.lime color.maroon color.navy color.new color.olive color.orange color.purple color.r color.red color.rgb color.silver color.t color.teal color.white color.yellow

cost.* (1)

cost.round_trip

currency.* (22)

currency.AUD currency.BTC currency.CAD currency.CHF currency.CZK currency.ETH currency.EUR currency.GBP currency.HKD currency.INR currency.JPY currency.KRW currency.MYR currency.NONE currency.NZD currency.PLN currency.RUB currency.SGD currency.TRY currency.USD currency.USDC currency.USDT

dayofweek.* (7)

dayofweek.friday dayofweek.monday dayofweek.saturday dayofweek.sunday dayofweek.thursday dayofweek.tuesday dayofweek.wednesday

display.* (6)

display.all display.data_window display.none display.pane display.price_scale display.status_line

extend.* (4)

extend.both extend.left extend.none extend.right

font.* (2)

font.family_default font.family_monospace

format.* (5)

format.inherit format.mintick format.percent format.price format.volume

hline.* (3)

hline.style_dashed hline.style_dotted hline.style_solid

input.* (13)

input.bool input.color input.enum input.float input.int input.price input.session input.source input.string input.symbol input.text_area input.time input.timeframe

label.* (28)

label.all label.copy label.delete label.get_color label.get_size label.get_style label.get_text label.get_textcolor label.get_tooltip label.get_x label.get_y label.new label.set_color label.set_point label.set_size label.set_style label.set_text label.set_text_color label.set_text_font_family label.set_text_formatting label.set_textalign label.set_textcolor label.set_tooltip label.set_x label.set_xloc label.set_xy label.set_y label.set_yloc

line.* (28)

line.all line.copy line.delete line.get_price line.get_x1 line.get_x2 line.get_y1 line.get_y2 line.new line.set_color line.set_extend line.set_first_point line.set_second_point line.set_style line.set_width line.set_x1 line.set_x2 line.set_xloc line.set_xy1 line.set_xy2 line.set_y1 line.set_y2 line.style_arrow_both line.style_arrow_left line.style_arrow_right line.style_dashed line.style_dotted line.style_solid

linefill.* (6)

linefill.all linefill.delete linefill.get_line1 linefill.get_line2 linefill.new linefill.set_color

location.* (5)

location.abovebar location.absolute location.belowbar location.bottom location.top

log.* (3)

log.error log.info log.warning

map.* (11)

map.clear map.contains map.copy map.get map.keys map.new map.put map.put_all map.remove map.size map.values

math.* (28)

math.abs math.acos math.asin math.atan math.avg math.ceil math.cos math.e math.exp math.floor math.log math.log10 math.max math.min math.phi math.pi math.pow math.random math.round math.round_to_mintick math.rphi math.sign math.sin math.sqrt math.sum math.tan math.todegrees math.toradians

matrix.* (49)

matrix.add_col matrix.add_row matrix.avg matrix.col matrix.columns matrix.concat matrix.copy matrix.det matrix.diff matrix.eigenvalues matrix.eigenvectors matrix.elements_count matrix.fill matrix.get matrix.inv matrix.is_antidiagonal matrix.is_antisymmetric matrix.is_binary matrix.is_diagonal matrix.is_identity matrix.is_square matrix.is_stochastic matrix.is_symmetric matrix.is_triangular matrix.is_zero matrix.kron matrix.max matrix.median matrix.min matrix.mode matrix.mult matrix.new matrix.pinv matrix.pow matrix.rank matrix.remove_col matrix.remove_row matrix.reshape matrix.reverse matrix.row matrix.rows matrix.set matrix.sort matrix.submatrix matrix.sum matrix.swap_columns matrix.swap_rows matrix.trace matrix.transpose

option.* (4)

option.greeks option.iv option.payoff option.price

plot.* (14)

plot.linestyle_dashed plot.linestyle_dotted plot.linestyle_solid plot.style_area plot.style_areabr plot.style_circles plot.style_columns plot.style_cross plot.style_histogram plot.style_line plot.style_linebr plot.style_stepline plot.style_stepline_diamond plot.style_steplinebr

polyline.* (3)

polyline.all polyline.delete polyline.new

position.* (9)

position.bottom_center position.bottom_left position.bottom_right position.middle_center position.middle_left position.middle_right position.top_center position.top_left position.top_right

regime.* (5)

regime.classify regime.high regime.low regime.normal regime.smooth

request.* (2)

request.security request.security_lower_tf

risk.* (4)

risk.deltaHedge risk.drawdownPct risk.rollingSharpe risk.varHistorical

runtime.* (1)

runtime.error

scale.* (3)

scale.left scale.none scale.right

session.* (7)

session.isfirstbar session.isfirstbar_regular session.islastbar session.islastbar_regular session.ismarket session.ispostmarket session.ispremarket

settlement_as_close.* (3)

settlement_as_close.inherit settlement_as_close.off settlement_as_close.on

shape.* (12)

shape.arrowdown shape.arrowup shape.circle shape.cross shape.diamond shape.flag shape.labeldown shape.labelup shape.square shape.triangledown shape.triangleup shape.xcross

size.* (6)

size.auto size.huge size.large size.normal size.small size.tiny

splits.* (2)

splits.denominator splits.numerator

spread.* (2)

spread.bps spread.now

str.* (18)

str.contains str.endswith str.format str.format_time str.length str.lower str.match str.pos str.repeat str.replace str.replace_all str.split str.startswith str.substring str.tonumber str.tostring str.trim str.upper

strategy.* (96)

strategy.account_currency strategy.avg_losing_trade strategy.avg_losing_trade_percent strategy.avg_trade strategy.avg_trade_percent strategy.avg_winning_trade strategy.avg_winning_trade_percent strategy.cancel strategy.cancel_all strategy.cash strategy.close strategy.close_all strategy.closedtrades strategy.closedtrades.commission strategy.closedtrades.entry_bar_index strategy.closedtrades.entry_comment strategy.closedtrades.entry_id strategy.closedtrades.entry_price strategy.closedtrades.entry_time strategy.closedtrades.exit_bar_index strategy.closedtrades.exit_comment strategy.closedtrades.exit_id strategy.closedtrades.exit_price strategy.closedtrades.exit_time strategy.closedtrades.first_index strategy.closedtrades.max_drawdown strategy.closedtrades.max_drawdown_percent strategy.closedtrades.max_runup strategy.closedtrades.max_runup_percent strategy.closedtrades.profit strategy.closedtrades.profit_percent strategy.closedtrades.size strategy.commission.cash_per_contract strategy.commission.cash_per_order strategy.commission.percent strategy.convert_to_account strategy.convert_to_symbol strategy.default_entry_qty strategy.direction.all strategy.direction.long strategy.direction.short strategy.entry strategy.equity strategy.eventrades strategy.exit strategy.fixed strategy.grossloss strategy.grossloss_percent strategy.grossprofit strategy.grossprofit_percent strategy.initial_capital strategy.long strategy.losstrades strategy.margin_liquidation_price strategy.max_contracts_held_all strategy.max_contracts_held_long strategy.max_contracts_held_short strategy.max_drawdown strategy.max_drawdown_percent strategy.max_runup strategy.max_runup_percent strategy.netprofit strategy.netprofit_percent strategy.oca.cancel strategy.oca.none strategy.oca.reduce strategy.openprofit strategy.openprofit_percent strategy.opentrades strategy.opentrades.capital_held strategy.opentrades.commission strategy.opentrades.entry_bar_index strategy.opentrades.entry_comment strategy.opentrades.entry_id strategy.opentrades.entry_price strategy.opentrades.entry_time strategy.opentrades.max_drawdown strategy.opentrades.max_drawdown_percent strategy.opentrades.max_runup strategy.opentrades.max_runup_percent strategy.opentrades.profit strategy.opentrades.profit_percent strategy.opentrades.size strategy.order strategy.percent_of_equity strategy.position_avg_price strategy.position_entry_name strategy.position_size strategy.risk.allow_entry_in strategy.risk.max_cons_loss_days strategy.risk.max_drawdown strategy.risk.max_intraday_filled_orders strategy.risk.max_intraday_loss strategy.risk.max_position_size strategy.short strategy.wintrades

syminfo.* (32)

syminfo.basecurrency syminfo.country syminfo.currency syminfo.description syminfo.isin syminfo.main_tickerid syminfo.mincontract syminfo.minmove syminfo.mintick syminfo.pointvalue syminfo.prefix syminfo.pricescale syminfo.recommendations_buy syminfo.recommendations_buy_strong syminfo.recommendations_date syminfo.recommendations_hold syminfo.recommendations_sell syminfo.recommendations_sell_strong syminfo.recommendations_total syminfo.root syminfo.session syminfo.target_price_average syminfo.target_price_date syminfo.target_price_estimates syminfo.target_price_high syminfo.target_price_low syminfo.target_price_median syminfo.ticker syminfo.tickerid syminfo.timezone syminfo.type syminfo.volumetype

ta.* (67)

ta.accdist ta.alma ta.atr ta.barssince ta.bb ta.bbw ta.cci ta.change ta.cmo ta.cog ta.correlation ta.cross ta.crossover ta.crossunder ta.cum ta.dev ta.dmi ta.ema ta.falling ta.highest ta.highestbars ta.hma ta.iii ta.kc ta.kcw ta.linreg ta.lowest ta.lowestbars ta.macd ta.max ta.median ta.mfi ta.min ta.mode ta.mom ta.nvi ta.obv ta.percentile_linear_interpolation ta.percentile_nearest_rank ta.percentrank ta.pivot_point_levels ta.pivothigh ta.pivotlow ta.pvi ta.pvt ta.range ta.rci ta.rising ta.rma ta.roc ta.rsi ta.sar ta.sma ta.stdev ta.stoch ta.supertrend ta.swma ta.tr ta.tsi ta.valuewhen ta.variance ta.vwap ta.vwma ta.wad ta.wma ta.wpr ta.wvad

table.* (24)

table.all table.cell table.cell_set_bgcolor table.cell_set_height table.cell_set_text table.cell_set_text_color table.cell_set_text_font_family table.cell_set_text_formatting table.cell_set_text_halign table.cell_set_text_size table.cell_set_text_valign table.cell_set_textcolor table.cell_set_tooltip table.cell_set_width table.clear table.delete table.merge_cells table.new table.set_bgcolor table.set_border_color table.set_border_width table.set_frame_color table.set_frame_width table.set_position

text.* (5)

text.format_bold text.format_italic text.format_none text.wrap_auto text.wrap_none

ticker.* (5)

ticker.heikinashi ticker.inherit ticker.modify ticker.new ticker.standard

timeframe.* (14)

timeframe.change timeframe.from_seconds timeframe.in_seconds timeframe.isdaily timeframe.isdwm timeframe.isintraday timeframe.isminutes timeframe.ismonthly timeframe.isseconds timeframe.isticks timeframe.isweekly timeframe.main_period timeframe.multiplier timeframe.period

Deepwick is not affiliated with TradingView. Pine Script is a trademark of TradingView, Inc.