[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=Arial color=#0000ff 
size=2>Sorry, missed the post, in that case I would remap UpDayVolBars 
to their own array for easy counting:
<FONT face=Arial color=#0000ff 
size=2> 
m=<FONT 
color=#ff0000>BarCount-<FONT 
color=#ff00ff>1; 
UpVolDays = 0<FONT 
color=#000000>;  
for(n=m; 
n>0; n--) <FONT 
color=#ff0000>if(<FONT 
color=#ff0000>C[n]><FONT 
color=#ff0000>C[n-<FONT 
color=#ff00ff>1]) UpVolDays[m--]=<FONT 
color=#ff0000>V<FONT 
color=#000000>[n]; SumLastUpdays = <FONT 
color=#0000ff>Sum<FONT 
face="Courier New">(UpVolDays,20); 
<FONT 
face="Courier New"> 
<FONT face="Courier New" 
color=#0000ff>herman


  <FONT face=Tahoma 
  size=2>-----Original Message-----From: DIMITRIS TSOKAKIS 
  [mailto:TSOKAKIS@xxxxxxxxx]Sent: November 27, 2003 4:18 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  sum only positive daysHerman,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@xxxx]>   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: <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 Yahoo! Terms 
  of Service.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.