Hi Seniors,
Please can someone help me with afl for pivot point average. I want it to show up a anyother moving average line with ups and downs. In my afl it just shows up as a straight line.
Thanks in advance
Inspiration :http://www.motivewave.com/studies/pivot_point_average.htm
_SECTION_BEGIN("PPAV");
H1=SelectedValue( TimeFrameGetPrice( "H", inHourly, -1 ));
L1=SelectedValue(TimeFrameGetPrice( "L", inHourly, -1 ));
C1=SelectedValue(TimeFrameGetPrice( "C", inHourly, -1 ));
O1=SelectedValue(TimeFrameGetPrice( "O", inHourly, -1 ));
H2=SelectedValue( TimeFrameGetPrice( "H", inHourly, -2 ));
L2=SelectedValue(TimeFrameGetPrice( "L", inHourly, -2 ));
C2=SelectedValue(TimeFrameGetPrice( "C", inHourly, -2 ));
O2=SelectedValue(TimeFrameGetPrice( "O", inHourly, -2 ));
H3=SelectedValue( TimeFrameGetPrice( "H", inHourly, -3 ));
L3=SelectedValue(TimeFrameGetPrice( "L", inHourly, -3 ));
C3=SelectedValue(TimeFrameGetPrice( "C", inHourly, -3 ));
O3=SelectedValue(TimeFrameGetPrice( "O", inHourly, -3 ));
/*PIVOT Calculation*/
p11 = ( H1 + L1 + O1 + H2 + L2 + O2 + H3 + L3 + O3)/900;
p12 = ( H1 + L1 + C1 + H2 + L2 + C2 + H3 + L3 + C3)/900;
ppav1 = EMA(p11,3);
ppav2 = EMA(p12,3);
Plot (p11,"LHOp",colorTurquoise);
Plot (p12,"LHCl",colorTurquoise);
Plot (ppav1,"PPAVO",colorYellow);
Plot (ppav2,"PPAVCl",colorYellow);
Buy=Cross(p11,ppav1) ;
PlotShapes(shapeUpArrow*Buy,colorYellow);
Sell=Cross(ppav1,p11);
PlotShapes(shapeDownArrow*Sell,colorRed);
Buy=Cross(p12,ppav2) ;
PlotShapes(shapeUpArrow*Buy,colorPink);
Sell=Cross(ppav2,p12);
PlotShapes(shapeDownArrow*Sell,colorDarkRed);
_SECTION_END();
Please can someone help me with afl for pivot point average. I want it to show up a anyother moving average line with ups and downs. In my afl it just shows up as a straight line.
Thanks in advance
Inspiration :http://www.motivewave.com/studies/pivot_point_average.htm
_SECTION_BEGIN("PPAV");
H1=SelectedValue( TimeFrameGetPrice( "H", inHourly, -1 ));
L1=SelectedValue(TimeFrameGetPrice( "L", inHourly, -1 ));
C1=SelectedValue(TimeFrameGetPrice( "C", inHourly, -1 ));
O1=SelectedValue(TimeFrameGetPrice( "O", inHourly, -1 ));
H2=SelectedValue( TimeFrameGetPrice( "H", inHourly, -2 ));
L2=SelectedValue(TimeFrameGetPrice( "L", inHourly, -2 ));
C2=SelectedValue(TimeFrameGetPrice( "C", inHourly, -2 ));
O2=SelectedValue(TimeFrameGetPrice( "O", inHourly, -2 ));
H3=SelectedValue( TimeFrameGetPrice( "H", inHourly, -3 ));
L3=SelectedValue(TimeFrameGetPrice( "L", inHourly, -3 ));
C3=SelectedValue(TimeFrameGetPrice( "C", inHourly, -3 ));
O3=SelectedValue(TimeFrameGetPrice( "O", inHourly, -3 ));
/*PIVOT Calculation*/
p11 = ( H1 + L1 + O1 + H2 + L2 + O2 + H3 + L3 + O3)/900;
p12 = ( H1 + L1 + C1 + H2 + L2 + C2 + H3 + L3 + C3)/900;
ppav1 = EMA(p11,3);
ppav2 = EMA(p12,3);
Plot (p11,"LHOp",colorTurquoise);
Plot (p12,"LHCl",colorTurquoise);
Plot (ppav1,"PPAVO",colorYellow);
Plot (ppav2,"PPAVCl",colorYellow);
Buy=Cross(p11,ppav1) ;
PlotShapes(shapeUpArrow*Buy,colorYellow);
Sell=Cross(ppav1,p11);
PlotShapes(shapeDownArrow*Sell,colorRed);
Buy=Cross(p12,ppav2) ;
PlotShapes(shapeUpArrow*Buy,colorPink);
Sell=Cross(ppav2,p12);
PlotShapes(shapeDownArrow*Sell,colorDarkRed);
_SECTION_END();