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();