PureBytes Links
Trading Reference Links
|
Dimitris,
Nope. The question was not a trap at all - at least not in the form I asked.
What I asked was ===> If a 'foreign' function is executed, then how to detect programatically if it is successful or not ?
I of course was referring to the success or failure of the execution of the 'foreign' function and detecting it programatically.
Regards,
- Salil V Gangal
DIMITRIS TSOKAKIS <TSOKAKIS@xxxxxxxxx> wrote:
Herman,This question is a trap.How "successful or not" is defined ??It should be explained *before* the question.Foreign() function works well as a function, I use it 100 times/day for a long time. I will suppose you have similar experience.Almost all my trading money are based on Foreign() function functionality and, as you understand, I have made many checks.The foreign("MSFT","C") will give an array identical to MSFT close.Consequently, the question is automatically transferred to a "successful or not" MSFT close data.What is the meaning of "successful or not" MSFT data ??It should be clearly explained *before* this tricky question.Without this explanation, the answer is automatic : Foreign("MSFT","C") is equally successful as MSFT Close.Dimitris TsokakisPS: If "successful" means profitable, let me know and we shall do something for this...--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" <psytek@xxxx> 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@xxxx]> Sent: April 30, 2003 12:00 PM> To: amibroker@xxxxxxxxxxxxxxx> Subject: [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.> Yahoo! Groups Sponsor> > > > Send BUG REPORTS to bugs@xxxx> Send SUGGESTIONS to suggest@xxxx> -----------------------------------------> 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.
|