PureBytes Links
Trading Reference Links
|
Herman,
>>Cum(Foreign(...))==0<<
Thanks for the suggestion.
Regards,
- Salil V GangalHerman vandenBergen <psytek@xxxxxxxx> wrote:
Salil, I'd love an answer to this as i am struggling to detect the existence of Composites.
I thought of using IsEmpty(Foreign(...)) but I couldn't get it to work well, another way may be to use Cum(Foreign(...))==0 to indicate there is no data... but there must be a better way.
herman
-----Original Message-----From: Salil V Gangal [mailto:salil_gangal@xxxxxxxxx]Sent: April 30, 2003 12:00 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] How to detect if 'foreign' is successful or not ?
Friends,
If a 'foreign' function is executed, then how to detect programatically if it is successful or not ?
I thought IsNull will be useful, but it was not. I executed the following code (and there is MSFT in the database I'm using) and it shows 'IsNull is true' for both. I tried the code without 'Ref' as well ... Same result.
security=foreign("MSFT","C");
if ( IsNull(Ref(security,0)) ) {
message = "IsNull is true";
}
else {
message = "IsNull is false";
}
message;
security=foreign("DoesNotExist","C");
if ( IsNull(Ref(security,0)) ) {
message = "IsNull is true";
}
else {
message = "IsNull is false";
}
message;
Regards,
- Salil V Gangal
Do you Yahoo!?The New Yahoo! Search - Faster. Easier. Bingo. Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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. Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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.
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
Yahoo! Groups Sponsor
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.
|