PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Zoli,
Are
you looking simply for today's volume or are you trying to sum down days versus
up days for "X" periods?
<FONT face=Arial color=#0000ff
size=2>
Here
is code you may adapt. X and Y are your up Vol and down Vol for the time
period.
<FONT face=Arial color=#0000ff
size=2>
Regards,
Jayson
//A/D
volume//
<FONT face=Arial color=#0000ff
size=2>pds=Param("PDS",11,5,22,2);
<FONT face=Arial color=#0000ff
size=2>smooth=Param("Smooth",1,1,30,1);
<FONT face=Arial color=#0000ff
size=2>trig=Param("Trigger",19,1,25,2);
x = 0;
y = 0;
<FONT face=Arial color=#0000ff
size=2>weight=1;//IIf(V>MA(V,50),2,IIf(V<MA(V,50)/2,.5,V));
for( i = 1; i < pds+1 ; i++
)
{
x = x + ValueWhen( C > Ref( C, -1
), Volume*weight,i); //(z1/z2),i);
y = y + ValueWhen( C < Ref( C, -1
), Volume*weight,i); //(z1/z2),i);
}
vp=x-y;
trigger=MA(vp,trig);
Title="A/D Volume of "+Name()+ " is
"+ WriteIf(x-y>0,EncodeColor(colorBrightGreen)+ "
Positive",EncodeColor(colorRed)+" Is Negative")+EncodeColor(colorWhite)+"\n Bar
% of all Vol Average = "+WriteVal(V/MA(V,50)*100,1.0) +"%";
<FONT face=Arial color=#0000ff
size=2>Plot(vp,"",IIf(vp>trigger,colorBrightGreen,colorRed),2);
<FONT face=Arial color=#0000ff
size=2>//Plot(trigger,"",colorYellow,1);
GraphXSpace=5;
<FONT face=Tahoma
size=2>-----Original Message-----From: zoli_j
[mailto:novizoli@xxxxxxxxxxx]Sent: Tuesday, March 09, 2004 9:36
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] down
volumeHi,How could I create or import into AB
"down volume"?I mean, it's calculated by an external
program:if(Price2<Price1) {DownVolume = DownVolume +
(Price2.Volume-Price1.Volume);}else {UpVolume = UpVolume +
(Price2.Volume-Price1.Volume);}And I would like to analyse both of
these Volumes in AB.Daily:-If I use OpenInt column as VolumeDown,
then it's working.Minute by minute and week by week:-I can't use
OpenInt, because it can't summe minute by minute, and week by
week.(Daily: DayMonday.OpenInt = 100; DayTuesday.Openint = 110;
... DayFriday = 105;If I change the screen weekly, then
ThisWeek.OpenInt = 105; And what I would see:
100+110+...+105)Any Idea?BR, Zoli.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
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
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|