Buy,Sell,Short, Cover added..
 
gapclosingfromupope n =Open > Ref(H,-1) AND C > Ref(L,-1) AND 
C < Ref(H,-1);
gapclosingfromdowno pen=Open < Ref(L,-1) AND 
C > Ref(L,-1) AND C < Ref(H,-1);
Color= IIf(gapclosingfromupop en,colorYellow,IIf(gapclosingfromdown open,colorOrange,ParamColor("color",colorBlack)));
PlotShapes(gapclosingfromupop en*shapeDownArrow,colorRed,0,High,-15);
PlotShapes(gapclosingfromdown open*shapeUpArrow,colorGreen,0,Low,-15);
_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, SelectedValue( 
ROC( C, 1 ) 
) ));
Plot( C, "Close", color , 
styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
//Buy,Sell,Short, cover
//Note: In AA settings ** General > Positions ** set to long and 
short
SetTradeDelays( 0, 0, 0, 0 );//overrides delay setting in AA 
window
Buy=Ref(gapclosingfromdowno pen,-1);
BuyPrice=Open;
Sell=Ref(gapclosingfromdown open,-1);
SellPrice=Close;
Short=Ref(gapclosingfromupope n,-1);
ShortPrice=Open;
Cover=Ref(gapclosingfromupop en,-1);
CoverPrice=Close;
//////////// ///////// ///////// ////////
Filter= gapclosingfromupope n OR 
gapclosingfromdowno pen;
AddColumn(C,"");
AddColumn(gapclosingfromupop en,"up");
AddColumn(gapclosingfromdown Open,"down");