elliottImpulseWave
Syntax
Parameters
Return Value
Example
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 100 === 0) { // draw every 100 bars
// 1) Define the six anchors
const O = newPoint(time(120), low(120));
const P1 = newPoint(time(100), high(100));
const P2 = newPoint(time(85), low(85));
const P3 = newPoint(time(65), high(65));
const P4 = newPoint(time(45), low(45));
const P5 = newPoint(time(25), high(25));
// 2) Style options
const style = {
fillBackground: true,
transparency: 80,
showLabels: true,
line: { linestyle: 0, linewidth: 2, color: color.green },
background: color.rgba(0, 255, 0, 0.2)
};
// 3) Draw Impulse Wave
elliottImpulseWave(O, P1, P2, P3, P4, P5, style);
}
};Tips
Warning
Good Practice
Last updated