Hi,
Can you help me why below code not working & why?
_SECTION_BEGIN("MAX Moving Avg broke");
n=0;
function fun_name(C,LB )
{
LB=IIf(IsNull(LB),1,LB) OR IIf(LB<=0,1,LB);
R=ValueWhen(Cross(MA(C,LB),C),HHV(H,LB),1);
result=IIf(C>=R,LB,0);
return result;
}
for( i = 0; i < BarCount; i++ )
{...