ghostFeed
Syntax
Parameters
Return Value
Example
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 100 === 0) { // draw every 100 bars
// 1) Define ghost anchors
const points = [
newPoint(time(90), closeC(90)),
newPoint(time(70), high(70)),
newPoint(time(50), low(50)),
newPoint(time(30), closeC(30))
];
// 2) Style settings
const style = {
fillBackground: true,
transparency: 75,
showLabels: true,
line: { linestyle: 2, linewidth: 2, color: color.teal },
background: color.rgba(0, 128, 128, 0.2)
};
// 3) Draw Ghost Feed
ghostFeed(points, style);
}
};Tips
Warning
Good Practice
Last updated