[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] I get syntax error. Not sure why.



PureBytes Links

Trading Reference Links

Hello

I get syntax error.  at the highlighted line.
"a=CheckIfHeldThroThreshold(C, L,5,9); // this is where i get syntax
error. not sure why?"not sure why. can someone point out why.



Thanks



result9=IIf((L>=EMA(C,9) ) AND (L>EMA(C,20) )AND (L>EMA(C,33) )AND
(L>MA(C,50) ),9,0);
result20=IIf((L<EMA(C,9) ) AND (L>=EMA(C,20) )AND (L>EMA(C,33) )AND
(L>MA(C,50) ),20,0);
result33=IIf((L<EMA(C,9) ) AND (L<EMA(C,20) )AND (L>=EMA(C,33) )AND
(L>MA(C,50) ),33,0);
result50=IIf((L<EMA(C,9) ) AND (L<EMA(C,20) )AND (L<EMA(C,33) )AND
(L>=MA(C,50) ),50,0);
AddColumn(IIf(result9+result20+result33+result50<=0,0,result9+result20+r\
esult33+result50),"Result");

//AddTextColumn(IIf(result9+result20+result33+result50<=0,0,CheckIfHeldT\
hroThreshold(Close, Low,5,9)),"Kept above threshold",1.2);

a=CheckIfHeldThroThreshold(C, L,5,9); // this is where i get syntax
error. not sure why?

Filter =C>MA(C,200);

function CheckIfHeldThroThreshold(inputClose,
inputLow,noOfDaysofThreshold,movingAveToBeUsed){
bHeldAboveThreshold=True;

for (daysChecking=0;daysChecking<noOfDaysofThreshold;daysChecking++){







if(inputLow[-1 *daysChecking]< EMA(inputClose,movingAveToBeUsed){

bHeldAboveThreshold=False;

}

}

return bHeldAboveThreshold;

}


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.16/582 - Release Date: 12/11/2006 4:32 PM