_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
//SetTradeDelays(1,1,1,1);
SetPositionSize(1,spsShares);
Buy_f = Param("Buy Filter",5,0.1,20,0.1);
Sell_f = Param( "Sell Filter",5,0.1,20,1);
Plot(C,"Price",IIf(O>C,colorRed,colorGreen),styleBar);
Buy=Cross(EMA(C,5),EMA(C,8));
Sell=Cross(EMA(C,8),EMA(C,5));
GraphXSpace = 5;
dist = 3.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n" + (C[ i ]-Buy_f), i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "sell\n" + (C[ i ]+Sell_f), i, L[ i ]+dist[i], colorRed);
}
Short = Sell;
Cover = Buy;
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
//SetTradeDelays(1,1,1,1);
SetPositionSize(1,spsShares);
Buy_f = Param("Buy Filter",5,0.1,20,0.1);
Sell_f = Param( "Sell Filter",5,0.1,20,1);
Plot(C,"Price",IIf(O>C,colorRed,colorGreen),styleBar);
Buy=Cross(EMA(C,5),EMA(C,8));
Sell=Cross(EMA(C,8),EMA(C,5));
GraphXSpace = 5;
dist = 3.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n" + (C[ i ]-Buy_f), i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "sell\n" + (C[ i ]+Sell_f), i, L[ i ]+dist[i], colorRed);
}
Short = Sell;
Cover = Buy;
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
//SetTradeDelays(1,1,1,1);
SetPositionSize(1,spsShares);
Buy_f = Param("Buy Filter",5,0,20,0.1);
Sell_f = Param( "Sell Filter",5,0,20,1);
Plot(C,"Price",IIf(O>C,colorRed,colorGreen),styleBar);
Buy=Cross(EMA(C,5),EMA(C,8));
Sell=Cross(EMA(C,8),EMA(C,5));
Short = Sell;
Cover = Buy;
BuyPrice=ValueWhen(Buy,C-Buy_f,1);
SellPrice=ValueWhen(Sell,C+Sell_f,1);
ShortPrice=ValueWhen(Sell,C+Sell_f,1);
CoverPrice=ValueWhen(Buy,C-Buy_f,1);
GraphXSpace = 5;
dist = 2.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n" + (C[ i ]-Buy_f), i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "sell\n" + (C[ i ]+Sell_f), i, L[ i ]+dist[i], colorRed);
}