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.

Gaps

A normal gap up scan that i ran did not come up with the stock MARK Yesterday April 30 2020


So, Im looking to create a gap up scan which will catch it. 

A scan that allows for overlap intraday between the low price today and yesterdays high 


How can i write this scan? 


yesterday[todays low > yesterday's high - (yesterdays high - yesterdays low)/4]

Comments

  • lmkwinlmkwin ✭✭
    In the "Predefined Scans" there is a Gap Up scan. If you run it, then click on the "Click here to edit this scan" link, it opens the Advanced filter workbench with the code filled in for that scan.

    Below is the Gap Up Nasd code:

    [type = stock] AND [exchange = Nasdaq] AND [exchange != OTCBB] AND [Daily SMA(20,Daily Volume) > 40000] AND [Daily Low > Yesterday's Daily High * 1.026]

    Also, Inside the workbench, there is a dropdown for the Predefined Scans. Click the Drop down and select a baseline code for the Gap Up option. You may also see the Runaway Gap up, etc.

  • markdmarkd mod
    Logic is good, just some syntax problems with brackets vs parentheses.

    Parentheses are reserved for things like indicators and functions, e.g. MACD(12,26,9) or max(7, high).

    When you need to group terms in a scan, use brackets as if they were parentheses. So:

    and [today's low > yesterday's high - [yesterdays high - yesterdays low]/4]

    P.S. this statement gets a yellow "caution" triangle in the margin, with a warning about mixed time frames - but it passes check syntax and runs fine.

    You could also try a more general condition that doesn't limit the length of the tail - for instance,

    and [open > 1 day ago high]
    and [close > 1 day ago high]
  • Mark, thank you very much for your feedback. I prefer your logic to mine. Elegant in its simplicity!
Sign In or Register to comment.