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

Re: [amibroker] Re: Sigma Bands



PureBytes Links

Trading Reference Links




Explore thae database for the n=1 last quotations 
with
 
// Long term RSI categories<FONT 
size=2>
n=200;
r1=MA(<FONT 
size=2>RSI(n/4<FONT 
size=2>),n);
r2=LinearReg(r1,n/<FONT 
size=2>2);Filter=1<FONT 
size=2>;
CategoryRemoveSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>21 ); 
CategoryRemoveSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>22 ); 
CategoryRemoveSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>23 ); 
CategoryRemoveSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>24 ); 
Cond1=LastValue(<FONT 
size=2>ROC(r1,1<FONT 
size=2>)>=0 AND r1<<FONT 
size=2>50); //bullish<FONT 
size=2>
Cond2=LastValue(<FONT 
size=2>ROC(r1,1<FONT 
size=2>)>=0 AND r1>=<FONT 
size=2>50); //extra 
bullish
Cond3=LastValue(<FONT 
size=2>ROC(r1,1<FONT 
size=2>)<0 AND r1>=<FONT 
size=2>50);//bearish<FONT 
size=2>
Cond4=LastValue(<FONT 
size=2>ROC(r1,1<FONT 
size=2>)<0 AND r1<<FONT 
size=2>50); //extra 
bearish
if( Cond1 ) 
{ 
CategoryAddSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>21 ); 
} 
if( Cond2 ) 
{ 
CategoryAddSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>22 ); 
} 
if( Cond3 ) 
{ 
CategoryAddSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>23 ); 
} 
if( Cond4 ) 
{ 
CategoryAddSymbol( <FONT 
size=2>"", categoryWatchlist, <FONT 
size=2>24 ); 
} 
AddColumn(r1,"r1"<FONT 
size=2>);
AddColumn(Cond1,"cond1"<FONT 
size=2>,1.0);
AddColumn(Cond2,"cond2"<FONT 
size=2>,1.0);
AddColumn(Cond3,"cond3"<FONT 
size=2>,1.0);
AddColumn(Cond4,"cond4"<FONT 
size=2>,1.0);
 
Hit View->Refresh All  and the stocks will 
automatically be placed in 
WL21:Bullish
WL22:Extra bullish
WL23:Bearish
WL24:Extra bearish.
The use of the separation is mainly protective :
Avoid, for example, to go Long with stocks belonging to 
the WL24.
[See MEDI and FHCC the last 3-4 months. Long trades, from any 
system, would probably cause damages]
You may ignore Short signals for stocks in the first 
categories.
CSCO, for example, would not give important Short profits 
from midMarch 2003 till the end of Jan2004.
The 4 phases are easily recognized in Indicator builder 
with
 
n=200;
r1=MA(<FONT 
size=2>RSI(n/4<FONT 
size=2>),n);
r2=LinearReg(r1,n/<FONT 
size=2>2);
Plot(r1,"["<FONT 
size=2>+WriteVal(n,<FONT 
size=2>1.0)+"]"<FONT 
size=2>,1,<FONT 
size=2>1);
Plot(r2,"r2"<FONT 
size=2>,4,<FONT 
size=2>1);GraphXSpace=5<FONT 
size=2>;
Plot( 5<FONT 
size=2>,"Ribbon",<FONT 
size=2>IIf( ROC<FONT 
size=2>(r1,1)>=<FONT 
size=2>0 AND r1<50<FONT 
size=2>, colorTurquoise,IIf(<FONT 
size=2>ROC(r1,1<FONT 
size=2>)>=0 AND r1>=<FONT 
size=2>50,colorBrightGreen,<FONT 
size=2>IIf(ROC<FONT 
size=2>(r1,1)<<FONT 
size=2>0 AND r1>=50<FONT 
size=2>,colorPink,colorDarkRed))),styleOwnScale|styleArea|styleNoLabel, 
-0.5, <FONT 
size=2>100 );
 
THE N100 MARKET BEHAVIOR
Scan all N100 stocks, all quotations with
 
// LONGTERM RSI COMPOSITES
n=200;
r1=MA(<FONT 
size=2>RSI(n/4<FONT 
size=2>),n);
r2=LinearReg(r1,n/<FONT 
size=2>2);
AddToComposite(r1>50<FONT 
size=2>,"~bullRSI",<FONT 
size=2>"v");
AddToComposite(r1>50<FONT 
size=2> AND r1>Ref(r1,-<FONT 
size=2>1),"~bullRSIa"<FONT 
size=2>,"v");
AddToComposite(r1><FONT 
size=2>Ref(r1,-1<FONT 
size=2>),"~bullRSIb",<FONT 
size=2>"v");
AddToComposite(1,"~count","v");
Buy=0;
 
and then, in Indicator builder paste the
 
// LONGTERM RSI COMPOSITES GRAPHS<FONT 
size=2>
x=100*<FONT 
size=2>Foreign("~bullRSI"<FONT 
size=2>,"v")/<FONT 
size=2>Foreign("~count"<FONT 
size=2>,"v");
xa=100*<FONT 
size=2>Foreign("~bullRSIa"<FONT 
size=2>,"v")/<FONT 
size=2>Foreign("~count"<FONT 
size=2>,"v");
xb=100*<FONT 
size=2>Foreign("~bullRSIb"<FONT 
size=2>,"v")/<FONT 
size=2>Foreign("~count"<FONT 
size=2>,"v");
Plot(x,"BullRSI"<FONT 
size=2>,1,<FONT 
size=2>1+4<FONT 
size=2>);Plot(xb,<FONT 
size=2>"Asc RSI",4<FONT 
size=2>,1+<FONT 
size=2>4);
Plot(xa,"Bull+Asc RSI"<FONT 
size=2>,2,<FONT 
size=2>2+4<FONT 
size=2>);
 
The real party was from A [the lowest BullRSI] till B [when 
the ascending RSIs became less than the RSI>50]
The market is obviously o/b the last 5 moths and retracements 
are expected. 
The sharp troughs of the [red] ascending RSI population give 
nice re-entry points.
Dimitris 
Tsokakis


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.







Attachment:
LONGTERMRSI.gif

Attachment: Description: "Description: GIF image"