For drawing a circle on top of a bar when that bar's High is higher than the (-1) bar's High by, say, 4 cents, the following works fine.
However, when I add a symbol parameter as below, circles are drawn on every higher High, not just the ones at least 4 cents higher.
How can I draw a circle on top of a bar on a QQQQ chart every time SPY goes higher by at least 4 cents instead of every time SPY goes higher?
PHP Code:
//{{EFSWizard_Expression_1
if (
high() >= high(-1) + .04
) onAction1();
//}}EFSWizard_Expression_1
//{{EFSWizard_Action_1
function onAction1() {
drawShapeRelative(0, high(), Shape.CIRCLE, "", Color.RGB(0,0,0), Shape.TOP);
vLastAlert = 1;
}
//}}EFSWizard_Action_1
How can I draw a circle on top of a bar on a QQQQ chart every time SPY goes higher by at least 4 cents instead of every time SPY goes higher?
PHP Code:
//{{EFSWizard_Expression_1
if (
high(0, 1, "spy") >= high(-1, 1, "spy") + .04
) onAction1();
//}}EFSWizard_Expression_1
Comment