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

[amibroker] Re: sum only positive days



PureBytes Links

Trading Reference Links

Herman,
this will add the updaysVol of the last 20 bars. Jayson doesn´t want 
this, as you may see from the explanation in the initial message.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" <psytek@xxxx> 
wrote:
> SumVol20updays = Sum((ROC(C,1)>0)*V,20);
> 
> herman
>   -----Original Message-----
>   From: kristaura [mailto:camplevel@x...]
>   Sent: November 27, 2003 11:31 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Re: sum only positive days
> 
> 
>   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
>               ADVERTISEMENT
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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 the Yahoo! Terms of 
Service.


------------------------ 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/