Yes, the for loop simplies the Dahl formula. Now I'm trying to figure out if there's a way to write a formula for cumulating with the loop function -- or any other function, for that matter. I'm trying to do a formula for slope, and the Metastock formula involves cumulating and power. Not sure whether it will be possible. Here's the Metastock coding for slope:
( (14 * (Sum(Cum( 1 ) * C ,14 ) ) ) - (Sum(Cum( 1 ) ,14 ) * (Sum( C ,14) ) ) ) / ( (14 * Sum(Pwr (Cum( 1 ) ,2 ) ,14 ) ) - Pwr(Sum(Cum( 1 ) ,14 ) ,2 ) )
I don't think it's going to be easy to do that in a QP scan, but we shall see.
Brooke |