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

[amibroker] Re: sum only positive days



PureBytes Links

Trading Reference Links

Someday I will learn to write what I think:

"This is my attempt (without using looping) for summing the volumes 
on the last N up days:"

should read:

"over the last "pds" up days:"

Note: N is a variable and is the number of bars encompassing "pds".
kris

--- In amibroker@xxxxxxxxxxxxxxx, "kristaura" <camplevel@xxxx> wrote:
> Hello Jason,
> This is my attempt (without using looping) for summing the volumes 
on 
> the last N up days:
> 
> pds=20;
> up=C>ref(C,-1);
> N=barindex()-valuewhen(up,barindex(),pds)+1;
> UpVol=sum(up*V,N);
> Plot(up*V,"Up Days",1,2);
> Plot(UpVol,"Sum Up Vol",1,1);
> 
> kris
> 
> 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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