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

[amibroker] Schaff Trend Cycle



PureBytes Links

Trading Reference Links





//replace your watchlist number 
list = CategoryGetSymbols<FONT 
size=2>( categoryWatchlist, <FONT color=#ff00ff 
size=2>0 );
p = 20;
Count1=0;
rank = 0;
symVal = 0;
relval = 0;
Ownval = ROC<FONT 
size=2>(C,p);
for( i = <FONT color=#ff00ff 
size=2>0; ( sym = <FONT color=#0000ff 
size=2>StrExtract( list, i ) ) != <FONT 
color=#ff00ff size=2>""; i++ )
{
symVal = Nz<FONT 
size=2>(Foreign( sym, 
"Close" ));
relval = ROC(symval, 
p);
n=Nz(<FONT 
color=#0000ff size=2>IIf(relVal!=<FONT 
color=#ff00ff size=2>0,<FONT color=#ff00ff 
size=2>1,<FONT color=#ff00ff 
size=2>0));
Count1[BarCount-1<FONT 
size=2>]=Count1[BarCount-1<FONT 
size=2>]+n[BarCount-1<FONT 
size=2>];
if(relval[BarCount-<FONT color=#ff00ff 
size=2>1] > Ownval[BarCount-<FONT 
color=#ff00ff size=2>1])
rank[BarCount-1] 
= rank[BarCount-1<FONT 
size=2>]+1;
}
AddColumn(Count1,<FONT color=#ff00ff 
size=2>"count",<FONT color=#ff00ff 
size=2>1.0);
AddColumn(rank,<FONT color=#ff00ff 
size=2>"rank",<FONT color=#ff00ff 
size=2>1.0);
rank[BarCount-1] 
= int(<FONT 
color=#ff00ff size=2>100<FONT 
size=2>*(Count1[BarCount-1<FONT 
size=2>]-rank[BarCount-1<FONT 
size=2>])/Count1
[BarCount-1<FONT 
size=2>]);
Filter = 1<FONT 
size=2>;
AddColumn(Ownval,<FONT color=#ff00ff 
size=2>"ROC",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(rank,<FONT color=#ff00ff 
size=2>"rank",<FONT color=#ff00ff 
size=2>1.0);


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.