New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
Simple Consolidation Scan - Syntax Error
Looking to create a simple consolidation scan, basically last 5 closes within a 4% range. Written a code but getting syntax error, probably something stupid i've done.
Code i've written:
[type is stock] and [sma(20,volume) > 40000]
and [((max(5,close)-min(5,close))/((max(5,close)+min(5,close))/2)*100) < 4]
Syntax error recieved:
Could not parse "" located in the clause "((MAX(5,CLOSE)-MIN(5,CLOSE))/((MAX(5,CLOSE)+MIN(5,CLOSE))/2)*100) < 4"
Tried a search on the forum but can't see what the error would be?
Thanks in advance,
Could not parse "" located in the clause
"((MAX(5,CLOSE)- MIN(5,CLOSE))/((MAX(5,CLOSE)+MIN(5,CLOSE))/2)*100) < 4"
In the ((max(5,close) there is an extra ( at the beginning and a missing ) at the end for example. So it doesn't know what to do with that.
To attempt to get the engine to think of an arithmetic expression a - b / c - d you can try to use brackets
[a-b] / [c-d] I don't recommend trying to do this as it's difficult to check the results on many of these situations. If you have it perfectly formatted (meaning the system isn't showing an error) and it's producing results but you have no reliable way to check the results, is that good?