[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

Yep. That's what I did also. There is always another way to Rome. But that's not how I want it to work. SetForeign has the Symbol characteristics and therefore knows the number of elements and therefore should be able to resize the array ... Same for Foreign ... I am missing something ...
 
Regards, Ton.
 
----- Original Message -----
Sent: Tuesday, March 24, 2009 6:49 PM
Subject: Re: [amibroker] SETFOREIGN does not give me the correct answer ...

Hi - I don't believe SetForeign resizes the arrays, I think it just
overwrites the contents. I ran into that in the past, I think what I did
was to set the current ticker to an index or something with a very long
history and then search for the first non-null value. Might want to do a
quick plot of the foreign values though just to be sure...

Steve

----- Original Message -----
From: "amsiev" <ton.sieverding@scarlet.be>
To: <amibroker@xxxxxxxxxps.com>
Sent: Tuesday, 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
>
>
>
>



__._,_.___


**** 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

__,_._,___