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

[amibroker] Timeframe Question



PureBytes Links

Trading Reference Links

I'm trying to backtest multiple timeframes as a filter for buy and 
sell signals. But when I explore with the following code (for 
example) MAH_12 and MAH_26 are empty. MA15_12 and MA15_26 populate 
just fine. This always seems to be the case ... the first timeframe 
based variable I define works great, but all the rest end up empty. 

Please help me find the error. Thanks!

James

TimeFrameSet( in15Minute );
MA15_12 = EMA( C, 12 ); 
MA15_26 = EMA( C, 26 );
TimeFrameSet( inHourly );
MAH_12 = EMA( C, 12 ); 
MAH_26 = EMA( C, 26 );
TimeFrameRestore();
Buy = Cross(EMA(C,12),EMA(C,26)) AND (MA15_12 > MA15_26) AND (MAH_12 
> MAH_26);
Short = Cross(EMA(C,26),EMA(C,12)) AND (MAH_26 > MAH_12) AND 
(MA15_26 > MA15_12);
Sell = Cross(EMA(C,26),EMA(C,12));
Cover = Cross(EMA(C,12),EMA(C,26));
PositionSize=100000;
Filter=1;
AddColumn(MAH_12,"12 hour",1.4);
AddColumn(MAH_26,"26 hour",1.4);
AddColumn(MA15_12,"12 15 min",1.4);
AddColumn(MA15_26,"26 15 min",1.4);



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 Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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/