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
Parameter | Type | Purpose |
---|---|---|
name | string | Name of the plot |
bar_id | integer | Absolute 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)