Jonf ,
I am writing the Darvas in a plugin, but I feel the value of the 
topbox in your Jscript code is not correct
the high of the topBox must be the one of the last state 1 , 
if state turns from 3 to 4 must be Hi[i-2]
the actual script gives a value of topbox on the higher high.
Agree or not?
stephane
 
 |