The weekly periodicity in backtest uses weekly data.
You need to use daily data and code you buy signals such that you trade weekly, such as:
If (Buy and DayofWeek() == 5) Buy = 1; // DayofWeek() == 5, represents Friday
Of course if you don't have a signal on Friday you will not trade.
Also look at Hold() function ... may give you some more flexibility
Ara
Hi, I want to backtest a system that is based on Daily prices calculations but trades only every Week. I have two questions:
1) If I go to the backtest Settings and choose Weekly in the Periodicity drop down menu does this A) Use weekly prices, B) Trade weekly or C) Both?
2) What AFL functions do I need to use to calculate Daily and trade weekly?
Thanks,
Oscar
Posted by: Ara Kaloustian <ara1.kaloustian@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
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/
EmoticonEmoticon