左脚进右脚出波神搏浪公式代码[其他软件公式]
相关标签:
原理解析:
源码:
当前月:=FRACPART(ROUND(CURRENTDATE/100)/100)*100;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='1',CLOSE,NUMTOSTR(当前月,0)+'月转折日:6、15、21、*25\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='2',CLOSE,NUMTOSTR(当前月,0)+'月转折日:6、15、21\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='3',CLOSE,NUMTOSTR(当前月,0)+'月转折日:6、15、*20、21\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='4',CLOSE,NUMTOSTR(当前月,0)+'月转折日:6、15、21\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='5',CLOSE,NUMTOSTR(当前月,0)+'月转折日:6、*1 2、15、21\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='6',CLOSE,NUMTOSTR(当前月,0)+'月转折日:6、*1 4、21\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='7',CLOSE,NUMTOSTR(当前月,0)+'月转折日:8、15、*1 9、23\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='8',CLOSE,NUMTOSTR(当前月,0)+'月转折日:*6、8、15、23\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='9',CLOSE,NUMTOSTR(当前月,0)+'月转折日:8、15、*1 8、23\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='10',CLOSE,NUMTOSTR(当前月,0)+'月转折日:8、15、23、*31\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='11',CLOSE,NUMTOSTR(当前月,0)+'月转折日:8、15、23、*28\n \n \n \n '),ALIGN5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS AND NUMTOSTR(当前月,0)='12',CLOSE,NUMTOSTR(当前月,0)+'月转折日:8、15、23、*31\n \n \n \n '),ALIGN5,colorFFFF;
IF DATATYPE<6 THEN BEGIN
本周期日期:=DATE;
前日期:=REF(DATE,1);
HHDAY0:=SETVAL(BARPOS>2 AND 本周期日期>前日期,HIGH,-SUMBARS(本周期日期>前日期,2)+1,REF(HHV(HIGH,SUMBARS(本周期日期>前日期,1)),1));
LLDAY0:=SETVAL(BARPOS>2 AND 本周期日期>前日期,LOW,-SUMBARS(本周期日期>前日期,2)+1,REF(LLV(LOW,SUMBARS(本周期日期>前日期,1)),1));
HHDAY:=SETVAL(BARSTATUS=2,HHDAY0,-BARSLAST(本周期日期>前日期),HHV(HIGH,(BARSLAST(本周期日期>前日期))+1));
LLDAY:=SETVAL(BARSTATUS=2,LLDAY0,-BARSLAST(本周期日期>前日期),LLV(LOW,(BARSLAST(本周期日期>前日期))+1));
HHDAY[DATACOUNT]:=HHDAY[DATACOUNT-1];
LLDAY[DATACOUNT]:=LLDAY[DATACOUNT-1];
END;
N:=IF(SYSPARAM(1)=DATACOUNT,最近天,DATACOUNT-SYSPARAM(1)+1);
K线测量范围:N,LINETHICK0;
HH:=HHV(HIGH,N);
LL:=LLV(LOW,N);
VN:=N;
IF VN>DATACOUNT THEN
VN=DATACOUNT+1;
TJ:=CLOSE;
FOR I=DATACOUNT DOWNTO DATACOUNT-VN+1 DO BEGIN
HH[I]:=HH[DATACOUNT];
LL[I]:=LL[DATACOUNT];
TJ[I]:=0;
END;
TMP:=SETLBOUND(33,DATACOUNT-VN+1);
TMP:=SETLBOUND(34,DATACOUNT-VN+1);
KKH:=BARSSINCE(HIGH=HH);
KKL:=BARSSINCE(LOW=LL);
NLPOS:=STRTONUM(NUMTOSTR(REF(BARPOS,KKL),0));
NHPOS:=STRTONUM(NUMTOSTR(REF(BARPOS,KKH),0));
多空:=IF(NLPOS>NHPOS,0,1);
K1:=IF(多空>=1,TROUGHBARS(2,精度1,1),PEAKBARS(1,精度1,1));
F1:=IF(多空>=1,PEAKBARS(1,精度2,1),TROUGHBARS(2,精度2,1));
K2:=BARSLAST(K1=0);
K1LAST:=IF(多空>=1,IF(反向测量>=1,PEAKBARS(1,精度3,1),TROUGHBARS(2,精度3,1)),IF(反向测量>=1,TROUGHBARS(2,精度3,1),PEAKBARS(1,精度3,1)));
K2LAST:=IF(BARPOS=DATACOUNT,SUMBARS(K1LAST=0,近单线),0);
K3LAST:=BACKSET(BARPOS=DATACOUNT,K2LAST);
K4LAST:=IF(K3LAST>0,1,-1);
K5LAST:=CROSS(K4LAST,0);
F2:=BARSLAST(F1=0);
KK:=REF(BARPOS,K2);
FF:=REF(BARPOS,F2);
K4:=DATACOUNT-N+1;
P1:=IF(KK>=K4,1,-1);
P2:=IF(FF>=K4,1,-1);
PK1:=CROSS(P1,0);
PK2:=CROSS(P2,0);
KTONOW1:=BARSLAST(PK1);
KTONOW2:=BARSLAST(PK2);
BBP:=REF(BARPOS,KTONOW1);
HH:=REF(HIGH,KTONOW1);
HH2:=IF(多空>=1,REF(HIGH,KTONOW2),REF(HIGH,KTONOW1));
LL2:=IF(多空>=1,REF(LOW,KTONOW1),REF(LOW,KTONOW2));
LLOW:=REF(LOW,KTONOW1);
H1:=STRTONUM(NUMTOSTR(HH,2));
L1:=STRTONUM(NUMTOSTR(LLOW,2));
H2:=STRTONUM(NUMTOSTR(HH2,2));
L2:=STRTONUM(NUMTOSTR(LL2,2));
HE:=IF((全显=-3 OR 全显=3) AND DATATYPE<6,REF(HHDAY,KTONOW1),IF(测量=1,H1,H2));
LE:=IF((全显=-3 OR 全显=3) AND DATATYPE<6,REF(LLDAY,KTONOW1),IF(测量=1,L1,L2));
LL:=STRTONUM(NUMTOSTR(HE-LE,2));
HELAST:=REF(HIGH,BARSLAST(K5LAST));
LELAST:=REF(LOW,BARSLAST(K5LAST));
LLLAST:=HELAST-LELAST;
LIND1:=LE+LL*1.7856;
LIND2:=LE+LL*2.9775;
LIND3:=HE+LL*2.9775;
LIND4:=LE+LL*4.764;
LIND5:=HE+LL*4.764;
LIND6:=LE+LL*6.5;
LIND7:=LE+LL*7.7415;
LIND8:=HE+LL*7.7415;
LIND9:=LE+LL*10.5;
LINK1:=HE-LL*1.7856;
LINK2:=HE-LL*2.9775;
LINK3:=LE-LL*2.9775;
LINK4:=HE-LL*4.764;
LINK5:=LE-LL*4.764;
LINK6:=HE-LL*6.5;
LINK7:=HE-LL*7.7415;
LINK8:=LE-LL*7.7415;
LINK9:=HE-LL*10.5;
LINE1:=IF(多空>=1,LIND1,LINK1);
LINE2:=IF(多空>=1,LIND2,LINK2);
LINE3:=IF(多空>=1,LIND3,LINK3);
LINE4:=IF(多空>=1,LIND4,LINK4);
LINE5:=IF(多空>=1,LIND5,LINK5);
LINE6:=IF(多空>=1,LIND6,LINK6);
LINE7:=IF(多空>=1,LIND7,LINK7);
LINE8:=IF(多空>=1,LIND8,LINK8);
LINE9:=IF(多空>=1,LIND9,LINK9);
LASTDDX1:=LELAST+LLLAST*1.7856;
LASTDDX2:=LELAST+LLLAST*2.9775;
LASTDDX3:=HELAST+LLLAST*2.9775;
LASTDDX4:=LELAST+LLLAST*4.764;
LASTDDX5:=HELAST+LLLAST*4.764;
LASTDDX6:=LELAST+LLLAST*6.5;
LASTDDX7:=LELAST+LLLAST*7.7415;
LASTDDX8:=HELAST+LLLAST*7.7415;
LASTDDX9:=LELAST+LLLAST*10.5;
LASTKDX1:=HELAST-LLLAST*1.7856;
LASTKDX2:=HELAST-LLLAST*2.9775;
LASTKDX3:=LELAST-LLLAST*2.9775;
LASTKDX4:=HELAST-LLLAST*4.764;
LASTKDX5:=LELAST-LLLAST*4.764;
LASTKDX6:=HELAST-LLLAST*6.5;
LASTKDX7:=HELAST-LLLAST*7.7415;
LASTKDX8:=LELAST-LLLAST*7.7415;
LASTKDX9:=HELAST-LLLAST*10.5;
LASTDX1:=IF(多空>=1,IF(反向测量>=1,LASTKDX1,LASTDDX1),IF(反向测量>=1,LASTDDX1,LASTKDX1));
LASTDX2:=IF(多空>=1,IF(反向测量>=1,LASTKDX2,LASTDDX2),IF(反向测量>=1,LASTDDX2,LASTKDX2));
LASTDX3:=IF(多空>=1,IF(反向测量>=1,LASTKDX3,LASTDDX3),IF(反向测量>=1,LASTDDX3,LASTKDX3));
LASTDX4:=IF(多空>=1,IF(反向测量>=1,LASTKDX4,LASTDDX4),IF(反向测量>=1,LASTDDX4,LASTKDX4));
LASTDX5:=IF(多空>=1,IF(反向测量>=1,LASTKDX5,LASTDDX5),IF(反向测量>=1,LASTDDX5,LASTKDX5));
LASTDX6:=IF(多空>=1,IF(反向测量>=1,LASTKDX6,LASTDDX6),IF(反向测量>=1,LASTDDX6,LASTKDX6));
LASTDX7:=IF(多空>=1,IF(反向测量>=1,LASTKDX7,LASTDDX7),IF(反向测量>=1,LASTDDX7,LASTKDX7));
LASTDX8:=IF(多空>=1,IF(反向测量>=1,LASTKDX8,LASTDDX8),IF(反向测量>=1,LASTDDX8,LASTKDX8));
LASTDX9:=IF(多空>=1,IF(反向测量>=1,LASTKDX9,LASTDDX9),IF(反向测量>=1,LASTDDX9,LASTKDX9));
FILLRGN(BARPOS>=BBP,LINE2,LINE3),color1A1010;
FILLRGN(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE5,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE5,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE5,LINE6),color1A1010;
FILLRGN(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE7,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE7,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE7,LINE8),color1A1010;
FILLRGN(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE8,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE8,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE8,LINE9),color2A1A10;
FILLRGN(K3LAST>0,LASTDX2,LASTDX3),color553333;
FILLRGN(K3LAST>0,LASTDX5,LASTDX6),color553333;
FILLRGN(K3LAST>0,LASTDX7,LASTDX8),color553333;
FILLRGN(K3LAST>0,LASTDX8,LASTDX9),color885533;
PARTLINE(BARPOS>=BBP,LINE1),LINEDOT,colorEE99FF;
PARTLINE(BARPOS>=BBP,LINE2),LINEDOT,color66CC99;
PARTLINE(BARPOS>=BBP,LINE2+(LINE3-LINE2)/2),LINEDOT,color808080;
PARTLINE(BARPOS>=BBP,LINE3),LINEDOT,color808080;
PARTLINE(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE4,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE4,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE4),LINEDOT,color66CC99;
PARTLINE(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE5,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE5,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE5),LINEDOT,color808080;
PARTLINE(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE5,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE5,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE6),LINEDOT,color66CC99;
PARTLINE(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE7,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE7,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE7),LINEDOT,color66CC99;
PARTLINE(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE7,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE7,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE8),LINEDOT,color808080;
PARTLINE(BARPOS>=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE8,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE8,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE9),LINEDOT,color8080;
PARTLINE(K3LAST>0,LASTDX1),LINEDOT,colorFFFF;
PARTLINE(K3LAST>0,LASTDX4),LINEDOT,color7280FA;
VERTLINE(测量>1 AND PK2 AND (全显<>3 AND 全显<>-3 OR DATATYPE>=6)),LINEDOT,color338833;
VERTLINE(BARPOS=BBP),LINEDOT,color885533;
IF 时间标尺 THEN BEGIN
TM2:=8;
TPK1:=IF(IF(STARTED=0,多空,FORUP),TROUGHBARS(2,0.1,1),PEAKBARS(1,0.1,1));
TPK2:=BACKSET(BARPOS=DATACOUNT,IF(BARPOS=DATACOUNT,SUMBARS(TPK1=0,STARTED),0));
KTPK1:=IF(IF(STARTED=0,多空,FORUP),PEAKBARS(1,IF(STARTED=0,TM2,0.1),1),TROUGHBARS(2,IF(STARTED=0,TM2,0.1),1));
DDD:=(BARSSINCE(KTPK1=0 AND REF(BARPOS,BARSLAST(KTPK1=0))>REF(BARPOS,BARSLAST(PK1))))=0;
KTPK2:=BACKSET(BARPOS=DATACOUNT,IF(BARPOS=DATACOUNT,SUMBARS(KTPK1=0,ENDED),0));
T1:=STRTONUM(NUMTOSTR(REF(BARPOS,IF(STARTED=0,BARSLAST(PK1),BARSSINCE(TPK2))),0));
T2:=STRTONUM(NUMTOSTR(REF(BARPOS,IF(STARTED=0,BARSLAST(DDD),BARSSINCE(KTPK2))),0));
PC:=T2-T1;
A:=CLOSE;
B:=CLOSE;
FOR I=1 TO DATACOUNT DO BEGIN
A[I]:=0;
B[I]:=0;
END;
J:=3;
TT2:=0;
TT1:=0;
TEM1:=T1;
TEM2:=T2;BEGIN
TT1:=INTPART(TEM1+PC*1/SQRT(5)*(POW((1+SQRT(5))/2,J)-POW((1-SQRT(5))/2,J))+0.9);
TT2:=INTPART(TEM2+PC*1/SQRT(5)*(POW((1+SQRT(5))/2,J)-POW((1-SQRT(5))/2,J))+0.9);
IF TT1>DATACOUNT OR TT1<0 THEN
BREAK;ELSE
A[TT1]:=1;
IF TT2>DATACOUNT OR TT2<0 THEN
BREAK;ELSE
B[TT2]:=1;
IF J<=5 THEN
J:=J+1;ELSE BEGIN
J:=3;
PC:=TT2-TT1;
TEM1:=TT1;
TEM2:=TT2;
END;
END;
IF TT1-DATACOUNT=1 THEN
VERTLINE(BARPOS=DATACOUNT),POINTDOT,SHIFT1,color808080;
IF TT2-DATACOUNT=1 THEN
VERTLINE(BARPOS=DATACOUNT),POINTDOT,SHIFT1,color303030;
IF TT1-DATACOUNT=2 THEN
VERTLINE(BARPOS=DATACOUNT),POINTDOT,SHIFT2,color808080;
IF TT2-DATACOUNT=2 THEN
VERTLINE(BARPOS=DATACOUNT),POINTDOT,SHIFT2,color303030;
IF TT1-DATACOUNT=3 THEN
VERTLINE(BARPOS=DATACOUNT),POINTDOT,SHIFT3,color808080;
IF TT2-DATACOUNT=3 THEN
VERTLINE(BARPOS=DATACOUNT),POINTDOT,SHIFT3,color303030;
DRAWTEXTEX(MAX(TT1-DATACOUNT,TT2-DATACOUNT)>0 OR MIN(TT1-DATACOUNT,TT2-DATACOUNT)>0,1,0,0,'NEXTIME:'+(NUMTOSTR(IF(MIN(TT1-DATACOUNT,TT2-DATACOUNT)<0,MAX(TT1-DATACOUNT,TT2-DATACOUNT),MIN(TT1-DATACOUNT,TT2-DATACOUNT)),0))),color808080;
DRAWTEXTEX(TT1-DATACOUNT>0,1,0,50,'Nearly Comming KEY_TIMELINE:'+NUMTOSTR(TT1-DATACOUNT,0)),colorA0A0A0;
VERTLINE(A=1),POINTDOT,color505050;
VERTLINE(B=1),POINTDOT,color202020;
IF FORUP AND STARTED>0 OR 多空 AND STARTED=0 THEN BEGIN
DRAWICON(BARPOS=T1,LOW*0.99,4);
DRAWICON(BARPOS=T2,HIGH*1.01,5);
END;ELSE BEGIN
DRAWICON(BARPOS=T1,HIGH*1.01,5);
DRAWICON(BARPOS=T2,LOW*0.99,4);
END;
END;
IF 全显=2 OR 全显=-1 THEN BEGIN
VAR2:=BARSLAST(K5LAST);
VAR3:=REF(INDEXC,VAR2)/REF(CLOSE,VAR2);
DPO:=INDEXO/VAR3;
DPH:=INDEXH/VAR3;
DPL:=INDEXL/VAR3;
DPC:=INDEXC/VAR3;
STICKLINE(DPC>REF(DPC,1),DPH,DPL,0.1,0),colorC0C0C0;
STICKLINE(DPC>REF(DPC,1),DPO,DPC,7,0),color606060;
STICKLINE(DPC>REF(DPC,1),DPO,DPC,5,0),color909090;
STICKLINE(DPC>REF(DPC,1),DPO,DPC,3,0),colorB0B0B0;
STICKLINE(DPC<=REF(DPC,1),DPH,DPL,0.1,1),color808080;
STICKLINE(DPC<=REF(DPC,1),DPO,DPC,7,0),color202020;
STICKLINE(DPC<=REF(DPC,1),DPO,DPC,5,0),color404040;
STICKLINE(DPC<=REF(DPC,1),DPO,DPC,3,0),color606060;
END;
IF (全显=3 OR 全显=-3 OR 全显=-2 OR 全显=4) AND DATATYPE<6 THEN BEGIN
DHHDAY:HHDAY,LINEDOT,color660099;
DLLDAY:LLDAY,LINEDOT,colorFF0000;
DRAWTEXT(BARPOS=BBP,IF(多空,LOW*0.98,HIGH*1.02),NUMTOSTR(REF(YEAR,KTONOW1),0)+'年'+NUMTOSTR(REF(MONTH,KTONOW1),0)+'月'+NUMTOSTR(REF(DAY,KTONOW1),0)+'日'),color707070;
END;
KO:=CLOSE;
KC:=REF(CLOSE,1);
STICKLINE(KO>KC AND (K3LAST>0 OR 精度3=0),OPEN,LOW,0.5,0),color2828FF;
STICKLINE(KO>KC AND (K3LAST>0 OR 精度3=0),CLOSE,HIGH,0.5,0),color2828FF;
STICKLINE(KO<=KC AND (K3LAST>0 OR 精度3=0),CLOSE,LOW,0.5,0),colorFFFF22;
STICKLINE(KO<=KC AND (K3LAST>0 OR 精度3=0),OPEN,HIGH,0.5,0),colorFFFF22;
STICKLINE(KO<=KC AND (K3LAST>0 OR 精度3=0),CLOSE,OPEN,7,0),colorCC6600;
STICKLINE(KO<=KC AND (K3LAST>0 OR 精度3=0),CLOSE,OPEN,5,0),colorFFFF11;
STICKLINE(KO>KC AND (K3LAST>0 OR 精度3=0),CLOSE,OPEN,7,0),color440099;
STICKLINE(KO>KC AND (K3LAST>0 OR 精度3=0),CLOSE,OPEN,5,0),color2828FF;
STICKLINE(KO>KC AND K3LAST=0 AND 精度3<>0,OPEN,LOW,0.5,0),color88;
STICKLINE(KO>KC AND K3LAST=0 AND 精度3<>0,CLOSE,HIGH,0.5,0),color88;
STICKLINE(KO<=KC AND K3LAST=0 AND 精度3<>0,CLOSE,LOW,0.5,0),color886600;
STICKLINE(KO<=KC AND K3LAST=0 AND 精度3<>0,OPEN,HIGH,0.5,0),color886600;
STICKLINE(KO<=KC AND K3LAST=0 AND 精度3<>0,CLOSE,OPEN,7,0),color660000;
STICKLINE(KO<=KC AND K3LAST=0 AND 精度3<>0,CLOSE,OPEN,5,0),color886600;
STICKLINE(KO>KC AND K3LAST=0 AND 精度3<>0,CLOSE,OPEN,7,0),color66;
STICKLINE(KO>KC AND K3LAST=0 AND 精度3<>0,CLOSE,OPEN,5,0),color88;
IF 多空=1 OR 多空=0 THEN BEGIN
DRAWTEXT(BARPOS=BBP,LINE1,' '+NUMTOSTR(LINE1,2)+' [1]'),ALIGN2,colorC0C0C0;
DRAWTEXT(BARPOS=BBP,LINE2,' NO.2 '+NUMTOSTR(LINE2,2)),ALIGN1,colorC0C0C0;
DRAWTEXT(BARPOS=BBP,LINE2+(LINE3-LINE2)/2,' '+NUMTOSTR(LINE2+(LINE3-LINE2)/2,2)+' [H]'),ALIGN2,colorC0C0C0;
DRAWTEXT(BARPOS=BBP,LINE3,' NO.3 '+NUMTOSTR(LINE3,2)),ALIGN1,colorC0C0C0;
DRAWTEXT(BARPOS=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE4,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE4,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE4,NUMTOSTR(LINE4,2)+' [4]'),ALIGN2,colorC0C0C0;
DRAWTEXT(BARPOS=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE5,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE5,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE5,' NO.5 '+NUMTOSTR(LINE5,2)),ALIGN1,colorC0C0C0;
DRAWTEXT(BARPOS=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE5,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE5,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE6,' '+NUMTOSTR(LINE6,2)+' [6]'),ALIGN2,colorC0C0C0;
DRAWTEXT(BARPOS=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE7,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE7,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE7,' NO.7 '+NUMTOSTR(LINE7,2)),ALIGN1,colorC0C0C0;
DRAWTEXT(BARPOS=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE7,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE7,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE8,' '+NUMTOSTR(LINE8,2)+' [8]'),ALIGN2,colorC0C0C0;
DRAWTEXT(BARPOS=BBP AND IF(全显>0,1,IF(精度3=0,1,IF(多空,STRTONUM(NUMTOSTR(LINE8,2))<=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2))),STRTONUM(NUMTOSTR(LINE8,2))>=(STRTONUM(NUMTOSTR(IF(反向测量>=1,LASTDX1,LASTDX9),2)))))),LINE9,' '+NUMTOSTR(LINE9,2)+' [*]'),ALIGN2,colorC0C0C0;
END;
IF 精度3<>0 AND (反向测量=1 OR 反向测量=0) THEN BEGIN
DRAWTEXT(K5LAST,LASTDX1,NUMTOSTR(LASTDX1,2)+' '),ALIGN2,colorFFFFFF;
DRAWTEXT(K5LAST,MIN(LASTDX2,LASTDX3)+(ABS(LASTDX3-LASTDX2))/2,NUMTOSTR(LASTDX2,2)+'-'+NUMTOSTR(LASTDX3,2)+' '),ALIGN2,colorFFFFFF;
DRAWTEXT(K5LAST,LASTDX4,NUMTOSTR(LASTDX4,2)+' '),ALIGN2,colorFFFFFF;
DRAWTEXT(K5LAST,MIN(LASTDX5,LASTDX6)+(ABS(LASTDX6-LASTDX5))/2,NUMTOSTR(LASTDX5,2)+'-'+NUMTOSTR(LASTDX6,2)+' '),ALIGN2,colorFFFFFF;
DRAWTEXT(K5LAST,MIN(LASTDX7,LASTDX8)+(ABS(LASTDX8-LASTDX7))/2,NUMTOSTR(LASTDX7,2)+'-'+NUMTOSTR(LASTDX8,2)+' '),ALIGN2,colorFFFFFF;
DRAWTEXT(K5LAST,MIN(LASTDX8,LASTDX9)+(ABS(LASTDX9-LASTDX8))/2,NUMTOSTR(LASTDX8,2)+'-'+NUMTOSTR(LASTDX9,2)+' '),ALIGN2,colorFFFFFF;
END;
波神凯线操作口诀
一波上涨二三线,离场要在两线半;
二波关键五六线,五线离场要果断。
三波七八一循环,七上八下多空变;
回调关注一二线,五六顶底亦常见。
中国行情多变幻,第四线来是一关;
大波小段上下翻,波段操作天天赚。
------------------------------------
附:一年时间之窗转折日 (带*是神奇数字)
一月:6、15、21、*25 七月:8、15、*1 9、23
二月:6、15、21 八月:*6、8、15、23
三月:6、15、*20、21 九月:8、15、*1 8、23
四月:6、15、21 十月:8、15、23、*31
五月:6、*1 2、15、21 十一月:8、15、23、*28
六月:6、*1 4、21 十二月:8、15、23、*31
============================================================
-------------------仓位控制原则-----------------------------
(一)永不满仓,始终保持30%以上的备用资金。(二)根据大盘风险系数来决定仓位高低,如果当前大盘风险系数是70%,那么仓位就应该是30%。 <1>、市场出现无风险机会的时候,可以放大资金操作;
<2>、在市场出现波段操作机会的时候,可以重仓短线操作;
<3>、在市场出现极品庄股行情机会的时候,可以三分仓中线操作;
<4>、在市场出现技术分析机会的时候,可以轻仓短线操作。(三)根据中、短周期两种投资模式来决定资金的划分模式,将总体资金划分为60%和40%两等份。 <1>.永不满仓,始终保持30%以上的备用资金。
<2>.根据大盘风险系数来决定仓位高低,如果当前大盘风险系数是70%,那么仓位就应该是30%。
{程序化交易 www.cxh99.com }
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容