flag
Syntax (one line)
Parameters
Return Value
Example
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 48 === 0) { // draw occasionally to keep charts clean
// 1) Style (FlagMarkLineToolOverrides)
const style = {
flagColor: color.rgba(255, 193, 7, 0.95) // amber flag
};
// 2) Place the flag at this bar’s close
flag(time(0), closeC(0), style, "News");
}
};Tips
Warning
Good Practice
Last updated