Skip to main content

drop_plot_value

Syntax Format

drop_plot_value(name, bar_id)

Overview

The drop_plot_value function helps exclude certain bars from the plot by setting such bars as nan (not a number). This function can be useful in scripts, where you exclude certain data for calculation, and/or set a condition, depending on which the plot value is shown or not.

Parameters

ParameterTypePurpose
namestringName of the plot
bar_idintegerAbsolute bar index. The current bar index is current_bar_id

Example

local drop_bar_id = current_bar_id - 14 
drop_plot_value("Example Plot", drop_bar_id)