Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 4/27/2005(UTC) Posts: 132 Location: Manchester, NH
|
This is a bit of improvement. This accounts for the fact that the most recent high may have occurred after the lows and that it is possible to have more than one high between the lows. Any additional improvement requires more knowledge of MSFL than I currently possess. Any suggestions are appreciated.
LP1:=ExtFml("PowerPivots.NthPivotPrice",-1,0,1); LP2:=ExtFml("PowerPivots.NthPivotPrice",-1,1,1); HP1:=ExtFml("PowerPivots.NthPivotPrice",1,0,1); HP2:=ExtFml("PowerPivots.NthPivotPrice",1,1,1); HP3:=ExtFml("PowerPivots.NthPivotPrice",1,2,1); BLP1:=ExtFml("PowerPivots.BarsSinceNthPivot",-1,0); BLP2:=ExtFml("PowerPivots.BarsSinceNthPivot",-1,1); BHP1:=ExtFml("PowerPivots.BarsSinceNthPivot",1,0); BHP2:=ExtFml("PowerPivots.BarsSinceNthPivot",1,1); BHP3:=ExtFml("PowerPivots.BarsSinceNthPivot",1,2); HP:=Max(If(BLP2>BHP1 AND BHP1>BLP1,HP1,0),Max(If(BLP2>BHP2 AND BHP2>BLP1,HP2,0),If(BLP2>BHP3 AND BHP3>BLP1,HP3,0))); ((LP1/LP2>1.05) AND (LP1/LP2<1.15) AND C>HP AND Ref(C,-1)<=HP AND HP>0)
|