I'm trying to code buy selection criteria that requires the S&P500
index ("^GSPC") to be higher now than 20 days ago along with a
RelStrength measure.
Here's the section of code of interest:
Buy = RelStrength("^GSPC") > 20.0
AND Foreign("^GSPC", "Close") > Foreign ("^GSPC", "Ref(Close,-20)");
When I place this in previously working code with other criteria, it
doesn't seem to have an effect.
Does anyone see what is wrong with the last line and/or is there a
better way to do this?
Regards,
SrEngRet