Have a look at AddToComposite
http://www.amibroker.com/guide/afl/afl_view.php?id=7
AddToComposite(Foreign("846900","o"), "~MyDAX", "O");
AddToComposite(IIF(IsEmpty(Foreign("A0C4CA","h")),Foreign
("846900","h"),Max(Foreign("846900","h"),Foreign
("A0C4CA","h"))), "~MyDAX", "H");
AddToComposite(IIf(IsEmpty(Foreign("A0C4CA","l")),Foreign
("846900","l"),Min(Foreign("846900","l"),Foreign
("A0C4CA","l"))), "~MyDAX", "L");
AddToComposite(IIf(IsEmpty(Foreign("A0C4CA","c")),Foreign
("846900","c"),Foreign("A0C4CA","c")), "~MyDAX", "C");
New symbol ~MyDAX will appear under Market253 fully populated
according to your logic.
Add flags for exploration and backtesting as needed.
Mike
--- In [email protected], Thomas Ludwig <[EMAIL PROTECTED]>
wrote:
>
> Hello,
>
> I want to create an artificial ticker from two existing tickers. If
I do
> it this way:
>
> O1=Foreign("846900","o");
> H1=IIf(IsEmpty(Foreign("A0C4CA","h")),Foreign("846900","h"),Max
(Foreign("846900","h"),Foreign("A0C4CA","h")));
> L1=IIf(IsEmpty(Foreign("A0C4CA","l")),Foreign("846900","l"),Min
(Foreign("846900","l"),Foreign("A0C4CA","l")));
> C1=IIf(IsEmpty(Foreign("A0C4CA","c")),Foreign("846900","c"),Foreign
("A0C4CA","c"));
>
> PlotOHLC(O1,H1,L1,C1,"MyDAX",colorBlack,styleCandle);
>
>
> ... I get it as an indicator - but that's not what I want. In order
to
> get an artificial ticker I guess that I have to export the values
to an
> ASCII file and import it again using fputs() and fgets() but I'm
not
> sure how to do it. Any suggestions would be highly welcome.
>
> Regards,
>
> Thomas
>