Thank you for responding, Graham. I must have read that section in the help file a hundred times. But I went back to it on your recommendation. It's not very intuitive, but with an hour or so of experimentation I finally got it to work.
 
Thank you, again, for your time.

Graham <[EMAIL PROTECTED]> wrote:
you must use TIMEFRAMEEXPAND on the variables calculated inside the timeframeset part
see the help on how to do this


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com

On 11/10/06, fatboycato <[EMAIL PROTECTED]com> wrote:
Hello,
I need some big help. I can't seem to get the coding right to deal
with signals made on weekly data. When I use the code below over a
date range, the data in the columns doesn't match up with the real
data.

In the system I'm trying to replicate, signals should be given every
week (weekly ADX(11)>25, and weekly RSI(3) crosses below 50). Then,
I'll monitor the stocks presented for a break of the prior week's
high for a long entry.

When I perform an exploration over a date range, I get signals on a
daily basis. The odd thing is the last day of the range brings back
the weekly ADX, RSI, and ROC, but every successive day prior to the
last day brings back the weekly weekly data for the WEEK prior to
the last in the range. For example, say this is the returned data:

Ticker  Date/Time       Close   RSI     ROC     ADX
CVG     10/6/2006       20.33   39.36   -1.55   39.60
CEG     10/5/2006       59.20   48.21   -0.70   34.12
IFF     10/4/2006       38.99   49.81   -1.44   42.67

The real data for CVG is the true weekly close, RSI, ROC, and ADX.
But the data returned for CEG actually comes from the weekly data
for the week ending 9/29/2006. The data returned for IFF actually
comes from the weekly data for the week ending 9/22/2006, etc.

My next step would be to backtest this system (which I also have
very little clue on), but if I can't be sure the exploration is
returning the correct entry date, how can I be sure of the backtest
results?

If anyone knows of any "Time Frames for Dummies" article I sure
would appreciate it. I've gone through the help file and I must be
too dense to figure it out. Also, if anyone knows any "Backtesting
for Dummies" articles I would appreciate those as well. My code is
below.

Thank you for your time,

Jeff

//begin code
#include "c:\program
files\amibroker\formulas\include\findhistory.afl";

TimeFrameSet(inWeekly);

Pullback=Cross(50,RSI(3));
Trend=ADX(11)>=25;
myVolume=MA(V,10)>500000;
myPrice=C>2;
myEPSRk=EPSRk>20;
myMA=EMA(C,13)>EMA(C,26) AND C>MA(C,200);

Filter=Pullback AND Trend AND myVolume AND myPrice AND myMA AND
myEPSRk;

AddColumn(C,"Close");
AddColumn(RSI(3),"RSI");
AddColumn(ROC(C,3),"ROC");
AddColumn(ADX(11),"ADX");
AddColumn(V,"Vol",1.0);
AddColumn(QRSRank,"QRS", 1.0);
AddColumn(EPSRk,"EPSRk",1.0);
AddColumn(CQIE,"CQIE");
AddColumn(CQIR,"CQIR");
AddColumn(ROE,"ROE");
AddTextColumn(IndustryID(1),"Industry");







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/

<*> 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@yahoogroups.com
    mailto:amibroker-fullfeatu[EMAIL PROTECTED]com

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscri[EMAIL PROTECTED]com

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








Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min. __._,_.___

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






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to