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

RE: [amibroker] Re: Timeframe Question



PureBytes Links

Trading Reference Links




Hello 
James,
<FONT face=Arial color=#0000ff 
size=2> 
Check 
thoroughly the validity of your values, because I think the TimeFrameExpand 
functions need to AFTER the TimeFrameRestore function so that i can expand the 
compressed array in the original time frame (5 minutes in your case I think). 
Your code should rather look like that :
<FONT face=Arial color=#0000ff 
size=2> 
<FONT 
face="Courier New" color=#000000 size=3>TimeFrameSet( in15Minute );MA15_12 = 
EMA( C, 12 );MA15_26 = EMA( C, 26 );TimeFrameRestore();<FONT 
face="Courier New" color=#000000 size=3>MA15_12 = 
TimeFrameExpand(MA15_12,in15Minute);MA15_26 = 
TimeFrameExpand(MA15_26,in15Minute);<FONT face="Courier New" 
color=#000000 size=3>TimeFrameSet( inHourly );MAH_12 = EMA( C, 12 
);MAH_26 = EMA( C, 26 );TimeFrameRestore();<FONT 
face="Courier New" color=#000000 size=3>MAH_12 = 
TimeFrameExpand(MAH_12,inHourly);MAH_26 = 
TimeFrameExpand(MAH_26,inHourly);
<FONT 
face="Courier New"> 
<SPAN 
class=578302708-18122003>I'm not 100% sure, but that is what I personnaly do, 
and it works fine.
<SPAN 
class=578302708-18122003> 
<SPAN 
class=578302708-18122003>Best regards, Jérôme ULRICH<SPAN 
class=578302708-18122003>

  <FONT face=Tahoma 
  size=2>-----Message d'origine-----De : james.hall3@xxxxxxxxxxx 
  [mailto:james.hall3@xxxxxxxxxxx]Envoyé : jeudi 18 décembre 
  2003 04:01À : amibroker@xxxxxxxxxxxxxxxObjet : 
  [amibroker] Re: Timeframe QuestionJérôme,That 
  did it! Thanks for the tip. Here is the AFL code that 
  works:JamesTimeFrameSet( in15Minute );MA15_12 = EMA( C, 12 
  );MA15_26 = EMA( C, 26 );MA15_12 = 
  TimeFrameExpand(MA15_12,in15Minute);MA15_26 = 
  TimeFrameExpand(MA15_26,in15Minute);TimeFrameRestore();TimeFrameSet( 
  inHourly );MAH_12 = EMA( C, 12 );MAH_26 = EMA( C, 26 );MAH_12 = 
  TimeFrameExpand(MAH_12,inHourly);MAH_26 = 
  TimeFrameExpand(MAH_26,inHourly);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@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  
  
  Yahoo! Groups Links
  
    To visit your group on the web, go to:<A 
    href="">http://groups.yahoo.com/group/amibroker/  

    To unsubscribe from this group, send an email to:<A 
    href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
  


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


  ADVERTISEMENT 









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.