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.

How to Use Math symbols in scan?

I want to scan for volatility. So here is how I tried to do it, but it doesn't work!

My goal is to find Max High from past 30 days "-" (minus) Minimum Low of past 10 days / (divided) by the Close < 0.15 (need to be less than 15%).

My scan:
- [yesterday's daily max(30,high) - yesterday's daily min(10,low) / Close] < .15

I also tried changing the brackets order:
[yesterday's daily max(30,high) - yesterday's daily min(10,low)] / Close < .15 or [Close < .15]

Nothing worked. I got the message: "There are unrecognized characters after the rightmost square bracket."

According to the message, I think the math symbols are wrong. What's wrong with that scan?

Thanks for any insights!

Comments

  • This passes syntax:

    and [[yesterday's daily max(30,high) - yesterday's daily min(10,low)] / Close < .15]

    But, it gets 999 results with the default universe ([type = stock] AND [Daily SMA(20,Daily Volume) > 40000])

    It gets 488 with the sp500. So maybe the .15 needs to be adjusted.

    If you think the brackets are going to get complicated, first write "and [ ]"; then put your conditions inside those first two brackets. If you need to isolate terms with brackets (use them like parentheses, which are reserved for built in functions like sma(5, close)), type in the two brackets first, then put your terms inside the brackets. Hope that helps.
  • Thanks Markd,

    Indeed, the math formula returns too many candidates. I know I have to tweak it, but I wanted to learn how to use minus, division and percentage in a scan.

    Your suggestions helped me to do that.
Sign In or Register to comment.