Vivien René

Ordered trend-following stocks Screener

Category: Screeners By: Vivien René Created: August 6, 2020, 10:29 AM
August 6, 2020, 10:29 AM
Screeners
3 Comments
Ordered trend-following stocks Screener

This screener return the list of the different stocks following a “trend following” pattern
They are order by their percentage earning per unit of time (for example if you have 20 and you choose day, it means the stock is increasing by 20% a day more or less)

NB : the screener takes a bit of time for calculating but it does the job
NB2 : The screener is based on SuperTrend for detecting going up values so be careful because sometimes some values can have already reached their highest or are on their way to change direction
NB3 : my screeners are here to help you and make work easier by making selections but don t forget your analyses 😉

// Variables a changer
minPercent = 3

// Supertrend is green
cSP = close > Supertrend[3,10]

// Find superTrend first green point tendency
nbIter = 0

while close[nbIter] > Supertrend[3,10][nbIter]
 nbIter = nbIter+1
wend

// Find gradient
gradient = 0
if (nbIter > 1) then
 // Find number of active green SuperTrend points
 if (round(nbIter/2) <> nbIter/2) then
  nbIter = (nbIter + 1)
 endif
 halfIter = nbIter/2

 // Calculate last median point
 y1 = 0
  for i = 0 to halfIter-1
   y1 = y1 + (close[i]+open[i])/2
  next
 y1 = y1 / halfIter

 // Calculate oldest gradient point
 y0 = 0
 for i = halfIter to nbIter-1
  y0 = y0 + (close[i]+open[i])/2
 next
 y0 = y0 / halfIter

 // Calculate gradient
 gradient = (y1-y0)/y0/halfIter*100

 // Gradient condition
 cGradient = gradient > minPercent
endif

// Volume condition
avgVol = average[20](volume)
sum = 0
for i=0 to 20
 if (volume[i] < avgVol*10) then
  sum = sum + volume[i]
 else
  sum = sum + avgVol
 endif
next

avgVol = sum / 21
cVol = avgVol > 1000

// Screener
Screener [cSP and cGradient and cVol](gradient as "Gradient")

Download
Filename: Ordered-trend-following-stocks.itf
Downloads: 933
Download
Filename: eelwlfzwkaerpqc-1596703520lcp84.png
Downloads: 183
Vivien René
Vivien René Average
Operating in the shadows, I hack problems one by one. My bio is currently encrypted by a complex algorithm. Decryption underway...
Author’s Profile

Comments

MONEY38
1 year ago
#

j'aime bien merci pour votre partage

patapouf
6 years ago
#

Hi Vivien René I just discovered your “Ordered trend-following stocks Screener”. Great work ! Do you know the indicators system PRT Bands ?... recently added as a native indicator in ProRealTime It works quite well. There are now the 4 instructions PRTBANDSUP; PRTBANDSDOWN; PRTBANDSMEDIUMTERM; PRTBANDSSHORTTERM available for this indicator, in PRT Software (and PRT/Binck in France since this morning) (but we are still waiting for PRT/IG and PRT/InteractiveBrokers) Could you develop the same kind of screener based on PRT Bands ? Thank you in advance https://www.prorealcode.com/topic/prt-bands-trend-following-prorealtime/ PS. In order to identify Up trends and Down trends, one can use these conditions : //************************************************ if close crosses over PRTBandsUp and trend=0 then trend=-1 r=255 g=0 endif signal = trendtrend[1] //Trend Reversal // Up Trend : if signal and trend>0 then …… // Down Trend elsif signal and trend<0 then …… endif //************************************************

mickey992
6 years ago
#

salut merci pour ton partage et ton travaille

ProRealCode ProRealCode
Loading...