bool
Syntax
Parameters
Return Value
Example
//@version=1
// This is the setup function.
// Here you can define the input parameters for the indicator.
init = () => {
// Assume `input` is your Inputs helper instance
input.bool(
'Show SMA',
true,
undefined, // let it auto-generate "showsma"
'Moving Averages', // group
'Toggle simple moving average visibility',
'ma-row' // inline key to align with related inputs
);
}
// This is the main function. It is called every time a new candle is received.
// Here you can calculate the indicator values and draw the indicator on the chart.
onTick = (length, _moment, _, ta, inputs) => {
};Result

Last updated