rotatedRectangle
Syntax (one line)
Parameters
Return Value
Example
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 70 === 0) { // draw occasionally to keep chart clean
// 1) Style (RotatedRectangleLineToolOverrides)
const style = {
color: color.red,
linewidth: 2,
fillBackground: true,
backgroundColor: color.rgba(255, 0, 0, 0.2),
transparency: 80
};
// 2) Draw the rotated rectangle
rotatedRectangle(time(60), high(60), time(10), low(10), style, "Tilted Zone");
}
};Tips
Warning
Good Practice
Last updated