[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Referencing an indicator in a foreign chart?



PureBytes Links

Trading Reference Links

Hi all, I'm trying to use the value of an indicator (DMI value for Dow
Jones Industrials)in a system formula for confirmation of market
direction.

I know I need to use the "foreign" function but I can't seem to get it
to reference the DMI value.

Any suggestions?

Code:

EMALong=EMA(Close,21);
EMAShort=EMA(Close,8);
TSA=ATR(14);
PS=ROC(Close,14);
ADXOk =ADX()>20 AND ADX()<50;
OKVol = Volume>100000 ;
PriceOK = Close >=10;
DMI=PDI(10)-MDI(10);

MarketUp = DMI=Foreign("^DJI","close");
MarketDn = DMI=Foreign("^DJI","close");
SetUpL = Cross(EMAShort ,EMALong) AND C>= EMAShort AND MarketUp>0;
SetUpS = Cross(EMALong,EMAShort) AND C<=EMAShort AND MarketDn <0;

Thanks, Randy



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/