instrument
Syntax Format
instrument(name, overlay)
Overview
This instrument function declares the basic parameters of the indicator, such as a name and a position on the chart. The function should be called only once at the beginning of the script.
Parameters
| Parameter | Type | Purpose |
|---|---|---|
| name |
| Name of the instrument (indicator). It is considered best practice to give an instrument a logically coherent name, which corresponds to its purpose. The full name is used in the indicator’s settings |
| overlay |
| Position of the indicator regarding the chart.
|
| Also, you can use additional parameters: | ||
| description |
| Description of the indicator and its position below the chart, in case you chose the String format. If the value is boolean, then the indicator will overlay on the chart. |
| icon_or_overlay |
| Icon of the indicator and its position below the chart, in case you chose the String format. If the value is boolean, then the indicator will overlay on the chart. |
Example
instrument { name = "Darvas Box", overlay = true }