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

RE: [amibroker] Time Frame Question



PureBytes Links

Trading Reference Links

You need to finish with TimeFrameExpand.

Cf. the pivot code copied below. --Bob

---------------

// Compute Pivots from Weekly data

TimeFrameSet(inWeekly);

P = (H + L + C)/3;

R1 = 2*P - L; S1 = 2*P - H;

R2 = P + (R1 - S1); R3 = H + 2*(P - L);

S2 = P - (R1 - S1); S3 = L + 2*(P - H);

Pclr =ParamColor("Pvt",colorAqua);

Rclr =ParamColor("Rest",colorBlue);

Sclr =ParamColor("Supp",colorRed);

 

TimeFrameRestore();

wR3 = TimeFrameExpand( R3, inWeekly );          Plot(wR3,"wR3",Rclr,512);

wR2 = TimeFrameExpand( R2, inWeekly );          Plot(wR2,"wR2",Rclr,512);

wR1 = TimeFrameExpand( R1, inWeekly  ); Plot(wR1,"wR1",Rclr,512);

wP  = TimeFrameExpand( P, inWeekly  );           Plot(wP,"wP",Pclr,512);

wS1 = TimeFrameExpand( S1, inWeekly   );        Plot(wS1,"wS1",Sclr,512);

wS2 = TimeFrameExpand( S2, inWeekly   );        Plot(wS2,"wS2",Sclr,512);

wS3 = TimeFrameExpand( S3, inWeekly   );        Plot(wS3,"wS3",Sclr,512);

 

 

 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf Of larypowell
Sent: Tuesday, November 15, 2005 5:52 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Time Frame Question

 

I am trying to optimize parameters using the following.  I have my AA Settings set to daily.  It runs but in gives the same results as if done daily.  What is wrong?

Thanks,  Larry

TimeFrameSet(inDaily * 5);

 

Per = Optimize("Per",0.001,0.001,0.005,0.001);

Per2 = Optimize("Per2",0.004,0.001,0.005,0.001);

Periods = Optimize("Periods",12,5,34,1);

Periods2 = Optimize("Periods2",21,5,34,1);

/*********************************/

average= MA(C,periods);

ba1 = bandsAdjust=average*per;

ba2 = bandsAdjust=average*per2;

average2= MA(C,periods2);

ba3 = bandsAdjust=average*per;

ba4 = bandsAdjust=average*per2;

 

upperband=average+ba1; //bandsAdjust;

Lowerband=average-ba2; //bandsAdjust;

TimeFrameRestore();




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS