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

[amibroker] Why does this work?



PureBytes Links

Trading Reference Links

The code is used to do an exploration.
In the AA window numner of days is set to N=1.

Somehow without using a loop, I am getting results that are based on 
a bar by bar analysis of each symblol in a watchlist. This is good, 
but I would like to know why it is happening, so that I can do it 
again. With the window set for just one day, the code is counting 
the number of times the 14 day StochK is over 90 etc...over the 
comlete barcount.
Does anyone know why this is working?

 Ticker	Date/Time	Barcount	Number	5 day % chg	21 
day & chg	60 day % chg	120 day % chg	*****	Number	5 
day % chg	21 day & chg
AACC	2/21/2008	1018	78	-0.004	-0.0037	-0.0331	-
0.0848	*****	74	0.0072	0.0193
ADM	2/21/2008	6089	447	-0.0032	0.0079	0.0444
	0.0574	*****	268	0.0071	0.0116
 
S1=IIf(StochK(14,3)>90,Ref(C,5)/C-1,0);
S2=IIf(StochK(14,3)>90,Ref(C,21)/C-1,0);
S3=IIf(StochK(14,3)>90,Ref(C,60)/C-1,0);
S4=IIf(StochK(14,3)>90,Ref(C,120)/C-1,0);

W1=IIf(StochK(14,3)<10,Ref(C,5)/C-1,0);
W2=IIf(StochK(14,3)<10,Ref(C,21)/C-1,0);
W3=IIf(StochK(14,3)<10,Ref(C,60)/C-1,0);
W4=IIf(StochK(14,3)<10,Ref(C,120)/C-1,0);

N1=IIf(StochK(14,3)>90,1,0);
N2=IIf(StochK(14,3)<10,1,0);

Filter= BarCount>999;
AddColumn( BarCount, "Barcount", 1.0 );
AddColumn( Cum(N1), "Number", 1.2 );
AddColumn( Cum(S1)/Cum(N1), "5 day % chg", 1.4 );
AddColumn( Cum(S2)/Cum(N1), "21 day & chg", 1.4 );
AddColumn( Cum(S3)/Cum(N1), "60 day % chg", 1.4 );
AddColumn( Cum(S4)/Cum(N1), "120 day % chg", 1.4 );

AddTextColumn( "*****", "*****", 1.0 );

AddColumn( Cum(N2), "Number", 1.4 );
AddColumn( Cum(W1)/Cum(N2), "5 day % chg", 1.4 );
AddColumn( Cum(W2)/Cum(N2), "21 day & chg", 1.4 );
AddColumn( Cum(W3)/Cum(N2), "60 day % chg", 1.4 );
AddColumn( Cum(W4)/Cum(N2), "120 day % chg", 1.4 );


AEO	2/21/2008	3487	278	0.0114	0.0491	0.13
	0.3034	*****	206	0.0017	0.0388
ANN	2/21/2008	4224	286	0.0002	0.0009	0.0334
	0.0624	*****	286	0.0089	0.0321
APSG	2/21/2008	3753	185	0.0041	0.01	0.0263
	0.1658	*****	226	0.0084	0.0147








Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/