Stage Analysis Video Training Course

Code for Stock Scanners - Page 1

#1

Code for Stock Scanners

This thread was requested by one of our members for a place to talk about and share code for the different stock screeners you use to find suitable Weinstein method candidates.

LINKS:

Prorealtime's Proscreener:

Daily scans:

2x Volume scan: https://www.stageanalysis.net/forum/Thre...74#pid4074


Weekly Scans

Ichimoku scan: https://www.stageanalysis.net/forum/Thre...75#pid4075

Touch of 10 Week MA Scan: https://www.stageanalysis.net/forum/Thre...76#pid4076

Strong Technical Attributes Scan: https://www.stageanalysis.net/forum/Thre...77#pid4077

I hope these help you and please post any of your own scans that you use and remember to include the name of the scanning software.

Cheers

isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.
#2

2x Volume Scan

Here's a daily screen that I run in prorealtime's free screener that finds stocks with daily volume greater than two times the 200 day average; a price that's higher than the previous days; a 10 day moving average that's higher than the previous days 10 day moving average, and finally it is ranked in order of the highest percentage move compared to it's 200 day Average True Range (ATR).

Below is the code:

Code:
indicator1 = Volume
indicator2 = Average[200](Volume)
c1 = (indicator1 > (indicator2*2))

c2= Close[0] > Close[1]

c3= Average[10](Close[0]) > Average[10](Close[1])

Condition1 = (Close[0]-Close[1]) / AverageTrueRange[200](close)

SCREENER[c1 AND c2 AND c3] (Condition1 AS "ATR change")

isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.
#3

Ichimoku scan

A weekly method that's very good at finding the early Stage 2A breakouts is to look for a cross above the weekly Ichimoku Cloud. The scan picks up a cross above the bottom or top part of the cloud, and so it gets a lot of undesirable stocks. But it does a find the odd gem.

Here's the code for Prorealtime's ProScreener:

Code:
ignored, ignored, ignored, indicator1 = CALL Ichimoku[9, 26, 26, 52]
c1 = (close CROSSES OVER indicator1)

ignored, ignored, indicator2, ignored = CALL Ichimoku[9, 26, 26, 52]
c2 = (close CROSSES OVER indicator2)

SCREENER[c1 OR c2] ((close/DClose(1)-1)*100 AS "%Chg yest.")

To make the code work you need to first import the attached Ichimoku.itf file which I've placed in a zip file. So unzip it and then import it as an indicator. And then the screener code above should work.

The Ichimoku screener is run on a weekly range, as you want to target the weekly cloud and not the daily cloud which is different.



Attached Files
.zip   Ichimoku.itf.zip (Size: 1.05 KB / Downloads: 666)
isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.
#4

Touch of 10 Week MA Scan

Another weekly screen you might find useful is a touch and then close above the 10 week MA, with a rising 30 week MA. As this mostly gives you pullbacks within Stage 2 to manually look through for the best candidates. Here's the code for prorealtime's proscreener:

Code:
indicator1 = Average[10](close)
c1 = (low CROSSES UNDER indicator1)

indicator3 = Average[30](close)
indicator4 = Average[30](close)
c2 = (indicator3 > indicator4[1])

indicator5 = Average[10](close)
c3 = (close > indicator5)

Condition1 = (Close[0]-Close[5]) / AverageTrueRange[200](close)

SCREENER[c1 AND c2 AND c3] (Condition1 AS "ATR change")

isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.
#5

Strong Technical Attributes Scan

The following weekly scan looks for stocks with strong technical attributes. You will need to load up the attached custom indicators I've created for the CumulativeForceIndex.itf and Cumulative ForceIndex Rising.itf, which I've placed in zip files. So they need to be unzipped and uploaded into prorealtime in order for the scan to function.

Below is the code for the Strong Technical Attributes Scan:

Code:
indicator1 = CALL "Cumulative ForceIndex Rising"
c1 = (indicator1 = 1)

