PureBytes Links
Trading Reference Links
|
Herman,
I'd test this if I were at my PC, but at first glance it seems your statements below are reversed from the code run in daily settings
Short=TimeFrameExpand(Buy, inDaily);Cover=TimeFrameExpand(Sell, inDaily);
vs
Short=Sell;Cover=Buy;
when TF == 1.
Hope this helps,
Gary
Herman van den Bergen <psytek@xxxxxxxx> wrote:
Hello,
When backtesting the test code below I cannot get the same results when backtesting in TimeFrame-Daily and Settings-Daily mode. Can anybody tell me what is wrong with it?
Many thanks for any help you can give!
herman.
TF=0; // set to 1 when running with Settings set to Daily, set to 0 when running with Settings set to minutes. Backtested on the QQQ for the period 10/13/03 to 04/04/04
// With AA Settings set to Daily this gives 14.34% profitif(TF==1) {Buy=Cross( MACD(), Signal() );Sell = Cross( Signal(), MACD() );Short=Sell;Cover=Buy;}
// With AA Settings set to 1-minute this gives 11.07% profitif(TF==0){TimeFrameSet(inDaily);Buy=Cross( MACD(), Signal() );Sell = Cross( Signal(), MACD() );Short=Sell;Cover=Buy;TimeFrameRestore();Buy=TimeFrameExpand(Buy, inDaily);Sell=TimeFrameExpand(Sell, inDaily);Short=TimeFrameExpand(Buy, inDaily);Cover=TimeFrameExpand(Sell, inDaily);}
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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 the Yahoo! Terms of Service.
|