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.
Having some trouble with scan syntax
Good day everyone!
I'm having trouble with some scan syntax, wondering if someone could assist:
1) I'm trying to create a scan that measures divergence from the sma 20 day with a 10% minimum threshold, eg stock at 110, sma at 100.
I tried the following:
[type is stock] and [(price - sma(20))/sma(20) > 0.1)]
but the editor is not happy with the syntax.
2) I'm trying to create a scan that measures reversal in the dotted middle line that is plotted on a Bollinger (8,2) overlay, eg:
if I wanted to create a bullish scan based on the last three dots, let's say 1 being the latest dot and 3 the earliest of the three, the formula to detect a turn would be 1 > 2 and 2 < 3. Meaning a bottom "V" formation of the dots.
And a bearish scan would be 1 < 2, and 2>3, meaning an inverted V formation of the dots.
If anyone could suggest how to code that I would be very appreciative!