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.
Gap up + Above Gap for 3 days
Hi All,
I'm trying to create a scan that will scan for gap up, and something where the price stays above the low of the initial gap up and stays above there for 3 days. Any suggestions on the syntax? Also I'd like it to be SPX and Nasdaq 100 companies.
thanks!!
Jon
0
Comments
AND [Daily Low > Yesterday's Daily High * 1.026]
You would need to modify this to 3 days ago Daily Low and 4 days ago Daily High....
to get the gap up indication in the scan.
Then you'd need to check for the subsequent Daily low for the today, 1 and 2 days ago was greater than the 4 days ago Daily High.
In this case the "default" on the Pre-defined Scan is there be a gap of 2.6% requirement. The "default" is there for an example. You can modify the characteristics of the Gap to be whatever you decide.
As to prior days....
think of it this way
Today's Low = Daily Low
Yesterday's is 1 day ago so
1 day ago Daily Low
2 days ago Daily Low
3 days ago Daily Low
The days ago with Daily indicators. Change Weekly Low for weekly and 1 weeks ago, etc for changing to weekly indicators. Monthly and months ago for monthly data.
To achieve your scan you will need to add lines to the Default. You will need to select the Indexes you are looking at first. Index dropdown and select the ones you want.
Then do the gap identification code
Then do the lookback over prior days to ensure the last few days, the low of the day finished above the gap level identified in your gap identification level.
Index1
or
Index2
and
Gap occurred a few days ago
and
Today low is above that gap level
and
1 day ago low is above that gap level
and
2 days ago low is above that gap level
etc......
As for the stay above the gap low (meaning the top of the gap) condition, I think you would want to say the min 3 low (the lowest of today's low , the 1 day ago low and the 2 days ago low ) is greater than the 3 days ago low.
So,
and [min(3, low) > 3 days ago low]
Note that 3 days ago is actually the FOURTH bar back from the current bar on the chart.
[type = stock]
and [today's low > yesterday's high]
and [group is SP500]
and [min(3, low) > 3 days ago low]
When you choose a past date, the scan engine uses the closing data from that date as "today" 's closing data.
So if you choose Dec 20 as the scan date, Dec 20 is "today", Dec 19 is 1 day ago, Dec 18 is 2 days ago. So 'min(3, low)' would choose the lowest of those 3 lows. And '3 days ago low' would be the Dec 17 low.
[group is NASDAQ100] is correct. You can select various universes (groups and indexes) from the drop downs - Indexes and ETFs, Sectors & Industries and Chartlists.
Incidentally, you can also specify market caps that have a SCTR ranking. Use one of the SCTR choices under Price, Volume & SCTRs. For instance:
and [SCTR.small >= 0]
would limit your results to small cap stocks that have a sctr ranking.
[type = stock] AND [Daily Low > Yesterday's Daily High]
and [group is SP500]
and [today's high > yesterday's daily max(253,high)]
Is there a benefit from using "today's low" vs "daily low"? It looks like both are correct in terms of the syntax?
[type = stock] AND [Daily Low > Yesterday's Daily High] and [group is SP500] or [group is NASDAQ100] and [today's high > yesterday's daily max(253,high)]
So, try this:
[type = stock]
and [ [group is SP500] or [group is NASDAQ100] ]
AND [Daily Low > Yesterday's Daily High] and [today's high > yesterday's daily max(253,high)]
You may not need the "type = stock", since the indexes only have stocks.
So the biggest number of results will be what your pool to look in is.
Example: I want the SP500 and the Nasdaq100 stocks. So it starts the scan with 600 stocks.
Then you may want to filter out all of the securities in that pool that are trading above their 100 SMA. It filters those 600 down to 400
And then filter out those that remain that have an overbought RSI. It filters those 400 down to 200.
Then filter out .... filters those 200 down to....
If you create your scan out of order, sometimes it works correctly, sometimes it doesn't. If you create it in order, it always work correctly.