Here is the base code, that i would like to change:

PercH = Param("Percent H", 3, 0.25 , 10, 0.25); 
PercL = Param("Percent L", 3, 0.25 , 10, 0.25);

UP = Peak(H,PercH,1) + ((((Peak(H,PercH,1)-Peak(H,PercH,2)) /
(PeakBars(H,PercH,2)-PeakBars(H,PercH,1))) * PeakBars(H,PercH,1)));

DOWN = Trough(L,PercL,1) + ((((Trough(L,PercL,1)-Trough(L,PercL,2)) /
(TroughBars(L,PercL,2)-TroughBars(L,PercL,1))) * TroughBars(L,PercL,1)));

Plot(Close, "Close",colorBlack, styleCandle);
Plot(UP,"UP",colorGreen, styleLine);
Plot(doWN,"DOWN", colorRed,styleLine);

In this code i would like to replace the Peaks and Troughs as a TD-Points as 
follow:

TD_point_UP = H > Ref(H,-1) AND H > Ref(H,1) ;
TD_point_DOWN = L < Ref(L,-1) AND L < Ref(L,1) ;

What is the proper code for this change (with a visible UP & DOWN lines for all 
the period - from the first to the last TD-point)???



Reply via email to