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

[amibroker] HELP NEEDED IN EXPLORATION



PureBytes Links

Trading Reference Links

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


------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/