Hello,
I'm trying to write the script to say:
If close(0) > VWAP, then BUY
OR
If close(0) < VWAP, then SELL
I'm using the amVWAP2.efs script from the amStudies Libarary.
I have the BUY and SELL conditions and PostMain statements down fine, but the actual way to state the logic for amVWAP is getting me. It should be pretty straight forward and what I figured it would look like would be:
close() > amVWAP2("930", 15)
OR
close() < amVWAP2("930", 15)
However, I keep getting the error:
ReferenceError: amVWAP2 is not defined.
Do I need to create a variable for amVWAP2 and then use that variable in the condition set? Or is there a way to directly access the amVWAP2 value without having to use a variable?
Or is there a much simpler way to state this and I'm just missing it completely?
I'm trying to write the script to say:
If close(0) > VWAP, then BUY
OR
If close(0) < VWAP, then SELL
I'm using the amVWAP2.efs script from the amStudies Libarary.
I have the BUY and SELL conditions and PostMain statements down fine, but the actual way to state the logic for amVWAP is getting me. It should be pretty straight forward and what I figured it would look like would be:
close() > amVWAP2("930", 15)
OR
close() < amVWAP2("930", 15)
However, I keep getting the error:
ReferenceError: amVWAP2 is not defined.
Do I need to create a variable for amVWAP2 and then use that variable in the condition set? Or is there a way to directly access the amVWAP2 value without having to use a variable?
Or is there a much simpler way to state this and I'm just missing it completely?
Comment