PureBytes Links
Trading Reference Links
|
Hello,
Because built-in MACD uses indirectly the Close array
there are actually two solutions to this problem:
1. Overwrite Close array and use build-in MACD:
SaveOrigClose = Close; // save original close array
Close = Foreign( "^NDX", "C");
MACDofNDX = MACD();
Close = SaveOrigClose; // restore
2. Re-implement MACD using EMA
nc = Foreign( "^NDX", "C");
MACDofNDX = EMA( nc, 12 ) - EMA( nc, 26 );
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
----- Original Message -----
From: <miked@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, November 30, 2001 9:16 PM
Subject: [amibroker] MACD and Foreign
> I almost have my first trading system designed. I have another
> question.
>
> I am trying to build a trading system that will look at technicals of
> a company as well as an index at the same time. For instance if the
> NADAQ is trending down I may not want to go long regardless of the
> individual stock technicals.
>
> I am using the foreign function to import the Index array
>
> indexc = Foreign( "^NDX", "C");
>
> I want to compare the MACD of the Index to the Stock. So, if the
> MACD of the index is less than 0. I don't want to go long on the
> stock.
>
>
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
|