Sath,
The code uses Peak and Trough.
These are dynamic... meaning that the values are not consistent. They
are not reliable and should not be used in trading!
To show the reverse simply change the start and end variables.
Preston
--- In equismetastock@ yahoogroups. com, -sAThya- <prassathya@ ...>
wrote:
>
> hi Preston
> how to make reverse style of this code below ,
> its given a signal acc value when the price rising and if the
price going down its just give "0" signal
> i would like to change to be when the price going up the signal "0"
and when the price going down its given the dist value as show an
indicator. it just reverse of what is code run as usual.
> start:=TroughBars( 1,C,5)=0;
>
end:=PeakBars( 1,C,5)=0;
> init:=Cum(IsDefined (start+end) )=1;
> flag:=ValueWhen( 1,start-end< >0 OR init,start);
> start:=flag* (Alert(flag= 0,2) OR start*Cum(start) =1);
> end:=(flag=0) *(Alert(flag, 2) OR end*Cum(end) =1);
> value:=V;
> acc:=Cum(flag* value);
> accVal:=acc- ValueWhen( 1,end,acc) ;
> accVal;
> start-end;
> Rgds
> SATH
>