Hello,
Please try this . i didnt check in amibroker but i think this will work.
TimeFrameSet( in5Minute*9) ;
StochK45=StochK( 14,3);
StochD45=StochD( 14,3,3);
TimeFrameRestore();
D45= TimeFrameExpand( StochD45, in5Minute*9);
k45=TimeFrameExpand( StochK45,in5Minute*9);
TimeFrameSet( in5Minute) ;
StochK5=StochK( 14,3);
StochD5=StochD( 14,3,3);
TimeFrameRestore( );
d5=TimeFrameExpand( StochD5 ,in5Minute);
k5=TimeFrameExpand( StochK5,in5Minute);
Buy=(K45> D45) AND Cross(K5, D5) ;
Sell=(D45>K45) AND Cross(D5,K5) ;
Plot(k45,"k45",colorGreen,1);
Plot(d45,"d45",colorSeaGreen,1);
Plot(k5,"",colorRed,1);
Plot(d5,"",colorOrange,1);
PlotShapes(shapeUpArrow*Buy,colorGreen,0,20,0);
PlotShapes(shapeDownArrow*Sell,colorRed,0,80,0);
thank you
--- On Wed, 8/4/09, msc626 <dalmar78@xxxxxxxxxxxxx> wrote:
From: msc626 <dalmar78@xxxxxxxxxxxxx> Subject: [amibroker] Re: Multitime frame AFL What is the mistake To: amibroker@xxxxxxxxxxxxxxx Date: Wednesday, 8 April, 2009, 1:24 AM
TimeFrameSet( in45Minutes) = TimeFrameSet( 3*in15Minutes) = TimeFrameSet( 45*in1Minute) , etc
daleb > I want a multi time frame scan but getting errors,Please let me know the mistake > > TimeFrameSet( in45Minutes) ; > > StochK45=StochK( 14,3); > StochD45=StochD( 14,3,3); > TimeFrameRestore( ); > > TimeFrameSet( in5Minute) ; > > StochK5min=StochK( 14,3); > StochD5min=StochD( 14,3,3); > TimeFrameRestore( ); > > Buy=(StochK45> StochD45) & Cross(StochK5min, StochD5min) ; > Sell=(StochD45> StochK45) &Cross(StochD5mi n,StochK5min) ; > > Errors: > > 1) it is showing syntax error for 45 mins > > 2) When I scan I am keeping the settings for 5 mins then it is showing Cross of 5 minutes stochastics & ignoring whether the 45 mins stochastics is above or below it's
trigger >
|