Break Out after 20 stable units

Category: Screeners By: Vivien René Created: July 22, 2020, 12:41 PM
July 22, 2020, 12:41 PM
Screeners
9 Comments

This code was done to detect any value which was stable the last 20 days (MMA7 variations < 5%) and operate a breakout by breaking the highest of these last 20 days

// MMA7 condition
maxexp = highest[20](exponentialaverage[7])[1]
minexp = lowest[20](exponentialaverage[7])[1]

percexp = (maxexp - minexp) / minexp
c1= percexp < 5/100

// Find max candle on last 20 unit
maxcandle = highest[20](high)[1]
c2 = close > maxcandle

// 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
c3 = avgVol > 1000

// Screener
SCREENER[c1 and c2 and c3](percexp*100 as "MMA7 variation")

 

Download
Filename: Break-Out-after-20-stable-unit.itf
Downloads: 1135
Vivien René Average
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...