DEAR senior members,
i have problem in taking out "change in %" , i am using following
formula,
p=Param("past days",30,10,100,1);
diffc=C-Ref(C,- p)/ Ref(C,-p)*100;
pctc=(C-Ref(C,-p))/C ;
Pct = int(diffc);
PctChg = (C - Ref(C,-p)) / ROC(C,1)*100;
Filter=diffc OR pctc OR pct OR pctchg;//1 AND NOT GroupID()==253;
AddColumn(C,"Today close",1.4, textcolor=IIf(
C>Ref(C,-1),colorGreen,colorRed)) ;
AddColumn(Ref(C,- p),"Close at past ("+p+") bars ",1.4, textcolor=IIf(
Ref(C,- p)>C,colorGreen,colorRed)) ;
AddColumn(diffc,"% change",1.4, textcolor=IIf(diffc>65 AND
diffc<75,colorGreen,IIf(diffc<25 AND diffc>10,colorRed,1)));
AddColumn(pctc,"%pctc change",1.4, textcolor=IIf(diffC>65 AND
diffC<75,colorGreen,IIf(diffC<25 AND diffC>10,colorRed,1))) ;
AddColumn(pct,"%pct change",1.4, textcolor=IIf(diffC>65 AND
diffC<75,colorGreen,IIf(diffC<25 AND diffC>10,colorRed,1))) ;
AddColumn(PctChg,"PctChg",1.4);
suppose if closing today is 100.00 and past closing(30) is 145.00
answer should came = -31.03 [ this is the answer i am getting in
calculator and excel sheet , but answer in explorer differs ..
kindly help in sorting out this problem AND i also want to add
RANKING [worst 0 - top 100 ] , according to % differance in
explorer, i have used above four calculations but none of them is
matching according to my answer kindly advise what and where i am
doing wrong * using amibroker 5.07 beta
thanking you ...
eagerly waiting for reply