The Trend Template stock screener is a set of selection criteria by Market Wizard Mark Minervini. Here are the rules:
//PRC_Trend Template | screener
//13.04.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
ma50=average[50]
ma150=average[150]
ma200=average[200]
c1 = Close > average[50]
c2 = ma50>ma150
c3 = ma150>ma200
c4 = summation[20](ma200>ma200[1])=20
c5 = Close/lowest[250](low)>1.3
c6 = Close/highest[250](high)>0.75
TrendTemplate = c1 and c2 and c3 and c4 and c5 and c6
screener[TrendTemplate]