kondratura:Data, Thank You very much for your reply!
I don't understand exactly how function ValueWhen really works, but how about next variation:
ValueWhen(1 ,1=1, HHV(H,opt1) )
It's more clear for me.
Thank You once more.
ValueWhen(1 ,1=1, HHV(H,opt1) ) is the same as HHV(H,opt1).
Just try plotting the indicator and see which one suits you best. Create 2 indicators named :
"- test HHV 1" :
time:=Input("time",1,500,30);
ValueWhen( 2 , HHVBars(C,time) < Ref(HHVBars(C,time) ,-1) , HHV(C,time) )
"- test HHV 2"
time:=Input("time",1,500,30);
HHV(C,time)
And you'll find out which one is more useful than the other ;)