PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Dimitris,
the
challenge (for me) is to trust the last few break out days of CSCO as true
strength or simply pre earnings posturing. In this case it certainly would have
been beneficial to trust the line studies. The previous release of earnings was
not so kind......Sooo many pieces to the puzzle
<FONT face=Arial color=#0000ff
size=2>
Regards,
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: Dimitris Tsokakis
[mailto:TSOKAKIS@xxxxxxxxx]Sent: Thursday, November 06, 2003 8:37
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
Historical trendlines
8 bars ago CSCO broke the support trendline.
2 bars ago broke the resistance line in the new [parallel]
channel.
Since we can not remember everything, it is better to use the
memory of the
/*HISTORICAL TRENDLINES and BREAKOUTS*/x = Cum(1);per
= 3;// CALIBRATE THE ZIG() SENSITIVITYs1=L;s11=H;pS = TroughBars( s1,
per, 1 ) == 0;endt=SelectedValue(ValueWhen( pS, x
,1));startt=SelectedValue(ValueWhen( pS, x ,2));dtS
=endt-startt;endS = SelectedValue((ValueWhen( pS, s1,1) ));startS =
SelectedValue(( ValueWhen( pS, s1 ,2)));aS = (endS-startS)/dtS;bS =
endS;trendlineS = aS * ( x -endt ) + bS;//SUPPORT LINEpR = PeakBars(
s11, per, 1 ) == 0;endt1= SelectedValue(ValueWhen( pR, x,
1));startt1=SelectedValue(ValueWhen( pR, x, 2 ));dtR
=endt1-startt1;endR = SelectedValue(ValueWhen( pR, s11, 1 ) );startR =
SelectedValue( ValueWhen( pR, s11, 2 ));aR = (endR-startR)/dtR;bR =
endR;trendlineR = aR * ( x -endt1 ) + bR;//RESISTANCE LINE
first=Min(startt,startt1);Last=Max(endt,endt1);d=10;// INCREASE d TO
EXTEND THE LINESbullishbreakout=x>endt1 AND x<last+d AND
Cross(C,trendlineR);bearishbreakout=x>endt AND x<last+d AND
Cross(trendlineS,C);Plot(C,"Close",IIf(bullishbreakout,colorBrightGreen,IIf(bearishbreakout,colorRed,colorBlack)),64);Plot(IIf(x>=first
-d AND
x<=Last+d,trendlineS,-1e10),"Support",colorBrightGreen,1);Plot(IIf(x>=first-d
AND x<=Last+d,trendlineR,-1e10),"Resistance",colorRed,1);
Just move your cursor to the left, it will help to study the
recent behavior.
The same procedure may be used for indicators [some slight per
changes are necessary]
/*HISTORICAL TRENDLINES and BREAKOUTS for INDICATORS*/x =
Cum(1);per = 1;// CALIBRATE THE ZIG()
SENSITIVITYs1=RSI();s11=RSI();pS = TroughBars( s1, per, 1 ) ==
0;endt=SelectedValue(ValueWhen( pS, x
,1));startt=SelectedValue(ValueWhen( pS, x ,2));dtS
=endt-startt;endS = SelectedValue((ValueWhen( pS, s1,1) ));startS =
SelectedValue(( ValueWhen( pS, s1 ,2)));aS = (endS-startS)/dtS;bS =
endS;trendlineS = aS * ( x -endt ) + bS;//SUPPORT LINEpR = PeakBars(
s11, per, 1 ) == 0;endt1= SelectedValue(ValueWhen( pR, x,
1));startt1=SelectedValue(ValueWhen( pR, x, 2 ));dtR
=endt1-startt1;endR = SelectedValue(ValueWhen( pR, s11, 1 ) );startR =
SelectedValue( ValueWhen( pR, s11, 2 ));aR = (endR-startR)/dtR;bR =
endR;trendlineR = aR * ( x -endt1 ) + bR;//RESISTANCE LINE
first=Min(startt,startt1);Last=Max(endt,endt1);d=10;// INCREASE d TO
EXTEND THE LINESbullishbreakout=x>endt1 AND x<last+d AND
Cross(s1,trendlineR);bearishbreakout=x>endt AND x<last+d AND
Cross(trendlineS,s1);Plot(RSI(),"RSI",IIf(bullishbreakout,colorBrightGreen,IIf(bearishbreakout,colorRed,colorBlack)),8);Plot(IIf(x>=first
-d AND
x<=Last+d,trendlineS,-1e10),"Support",colorBrightGreen,1);Plot(IIf(x>=first-d
AND x<=Last+d,trendlineR,-1e10),"Resistance",colorRed,1);
It was VERY useful for CLZ03, two days ago.
Dimitris Tsokakis
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.
|