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

Re: [amibroker] what's wrong with the codes? ---compare to index's daily EMA



PureBytes Links

Trading Reference Links

You are using Ind_EMA for the copmressed as well as the expanded variables.

Use:
Daily_EMA= TimeFrameExpand(Ind_EMA, inDaily, expandLast);

Also remove your "TimeFrameSet (in5Minute);".

You don't need it.


----- Original Message ----- 
From: "fox97us" <dec2003@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, May 25, 2006 8:12 PM
Subject: [amibroker] what's wrong with the codes? ---compare to index's
daily EMA


Hello,

   I have an intraday database composed of 5-min data. I lilke to
know index's EMA (15 days) for each stock. For example, today is
5/25/06, for each stock, I like to know the index's (INX in my case)
EMA of past 15 days (not including 5/25/06).

  The following are the codes I wrote. However, it does not return
the right number. What is wrong?

   Thank you very much!


william



TimeFrameSet (inDaily);


Ind_close=Foreign("INX","Close");


Ind_EMA=EMA(Ind_close,15);


TimeFrameRestore ();


TimeFrameSet (in5Minute);

Ind_EMA= TimeFrameExpand(Ind_EMA, inDaily, expandLast);

AddColumn(Ind_EMA, "Ind_EMA");

Filter=C>0;







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 other support material please check also:
http://www.amibroker.com/support.html


Yahoo! Groups Links








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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