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

RE: [amibroker] Re: I need some loop-... / KASE indicators



PureBytes Links

Trading Reference Links




So you 
have , say, 5 min bars and at days end you want to know how many bars were 
positive and how many negative?
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>x=c>ref(c,-1);
<FONT face=Arial color=#0000ff 
size=2>y=c<ref(c,-1);
<FONT face=Arial color=#0000ff 
size=2> 
pds= 
param("Periods",20,5,200); //pick the number of bars to study(12= 1 hour of 5 
min bars )
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>up=sum(x,pds);
<FONT face=Arial color=#0000ff 
size=2>dn=sum(y,pds);
 
plot 
up and down or simply add the info in the title=  or run in an exploration 
with addcolumn()
<FONT face=Arial color=#0000ff 
size=2> 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: zoli_j 
[mailto:novizoli@xxxxxxxxxxx]Sent: Wednesday, March 10, 2004 11:33 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
down volumeHi Jayson,"Are you looking simply 
for today's volume"Your code is great, but I would like to watch always for 
last bar-down volume.Intaday, Daily, Weekly:I would like to see 
how much Selling and Buying was at the LAST BAR.For 
example:Intraday: (Today is Friday)09:00 2, 4 (This hour was 2 
Buying and 4 Selling.)11:00 2, 4 (This hour was 2 Buying and 4 
Selling.)13:00 2, 4 (This hour was 2 Buying and 4 Selling.)15:00 2, 4 
(This hour was 2 Buying and 4 Selling.)17:00 2, 4 (This hour was 2 Buying 
and 4 Selling.)At daily-period: Buy, SellMonday:    
10, 20 (This day was 10 Buying and 20 Selling.)Tuesday:   10, 20 
(This day was 10 Buying and 20 Selling.)Wednesday: 10, 20 (This day was 10 
Buying and 20 Selling.)Thursday:  10, 20 (This day was 10 Buying and 20 
Selling.)Friday:    10, 20 (This day was 10 Buying and 20 
Selling.)At weekly period: Buy, SellWeek_11: 50, 100 (This week 
was 10+10+10+10+10=50 Buying and 20+20+20+20+20=100 Selling)Week_10: 
40,76 (This week was 40 Buying and 76 Selling)...So any 
Idea?BR, Zoli.--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" 
<jcasavant@xxxx> wrote:> Zoli,> Are you looking simply for 
today's volume or are you trying to sum down days> versus up days for 
"X" periods?> > Here is code you may adapt. X and Y are your up 
Vol and down Vol for the> time period.> > 
Regards,> Jayson> > //A/D volume//> 
pds=Param("PDS",11,5,22,2);> smooth=Param("Smooth",1,1,30,1);> 
trig=Param("Trigger",19,1,25,2);> x = 0;> y = 0;> 
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) +"%";> 
Plot(vp,"",IIf(vp>trigger,colorBrightGreen,colorRed),2);> 
//Plot(trigger,"",colorYellow,1);> GraphXSpace=5;>  
-----Original Message-----> From: zoli_j [mailto:novizoli@xxxx]> 
Sent: Tuesday, March 09, 2004 9:36 AM> To: 
amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] down volume> 
> > Hi,> > 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@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> 
> >       Yahoo! Groups 
Sponsor>             
ADVERTISEMENT> > > > > > 
----------------------------------------------------------------------------> 
----> Yahoo! Groups Links> >   a.. To visit your 
group on the web, go to:>   <A 
href="">http://groups.yahoo.com/group/amibroker/> 
>   b.. To unsubscribe from this group, send an email 
to:>   amibroker-unsubscribe@xxxxxxxxxxxxxxx> 
>   c.. 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 



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.