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

RE: [amibroker] Re: sum only positive days



PureBytes Links

Trading Reference Links




<FONT 
face="Courier New">SumVol20updays = <FONT 
color=#0000ff>Sum((<FONT 
color=#0000ff>ROC(<FONT 
color=#ff0000>C,<FONT 
color=#ff00ff>1)><FONT 
color=#ff00ff>0)*<FONT 
face="Courier New">V<FONT 
color=#000000>,20<FONT 
color=#000000>); 

<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>herman

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: kristaura 
  [mailto:camplevel@xxxxxxxxxxxx]Sent: November 27, 2003 11:31 
  AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  sum only positive daysSomeday 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> > Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.