elliottCorrection
Syntax
Parameters
Return Value
Example
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 80 === 0) { // draw every 80 bars
// 1) Define anchors
const O = newPoint(time(100), high(100));
const A = newPoint(time(75), low(75));
const B = newPoint(time(55), high(55));
const C = newPoint(time(30), low(30));
// 2) Style settings
const style = {
fillBackground: true,
transparency: 80,
showLabels: true,
line: { linestyle: 0, linewidth: 2, color: color.red },
background: color.rgba(255, 0, 0, 0.2)
};
// 3) Draw correction
elliottCorrection(O, A, B, C, style);
}
};Tips
Warning
Good Practice
Last updated