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

RE: [amibroker] Russell 2000 constituent lists



PureBytes Links

Trading Reference Links

Yuki,
Here is the 
// Historical H&S
x = Cum(1);
per = 3;
back=100;
inter=200;
s11=H;s12=L;R=0;RR=0;
/* H & S */
pR = PeakBars( s11, per, 1 ) == 0;
endt1= SelectedValue(ValueWhen( pR, x, R+1 ));
medt1=SelectedValue(ValueWhen( pR, x, R+2));
startt1=SelectedValue(ValueWhen( pR, x, R+3 ));
dt1=endt1-startt1;
C1=x==endt1 OR x==medt1 OR x==startt1;
endR = SelectedValue(ValueWhen( pR, s11, R+1 ) );
medR=SelectedValue(ValueWhen( pR, s11, R+2 ) );
startR = SelectedValue( ValueWhen( pR, s11, R+3  ));
Filter1=medR>endR AND medR>startR AND abs(startR-endR)<0.02*
(startR+endR) AND
dt1<inter AND endt1>SelectedValue(x)-back;
MaxGraph=12;Graph1=C;Graph1Style=64;GraphXSpace=1;
/*H&S Neck Line*/
Aper=medt1-startt1;bper=endt1-medt1;
La=  SelectedValue(ValueWhen(x==medt1,LLV(L,Aper)));
Lb=SelectedValue(ValueWhen(x==-1+endt1,LLV(L,bper)));
Fa=L==La AND x>startt1 AND x<medt1;
Fb=L==Lb AND x>medt1 AND x<endt1;
endt= SelectedValue(ValueWhen( Fb, x ));
startt=SelectedValue(ValueWhen( Fa, x ));
dtS =endt-startt;endS = Lb;startS = La;
aS = (endS-startS)/dtS;bS = endS;
trendlineS = aS * ( x  -endt ) + bS; 
Graph3 = IIf(Filter1 AND x>startt-5 AND x<endt+back,trendlineS,-
1e10);Graph3BarColor=7;
/*Inverted H & S*/
tpR = TroughBars( s12, per, 1 ) == 0;
tendt1=SelectedValue(ValueWhen(tpr,x,RR+1));
tmedt1=SelectedValue(ValueWhen(tpr,x,RR+2));
tstartt1=SelectedValue(ValueWhen(tpr,x,RR+3));
tdt1=tendt1-tstartt1;
C2=x==tendt1 OR x==tmedt1 OR x==tstartt1;
tendR = SelectedValue(ValueWhen( tpR, s12, RR+1 ) );
tmedR=SelectedValue(ValueWhen( tpR, s12, RR+2 ) );
tstartR = SelectedValue( ValueWhen( tpR, s12, RR+3  ));
Filter2=tmedR<tendR AND tmedR<tstartR AND
abs(tstartR-tendR)<0.02*(tstartR+tendR) AND tdt1<inter AND
tendt1>SelectedValue(x)-back;

/*Inverted H&S Neck Line*/
tAper=tmedt1-tstartt1;tbper=tendt1-tmedt1;
Ha=  SelectedValue(ValueWhen(x==tmedt1,HHV(H,tAper)));
Hb=SelectedValue(ValueWhen(x==-1+tendt1,HHV(H,tbper)));
tFa=H==Ha AND x>tstartt1 AND x<tmedt1;
tFb=H==Hb AND x>tmedt1 AND x<tendt1;
Rendt= SelectedValue(ValueWhen(tFb, x ));
Rstartt=SelectedValue(ValueWhen( tFa, x ));
Rdt =Rendt-Rstartt;endR = Hb;startR = Ha;
aR = (endR-startR)/Rdt;bR = endR;
trendlineR = aR * ( x  -Rendt ) + bR; 
Graph4 = IIf(Filter2 AND x>Rstartt-5 AND x<Rendt+back,trendlineR,-
1e10);Graph4BarColor=10;
upcr=filter2 AND Cross(C,trendlineR) AND x>tendt1;
dncr=filter1 AND Cross(trendlineS,C) AND x>endt1;

