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

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é Average
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

Logo Logo
Loading...