PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Modify to your needs:
//Calculating QRS
Buy<FONT face="Courier New"
size=1>=<FONT face="Courier New" color=#ff0000
size=1>Sell=<FONT
face="Courier New" color=#ff0000 size=1>Short<FONT face="Courier New"
size=1>=<FONT face="Courier New" color=#ff0000
size=1>Cover=<FONT
face="Courier New" color=#ff00ff size=1>0<FONT face="Courier New"
size=1>;
Filter=<FONT
face="Courier New" color=#0000ff size=1>Status<FONT face="Courier New"
size=1>(<FONT face="Courier New" color=#ff00ff
size=1>"LastBarInTest");<FONT
face="Courier New" color=#0000ff size=1>
SetOption(<FONT
face="Courier New" color=#ff00ff size=1>"NoDefaultColumns"<FONT
face="Courier New" size=1>,<FONT face="Courier New" color=#ff0000
size=1>True);
b=<FONT face="Courier New" color=#ff0000
size=1>BarCount-<FONT
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New"
size=1>; p=62<FONT
face="Courier New" size=1>; i=<FONT face="Courier New" color=#ff00ff
size=1>0;
T1=i++*(P+<FONT face="Courier New" color=#ff00ff
size=1>1);
T2=i*P+i-<FONT face="Courier New" color=#ff00ff
size=1>1;
T3=i++*(p+<FONT face="Courier New" color=#ff00ff
size=1>1);
T4=i*p+i-<FONT face="Courier New" color=#ff00ff
size=1>1;
T5=i++*(p+<FONT face="Courier New" color=#ff00ff
size=1>1);
T6=i*p+i-<FONT face="Courier New" color=#ff00ff
size=1>1;
T7=i++*(p+<FONT face="Courier New" color=#ff00ff
size=1>1);
T8=i*p+i-<FONT face="Courier New" color=#ff00ff
size=1>1;
Price=<FONT face="Courier New" color=#ff0000
size=1>C;
Q1 = Price[b-T1]/Price[b-T2] + Price[b-T3]/Price[b-T4] +
Price[b-T5]/Price[b-T6]+Price[b-T7]/Price[b-T8];<FONT
face="Courier New" color=#0000ff size=1>
AddColumn(Q1,<FONT
face="Courier New" color=#ff00ff size=1>"QRSLinear"<FONT
face="Courier New" size=1>,<FONT face="Courier New" color=#ff00ff
size=1>1.3);
Price=<FONT face="Courier New" color=#ff0000
size=1>C;
QRS=<FONT face="Courier New" color=#ff00ff
size=1>0;
b=<FONT face="Courier New" color=#ff0000
size=1>BarCount-<FONT
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New"
size=1>;
BarsInRange = <FONT face="Courier New" color=#ff00ff
size=1>62; // 0-62
NumberRanges = <FONT face="Courier New" color=#ff00ff
size=1>3; // 0-3<FONT
face="Courier New" color=#ff0000 size=1>
for(i=<FONT
face="Courier New" color=#ff00ff size=1>0<FONT face="Courier New"
size=1>;i<=NumberRanges;i++)
{
Ta = i*(P+<FONT face="Courier New" color=#ff00ff
size=1>1); // Latest Range
limit
Tb = (i+<FONT face="Courier New" color=#ff00ff
size=1>1)*P+i; // Earlier Range
limit
QRS = QRS + Price[b-Ta]/Price[b-Tb];
}
AddColumn(QRS,<FONT
face="Courier New" color=#ff00ff size=1>"QRSLoop"<FONT face="Courier New"
size=1>,1.3<FONT
face="Courier New" size=1>);
NumberStocks=<FONT face="Courier New" color=#ff00ff
size=1>0;
N100WL = <FONT face="Courier New" color=#ff00ff
size=1>0;
function QRSrocNum(
Price )
{
b=<FONT face="Courier New" color=#ff0000
size=1>BarCount-<FONT
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New"
size=1>;
ROCrankNum = (
Price[b ]/price[b- <FONT face="Courier New" color=#ff00ff
size=1>62]+
Price[b- <FONT face="Courier New" color=#ff00ff
size=1>63]/Price[b-<FONT
face="Courier New" color=#ff00ff size=1>125<FONT face="Courier New"
size=1>]+
Price[b-<FONT face="Courier New" color=#ff00ff
size=1>126]/Price[b-<FONT
face="Courier New" color=#ff00ff size=1>188<FONT face="Courier New"
size=1>]+
Price[b-<FONT face="Courier New" color=#ff00ff
size=1>189]/Price[b-<FONT
face="Courier New" color=#ff00ff size=1>251<FONT face="Courier New"
size=1>]);
<FONT face="Courier New" color=#ff0000
size=1>return ROCrankNum;
}
Tx=QRSrocNum( Price );<FONT face="Courier New"
color=#0000ff size=1>
AddColumn(Tx,<FONT
face="Courier New" color=#ff00ff size=1>"QRSfunction"<FONT
face="Courier New" size=1>,<FONT face="Courier New" color=#ff00ff
size=1>1.3);
<FONT
size=2><FONT
face="Courier New" color=#ff0000 size=1>
// QP QRS Calculations
Buy<FONT face="Courier New" color=#000000
size=1>=<FONT face="Courier New" color=#ff0000
size=1>Sell<FONT face="Courier New" color=#000000
size=1>=<FONT face="Courier New" color=#ff0000
size=1>Short<FONT face="Courier New" color=#000000
size=1>=<FONT face="Courier New" color=#ff0000
size=1>Cover<FONT face="Courier New" color=#000000
size=1>=0<FONT
face="Courier New" size=1>;<FONT
face="Courier New" color=#ff0000 size=1>
Filter<FONT face="Courier New" color=#000000
size=1>=<FONT face="Courier New" color=#0000ff
size=1>Status<FONT face="Courier New" color=#000000
size=1>(<FONT face="Courier New" color=#ff00ff
size=1>"LastBarInTest")
AND<FONT
face="Courier New" color=#000000 size=1> <FONT face="Courier New"
color=#ff0000 size=1>BarCount<FONT face="Courier New" color=#000000
size=1>-1<FONT
face="Courier New" color=#000000 size=1> > <FONT face="Courier New"
color=#ff00ff size=1>252<FONT
color=#000000>;<FONT face="Courier New" color=#0000ff
size=1>
SetOption<FONT face="Courier New" color=#000000
size=1>(<FONT face="Courier New" color=#ff00ff
size=1>"NoDefaultColumns"<FONT face="Courier New" color=#000000
size=1>,<FONT face="Courier New" color=#ff0000
size=1>False<FONT
color=#000000>);
Price = <FONT face="Courier New" color=#ff0000
size=1>Open;
// using numbers (fast<SPAN
class=312341801-29022004>er)
b=<FONT
face="Courier New" color=#ff0000 size=1>BarCount<FONT
face="Courier New" size=1>-<FONT face="Courier New" color=#ff00ff
size=1>1;
RankNum = (Price[b]/price[b-<FONT face="Courier New"
color=#ff00ff size=1>62]*<FONT
face="Courier New" color=#ff00ff size=1>2<FONT face="Courier New"
size=1>+
Price[b-<FONT face="Courier New" color=#ff00ff
size=1>63]/Price[b-<FONT
face="Courier New" color=#ff00ff size=1>125<FONT face="Courier New"
size=1>]+
Price[b-<FONT face="Courier New" color=#ff00ff
size=1>126]/Price[b-<FONT
face="Courier New" color=#ff00ff size=1>188<FONT face="Courier New"
size=1>]+
Price[b-<FONT face="Courier New" color=#ff00ff
size=1>189]/Price[b-<FONT
face="Courier New" color=#ff00ff size=1>251<FONT face="Courier New"
size=1>])/5<FONT
face="Courier New" size=1>;
// using arrays (slow<SPAN
class=312341801-29022004>er)
RankArray = Price/<FONT
face="Courier New" size=1>Ref<FONT face="Courier New"
size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>62)*<FONT
face="Courier New" color=#ff00ff size=1>0.4<FONT face="Courier New"
size=1>+
Ref<FONT face="Courier New" color=#000000
size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>63)/<FONT
face="Courier New" color=#0000ff size=1>Ref<FONT face="Courier New"
color=#000000 size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>125)*<FONT
face="Courier New" color=#ff00ff size=1>0.2<FONT face="Courier New"
size=1>+<FONT face="Courier New"
color=#0000ff size=1>
Ref<FONT face="Courier New" color=#000000
size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>126)/<FONT
face="Courier New" color=#0000ff size=1>Ref<FONT face="Courier New"
color=#000000 size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>188)*<FONT
face="Courier New" color=#ff00ff size=1>0.2<FONT face="Courier New"
size=1>+<FONT face="Courier New"
color=#0000ff size=1>
Ref<FONT face="Courier New" color=#000000
size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>189)/<FONT
face="Courier New" color=#0000ff size=1>Ref<FONT face="Courier New"
color=#000000 size=1>(Price,-<FONT face="Courier New" color=#ff00ff
size=1>251)*<FONT
face="Courier New" color=#ff00ff size=1>0.2<FONT face="Courier New"
size=1>;
<FONT face="Courier New"
color=#0000ff size=1>
AddColumn<FONT face="Courier New" color=#000000
size=1>(RankNum,<FONT face="Courier New" color=#ff00ff
size=1>"RankNum"<FONT face="Courier New" color=#000000
size=1>,1.2<FONT
face="Courier New" size=1>);<FONT
face="Courier New" color=#0000ff size=1>
AddColumn<FONT face="Courier New" color=#000000
size=1>(RankArray,<FONT face="Courier New" color=#ff00ff
size=1>"RankArray"<FONT face="Courier New" color=#000000
size=1>,1.2<FONT
face="Courier New" size=1>);
<FONT
size=2>
<FONT
size=2>
<FONT
size=2> -----Original
Message-----From: mickeyamelinckx
[mailto:mickeyA@xxxxxxxxxxx]Sent: Saturday, February 28, 2004 7:39
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] RS
codeI though I saw some RS code available for
AB but can't seem to find it anymore. You know and RS like IBD's
RS.Has enyone a scan like this to start from
?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
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 Sponsor
ADVERTISEMENT
Click Here
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.
|