等级: 免费版
- 注册:
- 2022-3-6
- 曾用名:
|
楼主 |
发表于 2022-10-11 14:09
|
显示全部楼层
请问这样是对的吗?
input:ss(12,1,10000,1);
永久日:=1221212;
永久:=IF(DATE<永久日,1,DRAWNULL);
STEP1:=15/20*永久;
MVALUE1:=40/8*永久;
SARLINE:=SAR(3,STEP1,MVALUE1)*永久;
多:IF(C>SARLINE,SARLINE,DRAWNULL)*永久,CIRCLEDOT,COLORRED;
空:IF(C<SARLINE,SARLINE,DRAWNULL)*永久,CIRCLEDOT,COLORGREEN;
DRAWTEXT(CROSS(C,SARLINE),L-0.05*L,'空')*永久,COLORRED;
DRAWTEXT(CROSS(SARLINE,C),H+0.05*H,'多')*永久,COLORGREEN;
STICKLINE(C>SAR(3,STEP1,MVALUE1) AND C<O,C,O,2.8,0)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1) AND C>O,C,O,2.8,1)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1),H,MAX(C,O),0,0)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1),L,MIN(C,O),0,0)*永久,COLORRED;
STICKLINE(C<SAR(3,STEP1,MVALUE1) AND C<O,C,O,2.8,0)*永久,COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1) AND C>O,C,O,2.8,1)*永久,COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1),H,MAX(C,O),0,0),COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1),L,MIN(C,O),0,0),COLORGREEN;
永久日:=1221212;
永久:=IF(DATE<永久日,1,DRAWNULL);
DY11:=(2*CLOSE+HIGH+LOW)/4*永久;
DY22:=LLV(LOW,34)*永久;
DY33:=HHV(HIGH,34)*永久;
A11:=EMA((DY11-DY22)/(DY33-DY22)*100,9)*永久;
B11:=EMA(0.667*REF(A11,1)+0.333*A11,2)*永久;
多头:EMA((DY11-DY22)/(DY33-DY22)*100,30)*永久,COLORRED ;
空头:EMA(多头,5)*永久,COLORGREEN;
DRAWTEXT(CROSS(C,SARLINE),L-0.05*L,'空')*永久,COLORRED;
DRAWTEXT(CROSS(SARLINE,C),H+0.05*H,'多')*永久,COLORGREEN;
STICKLINE(C>SAR(3,STEP1,MVALUE1) AND C<O,C,O,2.8,0)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1) AND C>O,C,O,2.8,1)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1),H,MAX(C,O),0,0)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1),L,MIN(C,O),0,0)*永久,COLORRED;
STICKLINE(C<SAR(3,STEP1,MVALUE1) AND C<O,C,O,2.8,0)*永久,COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1) AND C>O,C,O,2.8,1)*永久,COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1),H,MAX(C,O),0,0),COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1),L,MIN(C,O),0,0),COLORGREEN;
kd:CLOSE>SARLINE and 多头>空头 ;
kk:c<SARLINE and 多头<空头;
kd_min1:"kd#MIN1";
kk_min1:"kk#MIN1";
kd_min5:"kd#MIN5";
kk_min5:"kk#MIN5";
if kd_min1 AND kk_min5 then
begin
sellshort(1,holding,THISCLOSE);
end
if kd_min1 AND kd_min5 then
begin
buy(holding=0,ss,THISCLOSE);
end
if kk_min1 AND kd_min5 then
begin
sell(1,holding,thisclose);
end
if kk_min1 AND kk_min5 then
begin
buyshort(holding=0,ss,thisclose);
end
//其他
次数:TOTALTRADE,LINETHICK0;
胜率:PERCENTWIN,LINETHICK0;
连亏:MAXSEQLOSS,LINETHICK0;
连赢:MAXSEQWIN,LINETHICK0;
当前持仓:HOLDING,COLORGRAY,LINETHICK0;
当前资产:ASSET,NOAXIS,COLORYELLOW; |
|