Your formula looks correct but you may have a problem with TimeFrame.

If your time Frame is set to Weekly, I don't think you can switch to Dialy 
data.

The time Frame functions are meant to work the other way (going from Daily 
to Weekly etc).

I have not tested your code, but I beleive you will run into problems due to 
the time frame issue,


----- Original Message ----- 
From: "GMAN795" <[email protected]>
To: <[email protected]>
Sent: Saturday, April 24, 2010 9:15 AM
Subject: [amibroker] Help with TimeFrameSet


> I've got a weekly system that I'm backtesting but would like to enter the 
> day after a 4% gain from the previous day.
> Is this the proper code?
>
> TimeFrameSet(inDaily);
> ROC_4 = roc(c,1) > 4;
> TimeFrameRestore():
>
> buy = TimeFrameCompress(ROC_4,inDaily);
>      AND EMA(c,10) > EMA (c,30)
>      and Volume > ref(v,13),-1);
>
> I then have a trailing stop based on a weekly ATR.
>
> Thanks
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>

Reply via email to