indicator2 = CALL "10MA Rising"
c2 = (indicator2 = 1)

indicator3 = CALL "30MA Rising"
c3 = (indicator3 = 1)

indicator4 = CALL "30Week_WMA_Rising"
c4 = (indicator4 = 1)

indicator5 = CALL "Kijun-Sen Above"
c5 = (indicator5 = 1)

indicator6 = Volume
indicator7 = Average[52](Volume)
c6 = (indicator6 > indicator7)

Condition1 = (Close[0]-Close[1]) / AverageTrueRange[52](close)

SCREENER[c1 AND c2 AND c3 AND c4 AND c5 AND c6] (Condition1 AS "ATR change")



Attached Files
.zip   CumulativeForceIndex.itf.zip (Size: 679 bytes / Downloads: 630)
.zip   Cumulative ForceIndex Rising.itf.zip (Size: 759 bytes / Downloads: 497)
isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.
#6

RE: Code for Stock Scanners

Here's the simple scans in prorealtime's procreener to find stocks that are above their 50, 150 and 200 day moving averages.

Price Above 50 Day MA

Code:
Condition1 = Close > Average[50](close)

SCREENER [Condition1]


Price Above 150 Day MA

Code:
Condition1 = Close > Average[150](close)

SCREENER [Condition1]


Price Above 200 Day MA

Code:
Condition1 = Close > Average[200](close)

SCREENER [Condition1]

isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.
#7
(This post was last modified: 2014-05-29, 11:47 PM by Tryst.)

RE: Code for Stock Scanners

(2014-04-21, 11:58 PM)isatrader Wrote: Touch of 10 Week MA Scan

Great trader entry point/add to trade screener this one. The amount of times I've seen the 50 day MA touched on stocks where the path of least resistance is higher.

Ok, here my attempt at an early stage 2 break out screener. It is the initial version of it and I already know it needs some work on. I would like to include conditions that take into account the slope of some MAs and also maybe the check against Ichimoku, as Isatrader has put in another post. I may even remove the RSI condition.

Hopefully ProRealTime will include the Mansfield RS indicator in its proscreener in the near future.

Code:
c1a = RSI[150](Close[0])
clb = RSI[150](Close[5])
c1 = Average[9](c1a) > Average[9](clb)

c2 = Close[0] > Average[150](Close[1])

c3 = Close[0] > Close[1]

c4 = Close[2] < Average[150](Close[2])

c5 = Volume > (Average[42](Volume) * 1.2)

c6 = Average[42](Volume) > 10000

c7a = (Highest[15](High) - 1)
c7 = Close[0] > c7a

// The average True Range percentage difference in the last week. So the big movers relative to their price are brought to the top of the screener.
Condition1 = (CLOSE[0] - CLOSE[5]) / AVERAGETRUERANGE[200](close)

SCREENER [c1 and c2 and c3 and c4 and c5 and c6 and c7] (Condition1 AS "ATR change")

Any comments welcome.

#8

Buyable Gap Breakout

This scan is for stockcharts.com custom scanner and searches for US stocks that met the criteria for a potential buyable gap breakout.

Here's the code:

Code:
[type is stock] AND [country = US] and [Daily SMA(50,Daily Close) > Yesterday's Daily SMA(50,Daily Close)] AND [Daily SMA(150,Daily Close) > Yesterday's Daily SMA(150,Daily Close)] and [volume > sma(200, volume) * 1.5] and [market cap > 50] and [exchange != OTCBB] and [exchange != OTCMKT] and [today's low > yesterday's high * 1.026] and [close - 1 day ago close / ATR(200) > 3] and [today's low > yesterday's daily max(253,high)]

isatrader

Fate does not always let you fix the tuition fee. She delivers the educational wallop and presents her own bill - Reminiscences of a Stock Operator.


Forum Jump:


Users browsing this thread: 9 Guest(s)