I made some errors in the TD REI formula:. Here's the whole thing again, and this time it appears to be right. I get a plot with IBM like the one in TASC.
I had errors in the formulas TD3 and TD4, because of the way WOW interprets things in an if formula, and the TD Range Expansion Index should have TD5 in the numerator, not TD6.
Here's the whole thing again. Sorry for the trouble this may cause you:
TD1: h-ref(h,-2)
TD2: l-ref(l,-2)
TD3: If((h>=ref(l,-5) or h>=ref(l,-6)) and (l<=ref(h,-5) or l<=ref(h,-6)),1,0)
TD4: If((Ref(h,-2)>=ref(c,-7) or ref(h,-2)>=ref(c,-8)) and (ref(l,-2)<=ref(c,-7) or ref(l,-2)<=ref(c,-8)),1,0)
TD5: If(Fml("TD3") + fml("TD4")>=1, fml("TD6"), 0)
TD6: Fml("TD1") + fml("TD2")
TD7: Abs(fml("TD1")) + abs(fml("TD2"))
TDREI Expansion Index: ((Fml("TD5") + ref(fml("TD5"),-1) + ref(fml("TD5"),-2) + ref(fml("TD5"),-3) + ref(fml("TD5"),-4))/ (Fml("TD7") + ref(fml("TD7"),-1) + ref(fml("TD7"),-2) + ref(fml("TD7"),-3) + ref(fml("TD7"),-4)))*100 |