PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Paul,
you
might have a look at the Setforeign and restorepricearray
functions...
<FONT face=Arial color=#0000ff
size=2>
the
error stating that "T" is not initialized is because, well, T has not been
initialized. You need to first set T to an array.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>T="your array" in your case you are trying to T-Close
to a foreign symbol
<FONT face=Arial color=#0000ff
size=2>
try
instead something like
<FONT face=Arial color=#0000ff
size=2>
SetForeign("!dj30");<SPAN
class=320355417-16032004> //uses esignal dow jones, pick your
poison
Short =
Cross(SAR(.005,.05),C);
Cover = Cross(C, SAR(0.005,
0.05));
You
may wish to check your AA settings to verify that you have enabled short
trading (AA/settings/positions)
<FONT face=Arial color=#0000ff
size=2>
Regards,
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: Paul A.
[mailto:amibroker@xxxxxxxxxxxxx]Sent: Tuesday, March 16, 2004 12:37
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Using
Foreign with SAR, Short & CoverT_Close = Foreign(T,
Close);Short = Cross(SAR(T_Close, 0.005, 0.05), T_Close);Cover =
Cross(T_Close, SAR(T_Close, 0.005, 0.05));What is wrong with the above
code for backtesting, please? Yes, I realize that SAR is not
documented to take a first argument of a ticker, but then how do I tell SAR
that I want it to exit from the current stock when a _different_ stock
crosses the different stock's SAR?And why am I getting error msgs from
the compiler about "T" being "uninitialized"? How do I explain to the
compiler that I wish to refer to the "foreign" ticker symbol
"T"?Finally, what is wrong with my use of "Short" and "Cover"? I
can't get the compiler to accept this usage at all.Thanks for any
help. -Paul
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 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.
|