When I?m use Metastock, I?m add this formula to the formula below
If(C>HautP AND C>BasP,5, If(C<BasP,0,PREV))
But I can?t translate It in AmiBroker
--------------------------------------
_SECTION_BEGIN("CrH-L
Prec");
SetChartOptions(0,chartShowArrows|chartShowDates);
/* Ajoute la date et quadrillage */
HautP= Ref(HHV(C,5),-1)
;
BasP= Ref(LLV(C,5),-1)
;
Plot( Close, "Price",
colorBlack, styleCandle );
Plot(HautP,"",colorBlue,styleThick);
Plot(BasP,"",colorCustom12,styleThick);
_SECTION_END();
-------------------------------------------