Tomasz/Herman thanks for the answer. The fact that SetForeign and Foreign 
should be in sync with the underlying array does not mean to me that these 
foreign arrays cannot be loaded for the full 100%. I really don't see why you 
could not have the following arrays in AB :

Original Array                                   
|------------------------------------SSSSSSSSSS----|
Foreign A                
|-----------------------------------------------------------------------------------|
Foreign B                                                            
|----------------------------------------------|

Where S is the Screen. Both Foreign A and Foreign B can be in sync with the 
Original array. I see no reason why not. But that's not how it's programmed in 
AB of course. When I am trying to get the first Close in Foreign A with 
Close[0] the result is Empty. Because Foreign A only starts where the original 
array starts. If for what ever reason I want the beginning values of Foreign A, 
it's impossible to get these values ... Other than first loading an Original 
Array that's longer than both Foreign A or B. This is what I am doing now. But 
that's not how I would like it to be. I thought I did something wrong. But it 
seems that's not the case ...

Regards, Ton.


  ----- Original Message ----- 
  From: Tomasz Janeczko 
  To: [email protected] 
  Sent: Wednesday, March 25, 2009 1:06 AM
  Subject: Re: Re[2]: [amibroker] SETFOREIGN does not give me the correct 
answer ...



  Precisely. SetForeign and Foreign is intended to bring "other" symbol data in 
timestamp synchronized manner and it work
  is actuall described in the guide:
  http://www.amibroker.com/f?foreign

  Best regards,
  Tomasz Janeczko
  amibroker.com
    ----- Original Message ----- 
    From: Herman 
    To: Ton Sieverding 
    Sent: Tuesday, March 24, 2009 9:51 PM
    Subject: Re[2]: [amibroker] SETFOREIGN does not give me the correct answer 
...


    afaik, Since Foreign is intended to plot on the current ticker's chart its 
elements are padded to conform to the current chart. If you want the foreign 
ticker to set the number of bars displayed you should make that one the current 
ticker and call the other tickers with foreign.




    It make sense that the current ticker does not change (is the reference) 
when you display foreign tickers, if it did the underlying symbol would be 
changing its number of bars all the time, i.e. sometimes it would be padded, at 
other times bars would be removed.




    herman







    Tuesday, March 24, 2009, 2:45:32 PM, you wrote:




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

          From: Steve Dugas 

          To: [email protected] 

          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" <[email protected]>

          To: <[email protected]>

          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

          >

          >

          >

          > 













         


  

Reply via email to