_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, V, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
SetChartBkGradientFill( ParamColor("Inner panel upper",colorWhite),ParamColor("Inner panel lower",colorLightYellow));
_SECTION_END();
_SECTION_BEGIN("fractals");
acc = Param("Acceleration", 0.019, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.019, 0, 1, 0.001 );
Plot( SAR( acc, accm ), _DEFAULT_NAME(), ParamColor( "Color", colorYellow ),
ParamStyle("Style", styleLine | styleLine, maskDefault | styleLine | styleLine )
);
Buy = Cross(Open, SAR(acc,accm));
Sell = Cross(SAR(acc,accm), Open );
Short=Sell;
Cover=Buy;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
AlertIf( Buy,"SOUND C:\\Windows\\Media\\Chord.wav", "Audio alert", 2 );
AlertIf( Sell,"SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 );
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone), colorBrightGreen, 0, Low, Offset=-15);
PlotShapes(IIf(Sell, shapeDownArrow,shapeNone), colorPink, 0, High,
Offset=-15);
dist = 2*ATR(2);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "" + C[ i ], i, H[ i ]+dist[i], colorWhite );
if( Sell[i] ) PlotText( "" + C[ i ], i, L[ i ]-dist[i], colorAqua );
}
t1= Flip(Buy,Sell);
t2= Flip(Sell,Buy);
Filter = Buy OR Sell;
AddColumn( Buy, "Buy", 1);
AddColumn( Sell, "Sell", 1);
if (SelectedValue(Buy)==1) Say("BUY Signal Now ");
if (SelectedValue(Sell)==1) Say("Sell Signal Now");
_SECTION_END();