Not to split the split hair but! Robbie addressed this back in 2019 where he defined the differences between the stockchart.com signals and GTR1 signals.
TMF: Re: Nasdaq NH/NL / Mechanical Investing
https://discussion.fool.com/kimardenmiller-the-20190823-nhnldiff…
Note also the use of weighted not EMA(9) average:
lf-1lp-1h1::iflt(linear(1,ord(1),-1,date2ord(19731217)),0,3,excd.a)et3:styp.a:et10!11!18!48:dspo(1)al252:rank(class.a,permco.a,step3)et1:NHNLDiff:et-999999:StockCount:sum(1,1,step4):PcntNHC252:linear(100,ratio(sum(ifgt(ratio(gprc(1),hgprc(2,251)),1,1,0),1,step4),StockCount)):PcntNLC252:linear(100,ratio(sum(iflt(ratio(gprc(1),lgprc(2,251)),1,1,0),1,step4),StockCount)):PcntNHC252WMA9:ratio(sgwsum(PcntNHC252,0,9,8,7,6,5,4,3,2,1),sgwsum(linear(1,1),0,9,8,7,6,5,4,3,2,1)):PcntNLC252WMA9:ratio(sgwsum(PcntNLC252,0,9,8,7,6,5,4,3,2,1),sgwsum(linear(1,1),0,9,8,7,6,5,4,3,2,1)):NHNLDiff:linear(1,PcntNHC252WMA9,-1,PcntNLC252WMA9)
RAMc