I am writing a momentum strategy that precludes long entries while the down-slope of
the lower Bollinger Band exceeds a specified gradient. An ROC function defines gradient:
CODE:
Please log in to see this code.
CODE:
Please log in to see this code.
And the script command is:
CODE:
Please log in to see this code.
Simple enough. However, even when that condition is true entry is permitted if the relative gradients
CODE:
Please log in to see this code.
between the two series (rocbbL and rocbbL6) is less than a specified amount, say 0.75 (essentially the rate of decline has slowed). So it would override the previous condition , that is: “ even if rocbbL[bar] is less than -0.11 but RelGrad is less than 0.75 then signal counts” How could that be scripted ?
Size:
Color:
Use the OR operator ||
CODE:
Please log in to see this code.
Size:
Color:
Thanks Cone
tossing this thing around in my mental salad-bowl I missed the simplest way to state the solution
Size:
Color: