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

Re: [amibroker] SETFOREIGN does not give me the correct answer ...



PureBytes Links

Trading Reference Links

Please read the reference and especially the COMMENT
 
Depending on Fixup flag, Foreign will return NULL or previous day value
if there is no data for given bar on "foreign" ticker.
If "foreign" symbol has shorter history than currently selected, then
first bars (until history starts) will be set to Null.
 
Null essentially means no data.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Tuesday, March 24, 2009 7:39 PM
Subject: Re: [amibroker] SETFOREIGN does not give me the correct answer ...

Thanks Bill. That's precisely my problem. I have the feeling that the AB is using the same array structure for all three Symbols. And that it's the selected Symbol being the one used. Of course I am doing something wrong but don't know what ...
 
Regards, Ton.
 
 
----- Original Message -----
Sent: Tuesday, March 24, 2009 6:39 PM
Subject: Re: [amibroker] SETFOREIGN does not give me the correct answer ...

When I run the code it recognizes the "foreign" symbols.  However, it gives "empty" for first close and the start dates are the same which is not correct.
 
Bill
----- Original Message -----
From: amsiev
Sent: March 24, 2009 12:08 PM
Subject: [amibroker] SETFOREIGN does not give me the correct answer ...

Let's take 3 ETF's : AAXJ,BWV and EWN. I want to get the start date, first close etc. of each time series by using SetForeign. What's wrong with the following code ? It looks as if AB is using the selected symbol and not the symbol from the SETFOREIGN ... Must be something very simple but ...

SetBarsRequired(sbrAll,sbrAll);

SetForeign("AAXJ");
printf("Symbol "+Name()+"\n");
printf("First Close "+WriteVal(Close[0])+"\n");
printf("Last Close "+WriteVal(Close[BarCount-1])+"\n");
printf("Total Bars "+WriteVal(BarCount-1)+"\n");
printf("Start Date "+WriteVal( BeginValue( DateTime() ), formatDateTime )+"\n");

SetForeign("BWV");
printf("Symbol "+Name()+"\n");
printf("First Close "+WriteVal(Close[0])+"\n");
printf("Last Close "+WriteVal(Close[BarCount-1])+"\n");
printf("Total Bars "+WriteVal(BarCount-1)+"\n");
printf("Start Date "+WriteVal( BeginValue( DateTime() ), formatDateTime )+"\n");

SetForeign("EWN");
printf("Symbol "+Name()+"\n");
printf("First Close "+WriteVal(Close[0])+"\n");
printf("Last Close "+WriteVal(Close[BarCount-1])+"\n");
printf("Total Bars "+WriteVal(BarCount-1)+"\n");
printf("Start Date "+WriteVal( BeginValue( DateTime() ), formatDateTime )+"\n");

Regards, Ton.



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxps.com
    mailto:amibroker-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxcom

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___