/*H&S target*/
diff1=ValueWhen(x==medt1,C-trendlineS);
target1=trendlineS-diff1;
target1cross=Cross(target1,C) AND Filter1;
Graph5=IIf(filter1 AND x>endt1 AND x<endt1+back,target1,-1e10);
Graph5Style=8;Graph5BarColor=7;
/*Inverted H&S target*/
diff2=ValueWhen(x==tmedt1,trendlineR-C);
target2=trendlineR+diff2;
target2cross=Cross(C,target2) AND Filter2;
Graph6=IIf(Filter2 AND x>tendt1 AND x<tendt1+back,target2,-
1e10);Graph6Style=8;Graph6BarColor=10;
Graph1BarColor=IIf(C1 AND Filter1,7,IIf(C2 AND Filter2,10,IIf(upcr OR 
target2cross,5,IIf(dncr OR target1cross,4,1))));
GraphXSpace=5;

Just place your cursor on, say, Nov11, 2003 to see the setup for this 
period.
I hope it will be useful.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Yuki,
> I will post later today a nice code to see H&S of the past [not 
only 
> the recent one].
> BTW, do you agree with Hiroaki Kuramochi  comment at
> http://biz.yahoo.com/rf/040119/markets_japan_stocks_12.html
> 
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
> > Hi DIMITRIS,
> > 
> > Tuesday, January 20, 2004, 4:14:18 PM, you wrote:
> > 
> > DT> Yuki,
> > DT> 1.
> > DT> An invH&S with NEGATIVE SLOPE neck line [in a bullish 
> environment] is
> > DT> perhaps the best case [the same with a H&S with a positive 
> slope neck
> > DT> line in a bearish environment]. The target is lower day by 
day, 
> time
> > DT> is on your side.
> > 
> > Well DT, I had never considered those two qualifiers together 
> before,
> > but I shall certainly keep my eyes open, and do some looking back 
as
> > well.  Thanks.
> > 
> > DT> I know we have different angles to see the same thing, but 
this 
> is my
> > DT> H&S experience : During the last bearish years the invH&S 
were 
> rare
> > DT> and could not reach the target, it was the verification 
period 
> for
> > DT> H&S. Now the environment has changed. As you remember, ^N225 
> could
> > DT> not reach its last November H&S target, the bullish market 
was 
> not
> > DT> helping this [bearish] formation.
> > 
> > That is correct; it came up just a little short of the target.
> > 
> > DT> I do not trade ^N225 [I have to "study" it first], but SYMC 
> broke its
> > DT> neckline at $33 and will meet its negative slope target line 
at 
> $37
> > DT> [in 18 bars] and it is no way a joke.[Friday´s high was 
> $37.3 ...]
> > DT> 2.
> > DT> The timing system is for June2003 till May 2004 period. Note 
> also
> > DT> that it follows the top Equity and a draw back is not a 
> surprise. As
> > DT> I wrote yesterday, other potential combinations are coming to 
> replace
> > DT> the 25/28 if it is not the next IP champion. [I like the 
18/37, 
> it
> > DT> has the 4th rank now but it is ascending the last bars...].
> > DT> 3. For the short term, the Keltner observation was 
interesting 
> and
> > DT> could take you from 10,715 [Jan16 opening] to 11,193[Jan20 
> high].
> > DT> It was more than +4% in 3 sessions...
> > 
> > If you exited at the high, yes. ^_-
> > 
> > DT> ^N225 was a good boy today, its high touched the upper TEMA 
> Keltner
> > DT> resistance in 3 sessions and this is perhaps an explanation 
why 
> we
> > DT> may still use this 40-year theory like a 40-year red wine 
[note 
> here
> > DT> that I still enjoy the Stones...]
> > 
> > Brown Sugah . . . but they are really past their prime these days.
> > ^^_^^
> > 
> > Some things to keep an eye on as usual DT.  Thanks.
> > 
> > BTW, we closed poorly today, which is not a big surprise.  I 
almost
> > shorted, but it's the "too cute" play right now.  A bit early and
> > right into strength is not the way to go. But a little H&S on the
> > futures in the PM session, after the fake move back to challenge 
the
> > (11,200) high failed. Then it was straight down, with futures 
> closing
> > more than 50 below cash, and only +30.  Maybe some of that timing
> > equity will come back -- but it all depends on the US tonight.  
> Today
> > was "play day" (while the cat [US market] is away, the Japanese 
mice
> > will play).
> > 
> > Surprisingly, our banks went nowhere today, even in the mad 
> craziness
> > of the early PM session, and finished down.  For a long, long 
time,
> > the market has followed the banks -- in both directions.  Maybe 
this
> > pattern is finally going to end, or maybe that's why the futures 
> gave
> > it almost all back by the close.
> > 
> > Yuki


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:
 http://docs.yahoo.com/info/terms/