KD:=hhvbars(c,50)>LLVBARS(c,50) and c=llv(c,50);          
PD:=ct;         
KK:=hhvbars(c,50)<LLVBARS(c,50) and c=hhv(c,50);         
		PK:=ct;        
		
平空:sellshort(pk and holding<0,0,THISCLOSE);                     
开多:buy(kd and holding=0,asset,NEXTOPEN);            
		平多:sell(pd and holding>0,0,THISCLOSE);                            
		开空:buyshort(kk and holding=0,asset,NEXTOPEN);