Hello, I am not getting exception, but please try the following: go to Tools->Preferences "AFL" tab
UNCHECK "Catch system exceptions in indicators and commentaries". Then re-run the formula and send me the extended error report you will get that way. After than you may re-enable "Catch system exceptions..." Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: "Graham" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, June 12, 2008 10:19 AM Subject: Re: [amibroker] Re: Error 47 >I get no error from the get price, but I have made a few changes in > order to get a plot, and overcome some errors in your code > PlotText location values cannot be arrays, so have made them LastValue > > > SetChartOptions( 0, chartShowDates|chartWrapTitle ); > GraphXSpace=10; > _N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}} "+_DEFAULT_NAME()+" : > {{OHLCX}} {{VALUES}}" ); > > Plot( C, "", ParamColor( "Price Colour", colorGrey50), ParamStyle( > "Price Style", styleBar, maskPrice ) ); > > > _SECTION_BEGIN("Daily_Pivots"); > H1=TimeFrameGetPrice( "H", inDaily, -1 ); > L1=TimeFrameGetPrice( "L", inDaily, -1 ); > C1=TimeFrameGetPrice( "C", inDaily, -1 ); > > /*PIVOT Calculation*/ > p = ( H1+ L1 + C1 )/3; > s1 = (2*p)-H1; > r1 = (2*p)-L1; > s2 = p -(H1 - L1); > s3 = S1 - (H1-L1); > r2 = p +(H1 - L1); > r3 = R1 +(H1-L1); > > Plot (p,"Pivot",25,2048); > PlotText("PIVOT",BarCount,LastValue(p),25); > Plot (r1,"R1",40,2048); > PlotText("R1",BarCount,LastValue(r1),40); > Plot (r2,"R2",40,2048); > PlotText("R2",BarCount,LastValue(r2),40); > Plot (r3,"R3",40,2048); > PlotText("R3",BarCount,LastValue(r3),40); > Plot (s1,"S1",3,2048); > PlotText("S1",BarCount,LastValue(s1),3); > Plot (s2,"S2",3,2048); > PlotText("S2",BarCount,LastValue(s2),3); > Plot (s3,"S3",3,2048); > PlotText("S3",BarCount,LastValue(s3),3); > _SECTION_END(); > > > -- > Cheers > Graham Kav > AFL Writing Service > http://www.aflwriting.com > > > > > 2008/6/12 sidhartha70 <[EMAIL PROTECTED]>: >> Can anyone from AB comment on this error...? >> >> Thanks >> >> --- In [email protected], "sidhartha70" <[EMAIL PROTECTED]> wrote: >>> >>> The following simple daily pivots code is giving me an Error 47 when >>> applied ONLY to tick charts (I am looking at 200 tick bars for >>> example)... However the code works perfectly on (x) min charts... >>> >>> The error seems to occur at the TimeFrameGetPrice() functions. >>> >>> Any ideas...? >>> >>> _SECTION_BEGIN("Daily_Pivots"); >>> H1=SelectedValue(TimeFrameGetPrice( "H", inDaily, -1 )); >>> L1=SelectedValue(TimeFrameGetPrice( "L", inDaily, -1 )); >>> C1=SelectedValue(TimeFrameGetPrice( "C", inDaily, -1 )); >>> >>> /*PIVOT Calculation*/ >>> p = ( H1+ L1 + C1 )/3; >>> s1 = (2*p)-H1; >>> r1 = (2*p)-L1; >>> s2 = p -(H1 - L1); >>> s3 = S1 - (H1-L1); >>> r2 = p +(H1 - L1); >>> r3 = R1 +(H1-L1); >>> >>> Plot (p,"Pivot",25,2048); >>> PlotText("PIVOT",BarCount,p,25); >>> Plot (r1,"R1",40,2048); >>> PlotText("R1",BarCount,r1,40); >>> Plot (r2,"R2",40,2048); >>> PlotText("R2",BarCount,r2,40); >>> Plot (r3,"R3",40,2048); >>> PlotText("R3",BarCount,r3,40); >>> Plot (s1,"S1",3,2048); >>> PlotText("S1",BarCount,s1,3); >>> Plot (s2,"S2",3,2048); >>> PlotText("S2",BarCount,s2,3); >>> Plot (s3,"S3",3,2048); >>> PlotText("S3",BarCount,s3,3); >>> _SECTION_END(); >>> >> >> >> >> ------------------------------------ >> >> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: >> http://www.amibroker.com/devlog/ >> >> For other support material please check also: >> http://www.amibroker.com/support.html >> Yahoo! Groups Links >> >> >> >> > > ------------------------------------ > > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > Yahoo! Groups Links > > >
