Global stp =-1
Global ssl =-1
Global btp=-1
Global bsl=-1
stp= (PriceChannel_Lower[gettradebarindex(0)](Close, 10)+EMA[gettradebarindex(0)](Close, 10))/2 
ssl= GetSEPrice(0)+(EMA[gettradebarindex(0)](Close, 10)-PriceChannel_Lower[gettradebarindex(0)](Close, 10))/2*6/10 

btp=(PriceChannel_Upper[gettradebarindex(0)](Close, 10)+EMA[gettradebarindex(0)](Close, 10))/2
bsl= GetBEPrice(0)-( PriceChannel_Upper[gettradebarindex(0)](Close, 10)-EMA[gettradebarindex(0)](Close, 10))/2*6/10

If isEmptyPosition and
Close[0]> PriceChannel_Upper[0](Close, 10) then
		Addsellentry at Close[0]
EndIf

If issellposition and
 low[0]<stp then addsellexit at stp
endif

if issellposition and
high[0]>ssl then addsellexit at ssl
endif

If isemptyposition and
Close[0]< PriceChannel_Lower[0](Close, 10) then
		Addbuyentry at Close[0]
endif

If isbuyposition and
High[0]>btp then addbuyexit at btp
Endif

If isbuyposition and
Low[0]<bsl then addbuyexit at bsl
endif



