VBB1:=TROUGHBARS(3,15,1)<10;
VBB2:=PEAKBARS(3,15,1)<5;
VBB3:=IF(VBB1=1,50,0);
VBB4:=IF(VBB2=1,50,0);
底部:=IF(VBB3=50,10,0);
头部:=IF(VBB4=50,20,60);
买入:IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,-30,-50);
VBB1:=TROUGHBARS(3,15,1)<10;
VBB2:=PEAKBARS(3,15,1)<5;
VBB3:=IF(VBB1=1,50,0);
VBB4:=IF(VBB2=1,50,0);
底部:=IF(VBB3=50,10,0);
头部:=IF(VBB4=50,20,60);
IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,-30,-50);