abcdPattern
Syntax
Parameters
Return Value
Example
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 100 === 0) { // draw every 100 bars
// 1) Choose four anchors
const A = newPoint(time(90), low(90));
const B = newPoint(time(70), high(70));
const C = newPoint(time(45), low(45));
const D = newPoint(time(20), high(20));
// 2) Define style
const style = {
color: color.lightblue,
linewidth: 3,
textcolor: color.blue
};
// 3) Draw ABCD Pattern
abcdPattern(A, B, C, D, style);
}
};Result

Last updated