Look at SetForeign/RestorePriceArrays.
http://www.amibroker.com/guide/afl/afl_view.php?id=247
Any price related calculations that you do between these two calls will be
calculated using the indicated symbol. Store the result and use it later in
your Buy/Sell rules
SetForeign("^DJI");
GetOut = Cross(MA(Close, 15), MA(Close, 200);
RestorePriceArrays();
Sell = GetOut OR ...
Mike
--- In [email protected], "Marcus" <koalapi...@...> wrote:
>
> Hi I tried to look this up in the archives and did a search but there is like
> a hundred thousand messages so couldnt find it so I appoligize.
>
> This is what I would like to do.
>
> Have a condition that gets me out of a stock like say "AA" or any stock if
> the DJI crosses its MMA. So if the ^DJI does a:
>
> Cross(MA(Close,15),MA(Close,200);
> That would be one condition so if the market is not going good the system
> gets me the hell out of there. There would be additional conditions just for
> the stock of course but one condition would look at what the DJI is doing.
>
> Any help is apreaciated by Koalas everywhere :)
>