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

[amibroker] How to detect if 'foreign' is successful or not ?



PureBytes Links

Trading Reference Links



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.






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.