老师您好,帮忙把文华改成博弈的 [博易POBO]
咨询内容:
E5:=EMA(C,5);
E13:=EMA(C,13);
DRAWKLINE1(H,O,L,C);
平衡:EMA(C,20),COLORYELLOW;
上轨:平衡 + 2*STD(C,20),LINETHICK2,COLORMAGENTA;
下轨:平衡 - 2*STD(C,20),LINETHICK3,COLORGREEN;
上:=EMA(C,3),COLORBLUE,LINETHICK1;
中:=EMA(C,5),COLORWHITE,LINETHICK1;
下:=EMA(中,5),COLOR00FF00,LINETHICK1;
IF(上>中 AND 上>REF(上,1), 上,NULL),LINETHICK2,COLORRED;
IF(中>下 AND 中>REF(中,1), 中,NULL),LINETHICK2,COLORRED;
QQ:= C<中;
MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ;
VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW -0.6,'(买)'),COLORFF99FF;
DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH +0.9,'(卖)'),COLORCCFF13;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L,L*0.92,1,1),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
MA1:=EMA(CLOSE,5);
MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;
MA3:=IF(MA2>0,MA2,MA2);
MA5:MA(C,5);
MA25:=MA(C,25),COLORGREEN,LINETHICK2;
VAR1:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3))
OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND
REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND
C>=REF(C,1) AND C>=REF(C,2);
//收盘价=4日内收盘价的最高值 AND 昨收>=2日前的收盘价
VAR2:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);
//收盘价=4日内收盘价的最高值 AND 昨收=4日内收盘价的最低值
VAR3:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR
REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND
REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND
C<REF(C,1) AND C<REF(C,2);
//收盘价=4日内收盘价的最低值 AND (昨收<2日前的收盘价
VAR4:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND
REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
STICKLINE1(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE1(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,3.3,0),COLORFF6600;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFF8800;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,1.3,0),COLORFFAA00;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,0.6,0),COLORFFCC00;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,3.3,0),COLOR000099;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR0000BB;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,1.3,0),COLOR0000DD;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLOR0000FF;
STICKLINE1(VAR3,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR009900;
STICKLINE1(VAR3,OPEN,(OPEN+CLOSE)/2,2.4,0),COLOR00BB00;
STICKLINE1(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR999999;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,1.3,0),COLORDDDDDD;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
AA10:=MA(CLOSE,8),COLOR0000FF;
BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);
均线30:=MA(CLOSE,30);
均线89:=MA(CLOSE,89);
均线:=MA(CLOSE,16);
DRAWTEXT((((((OPEN <= 均线) AND ((均线30 - REF(均线30,1)) > 0))
AND (CLOSE > 均线89)) AND (BB10 > 1)) AND ((CLOSE / OPEN) > 1.04)),
LOW,'←天马过桥'),COLORCC99FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。
K1:=SMA(RSV,3,1);//RSV的移动平均值
D1:=SMA(K1,3,1);//K的移动平均值
J1:=3*K1-2*D1;
角线:=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926);
角线MA:=MA(角线,5);
ANA:=VALUEWHEN(CROSS(角线,角线MA),角线MA),COLORRED;
ANB:=VALUEWHEN(CROSS(角线MA,角线),角线MA),COLORFF00FF ;
角买点:=CROSS(角线,角线MA) AND ((ANB>REF(ANB,1) AND ANB>ANA AND 角线MA<=0) OR ((角线MA<=-45 OR CROSS(角线MA,-45)) AND (ANB<-60 OR LLV(J1,3)<=-49) AND ANB>0)),COLORGREEN;
角起涨:=COUNT(CROSS(角线,角线MA),ANA<REF(ANA,5) AND ANB>REF(ANB,5));
角卖点:=(CROSS(角线MA,角线) AND (ANB>REF(ANB,1) OR ANA<REF(ANA,1)) AND ANB>ANA{AND ANB>0} AND 角线MA>0)*1;
角始跌:=COUNT(CROSS(角线MA,角线),ANA<REF(ANA,5) AND ANB>REF(ANB,5));
DRAWTEXT(角买点,L,'━━角买'),COLOR00FFFF;
//2、
A1:=ABS((EMA(CLOSE, 5) - EMA(CLOSE, 10))) * 628;
A2:=A1 / CLOSE;
超短线1:IF((A1<A2),1,0),LINETHICK2,COLORRED;
A3:=REF(CLOSE,1);
A4:=SMA(MAX((CLOSE - A3),0), 8, 1) / SMA(ABS((CLOSE - A3)), 8.000, 1) * 100;
A5:=SMA(MAX((CLOSE - A3),0), 55, 1) / SMA(ABS((CLOSE - A3)), 55.000, 1) * 100;
超短线2:(((A4<= 20) AND (A5 <= 49)) * 1),LINETHICK2,COLORYELLOW;
超卖1: IF(SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE- REF(CLOSE,2))
,7,1)*100<12,0.5,0),LINETHICK2,COLOR00FF00;
超卖2: IF(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1))
,7,1)*100 <12,0.5,0),LINETHICK2,COLORF00FF0;
//3、
DFO:=(C-REF(C,1))/REF(C,1)*100<-5;
AAO:=BARSLAST(DFO);
突破箱体:=CROSS(C,REF(O,AAO));
抄底买点: 突破箱体,LINETHICK4,COLORRED;
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA := EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
XXX:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(XXX,3,1);
D:=SMA(K,3,1);
叉1:=CROSS(K,D);
AA:=DIFF;
AB:=DEA;
叉2:=CROSS(AA,AB);
金塔叉:叉1 AND 叉2;
STICKLINE(金塔叉,0,1.3,1,0),COLOR00FFFF;
DRAWTEXT(金塔叉,1,'金塔'),COLOR00FFFF;
E13:=EMA(C,13);
DRAWKLINE(H,O,L,C);
平衡:EMA(C,20),COLORYELLOW;
上轨:平衡+2*STD(C,20),LINETHICK2,COLORMAGENTA;
下轨:平衡-2*STD(C,20),LINETHICK3,COLORGREEN;
上:=EMA(C,3),COLORBLUE,LINETHICK1;
中:=EMA(C,5),COLORWHITE,LINETHICK1;
下:=EMA(中,5),COLOR00FF00,LINETHICK1;
IF(上>中AND上>REF(上,1),上,DRAWNULL),LINETHICK2,COLORRED;
IF(中>下AND中>REF(中,1),中,DRAWNULL),LINETHICK2,COLORRED;
QQ:=C<中;
MM:=上>REF(上,1)ANDREF(上,1)<REF(上,2);
VAR1W:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR2W:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR3W:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW-0.6,'(买)'),COLORFF99FF;
DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH+0.9,'(卖)'),COLORCCFF13;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050ANDHIGH/CLOSE<1.010ANDIF(CLOSE>REF(CLOSE,1),88,0)>0,91,0);
STICKLINE(VAR3P>90,L,L*0.92,1,1),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
MA1:=EMA(CLOSE,5);
MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;
MA3:=IF(MA2>0,MA2,MA2);
MA5:MA(C,5);
MA25:=MA(C,25),COLORGREEN,LINETHICK2;
VAR1:=CLOSE=HHV(C,4)AND(REF(C,1)>=REF(C,2)ORREF(C,1)>=REF(C,3))
ORREF(C,1)=HHV(C,4)ANDCLOSE>=REF(C,2)ORREF(C,2)=HHV(C,4)AND
REF(C,3)=LLV(C,4)ANDC>=REF(C,1)ORREF(C,3)=HHV(C,4)AND
C>=REF(C,1)ANDC>=REF(C,2);
//收盘价=4日内收盘价的最高值AND昨收>=2日前的收盘价
VAR2:=CLOSE=HHV(C,4)ANDREF(C,1)=LLV(C,4);
//收盘价=4日内收盘价的最高值AND昨收=4日内收盘价的最低值
VAR3:=CLOSE=LLV(C,4)AND(REF(C,1)<REF(C,2)ORREF(C,1)<REF(C,3))OR
REF(C,1)=LLV(C,4)ANDC<REF(C,2)ORREF(C,2)=LLV(C,4)AND
REF(C,1)=HHV(C,4)ANDC<REF(C,1)ORREF(C,3)=LLV(C,4)AND
C<REF(C,1)ANDC<REF(C,2);
//收盘价=4日内收盘价的最低值AND(昨收<2日前的收盘价
VAR4:=REF(C,1)=LLV(C,4)ANDC>=REF(C,2)ORREF(C,2)=LLV(C,4)AND
REF(C,1)<=REF(C,3)ANDREF(C,2)<REF(C,4)ANDC>=REF(C,1);
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985ANDCLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015ANDCLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3.3,0),COLORFF6600;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFF8800;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.3,0),COLORFFAA00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.6,0),COLORFFCC00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.3,0),COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLOR0000FF;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR009900;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,2.4,0),COLOR00BB00;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR999999;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,1.3,0),COLORDDDDDD;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
AA10:=MA(CLOSE,8),COLOR0000FF;
BB10:=((ATAN((AA10-REF(AA10,1)))*3.1416)*10);
均线30:=MA(CLOSE,30);
均线89:=MA(CLOSE,89);
均线:=MA(CLOSE,16);
DRAWTEXT((((((OPEN<=均线)AND((均线30-REF(均线30,1))>0))
AND(CLOSE>均线89))AND(BB10>1))AND((CLOSE/OPEN)>1.04)),
LOW,'←天马过桥'),COLORCC99FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。
K1:=SMA(RSV,3,1);//RSV的移动平均值
D1:=SMA(K1,3,1);//K的移动平均值
J1:=3*K1-2*D1;
角线:=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926);
角线MA:=MA(角线,5);
ANA:=VALUEWHEN(CROSS(角线,角线MA),角线MA),COLORRED;
ANB:=VALUEWHEN(CROSS(角线MA,角线),角线MA),COLORFF00FF;
角买点:=CROSS(角线,角线MA)AND((ANB>REF(ANB,1)ANDANB>ANAAND角线MA<=0)OR((角线MA<=-45ORCROSS(角线MA,-45))AND(ANB<-60ORLLV(J1,3)<=-49)ANDANB>0)),COLORGREEN;
角起涨:=COUNT(CROSS(角线,角线MA),ANA<REF(ANA,5)ANDANB>REF(ANB,5));
角卖点:=(CROSS(角线MA,角线)AND(ANB>REF(ANB,1)ORANA<REF(ANA,1))ANDANB>ANA{ANDANB>0}AND角线MA>0)*1;
角始跌:=COUNT(CROSS(角线MA,角线),ANA<REF(ANA,5)ANDANB>REF(ANB,5));
DRAWTEXT(角买点,L,'━━角买'),COLOR00FFFF;
//2、
A1:=ABS((EMA(CLOSE,5)-EMA(CLOSE,10)))*628;
A2:=A1/CLOSE;
超短线1:IF((A1<A2),1,0),LINETHICK2,COLORRED;
A3:=REF(CLOSE,1);
A4:=SMA(MAX((CLOSE-A3),0),8,1)/SMA(ABS((CLOSE-A3)),8.000,1)*100;
A5:=SMA(MAX((CLOSE-A3),0),55,1)/SMA(ABS((CLOSE-A3)),55.000,1)*100;
超短线2:(((A4<=20)AND(A5<=49))*1),LINETHICK2,COLORYELLOW;
超卖1:IF(SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2))
,7,1)*100<12,0.5,0),LINETHICK2,COLOR00FF00;
超卖2:IF(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1))
,7,1)*100<12,0.5,0),LINETHICK2,COLORF00FF0;
//3、
DFO:=(C-REF(C,1))/REF(C,1)*100<-5;
AAO:=BARSLAST(DFO);
突破箱体:=CROSS(C,REF(O,AAO));
抄底买点:突破箱体,LINETHICK4,COLORRED;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA :=EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
XXX:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(XXX,3,1);
D:=SMA(K,3,1);
叉1:=CROSS(K,D);
AA:=DIFF;
AB:=DEA;
叉2:=CROSS(AA,AB);
金塔叉:叉1AND叉2;
STICKLINE(金塔叉,0,1.3,1,0),COLOR00FFFF;
DRAWTEXT(金塔叉,1,'金塔'),COLOR00FFFF; 来源 程序化久久网
老师您好,帮忙把文华改成博弈的
E5:=EMA(C,5);
E13:=EMA(C,13);
DRAWKLINE1(H,O,L,C);
平衡:EMA(C,20),COLORYELLOW;
上轨:平衡 + 2*STD(C,20),LINETHICK2,COLORMAGENTA;
下轨:平衡 - 2*STD(C,20),LINETHICK3,COLORGREEN;
上:=EMA(C,3),COLORBLUE,LINETHICK1;
中:=EMA(C,5),COLORWHITE,LINETHICK1;
下:=EMA(中,5),COLOR00FF00,LINETHICK1;
IF(上>中 AND 上>REF(上,1), 上,NULL),LINETHICK2,COLORRED;
IF(中>下 AND 中>REF(中,1), 中,NULL),LINETHICK2,COLORRED;
QQ:= C<中;
MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ;
VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW -0.6,'(买)'),COLORFF99FF;
DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH +0.9,'(卖)'),COLORCCFF13;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L,L*0.92,1,1),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
MA1:=EMA(CLOSE,5);
MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;
MA3:=IF(MA2>0,MA2,MA2);
MA5:MA(C,5);
MA25:=MA(C,25),COLORGREEN,LINETHICK2;
VAR1:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3))
OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND
REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND
C>=REF(C,1) AND C>=REF(C,2);
//收盘价=4日内收盘价的最高值 AND 昨收>=2日前的收盘价
VAR2:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);
//收盘价=4日内收盘价的最高值 AND 昨收=4日内收盘价的最低值
VAR3:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR
REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND
REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND
C<REF(C,1) AND C<REF(C,2);
//收盘价=4日内收盘价的最低值 AND (昨收<2日前的收盘价
VAR4:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND
REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
STICKLINE1(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE1(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,3.3,0),COLORFF6600;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFF8800;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,1.3,0),COLORFFAA00;
STICKLINE1(OPEN>=CLOSE,CLOSE,OPEN,0.6,0),COLORFFCC00;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,3.3,0),COLOR000099;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR0000BB;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,1.3,0),COLOR0000DD;
STICKLINE1(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLOR0000FF;
STICKLINE1(VAR3,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR009900;
STICKLINE1(VAR3,OPEN,(OPEN+CLOSE)/2,2.4,0),COLOR00BB00;
STICKLINE1(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR999999;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,1.3,0),COLORDDDDDD;
STICKLINE1(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
AA10:=MA(CLOSE,8),COLOR0000FF;
BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);
均线30:=MA(CLOSE,30);
均线89:=MA(CLOSE,89);
均线:=MA(CLOSE,16);
DRAWTEXT((((((OPEN <= 均线) AND ((均线30 - REF(均线30,1)) > 0))
AND (CLOSE > 均线89)) AND (BB10 > 1)) AND ((CLOSE / OPEN) > 1.04)),
LOW,'←天马过桥'),COLORCC99FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。
K1:=SMA(RSV,3,1);//RSV的移动平均值
D1:=SMA(K1,3,1);//K的移动平均值
J1:=3*K1-2*D1;
角线:=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926);
角线MA:=MA(角线,5);
ANA:=VALUEWHEN(CROSS(角线,角线MA),角线MA),COLORRED;
ANB:=VALUEWHEN(CROSS(角线MA,角线),角线MA),COLORFF00FF ;
角买点:=CROSS(角线,角线MA) AND ((ANB>REF(ANB,1) AND ANB>ANA AND 角线MA<=0) OR ((角线MA<=-45 OR CROSS(角线MA,-45)) AND (ANB<-60 OR LLV(J1,3)<=-49) AND ANB>0)),COLORGREEN;
角起涨:=COUNT(CROSS(角线,角线MA),ANA<REF(ANA,5) AND ANB>REF(ANB,5));
角卖点:=(CROSS(角线MA,角线) AND (ANB>REF(ANB,1) OR ANA<REF(ANA,1)) AND ANB>ANA{AND ANB>0} AND 角线MA>0)*1;
角始跌:=COUNT(CROSS(角线MA,角线),ANA<REF(ANA,5) AND ANB>REF(ANB,5));
DRAWTEXT(角买点,L,'━━角买'),COLOR00FFFF;
//2、
A1:=ABS((EMA(CLOSE, 5) - EMA(CLOSE, 10))) * 628;
A2:=A1 / CLOSE;
超短线1:IF((A1<A2),1,0),LINETHICK2,COLORRED;
A3:=REF(CLOSE,1);
A4:=SMA(MAX((CLOSE - A3),0), 8, 1) / SMA(ABS((CLOSE - A3)), 8.000, 1) * 100;
A5:=SMA(MAX((CLOSE - A3),0), 55, 1) / SMA(ABS((CLOSE - A3)), 55.000, 1) * 100;
超短线2:(((A4<= 20) AND (A5 <= 49)) * 1),LINETHICK2,COLORYELLOW;
超卖1: IF(SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE- REF(CLOSE,2))
,7,1)*100<12,0.5,0),LINETHICK2,COLOR00FF00;
超卖2: IF(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1))
,7,1)*100 <12,0.5,0),LINETHICK2,COLORF00FF0;
//3、
DFO:=(C-REF(C,1))/REF(C,1)*100<-5;
AAO:=BARSLAST(DFO);
突破箱体:=CROSS(C,REF(O,AAO));
抄底买点: 突破箱体,LINETHICK4,COLORRED;
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA := EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
XXX:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(XXX,3,1);
D:=SMA(K,3,1);
叉1:=CROSS(K,D);
AA:=DIFF;
AB:=DEA;
叉2:=CROSS(AA,AB);
金塔叉:叉1 AND 叉2;
STICKLINE(金塔叉,0,1.3,1,0),COLOR00FFFF;
DRAWTEXT(金塔叉,1,'金塔'),COLOR00FFFF;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 这个公式分三段,应该不能叠加在一起,数值相差比较大。 E5:=EMA(C,5);E13:=EMA(C,13);
DRAWKLINE(H,O,L,C);
平衡:EMA(C,20),COLORYELLOW;
上轨:平衡+2*STD(C,20),LINETHICK2,COLORMAGENTA;
下轨:平衡-2*STD(C,20),LINETHICK3,COLORGREEN;
上:=EMA(C,3),COLORBLUE,LINETHICK1;
中:=EMA(C,5),COLORWHITE,LINETHICK1;
下:=EMA(中,5),COLOR00FF00,LINETHICK1;
IF(上>中AND上>REF(上,1),上,DRAWNULL),LINETHICK2,COLORRED;
IF(中>下AND中>REF(中,1),中,DRAWNULL),LINETHICK2,COLORRED;
QQ:=C<中;
MM:=上>REF(上,1)ANDREF(上,1)<REF(上,2);
VAR1W:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR2W:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR3W:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW-0.6,'(买)'),COLORFF99FF;
DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH+0.9,'(卖)'),COLORCCFF13;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050ANDHIGH/CLOSE<1.010ANDIF(CLOSE>REF(CLOSE,1),88,0)>0,91,0);
STICKLINE(VAR3P>90,L,L*0.92,1,1),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
MA1:=EMA(CLOSE,5);
MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;
MA3:=IF(MA2>0,MA2,MA2);
MA5:MA(C,5);
MA25:=MA(C,25),COLORGREEN,LINETHICK2;
VAR1:=CLOSE=HHV(C,4)AND(REF(C,1)>=REF(C,2)ORREF(C,1)>=REF(C,3))
ORREF(C,1)=HHV(C,4)ANDCLOSE>=REF(C,2)ORREF(C,2)=HHV(C,4)AND
REF(C,3)=LLV(C,4)ANDC>=REF(C,1)ORREF(C,3)=HHV(C,4)AND
C>=REF(C,1)ANDC>=REF(C,2);
//收盘价=4日内收盘价的最高值AND昨收>=2日前的收盘价
VAR2:=CLOSE=HHV(C,4)ANDREF(C,1)=LLV(C,4);
//收盘价=4日内收盘价的最高值AND昨收=4日内收盘价的最低值
VAR3:=CLOSE=LLV(C,4)AND(REF(C,1)<REF(C,2)ORREF(C,1)<REF(C,3))OR
REF(C,1)=LLV(C,4)ANDC<REF(C,2)ORREF(C,2)=LLV(C,4)AND
REF(C,1)=HHV(C,4)ANDC<REF(C,1)ORREF(C,3)=LLV(C,4)AND
C<REF(C,1)ANDC<REF(C,2);
//收盘价=4日内收盘价的最低值AND(昨收<2日前的收盘价
VAR4:=REF(C,1)=LLV(C,4)ANDC>=REF(C,2)ORREF(C,2)=LLV(C,4)AND
REF(C,1)<=REF(C,3)ANDREF(C,2)<REF(C,4)ANDC>=REF(C,1);
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985ANDCLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015ANDCLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3.3,0),COLORFF6600;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFF8800;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.3,0),COLORFFAA00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.6,0),COLORFFCC00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.3,0),COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLOR0000FF;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR009900;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,2.4,0),COLOR00BB00;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR999999;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,1.3,0),COLORDDDDDD;
STICKLINE(VAR4ANDMM,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
AA10:=MA(CLOSE,8),COLOR0000FF;
BB10:=((ATAN((AA10-REF(AA10,1)))*3.1416)*10);
均线30:=MA(CLOSE,30);
均线89:=MA(CLOSE,89);
均线:=MA(CLOSE,16);
DRAWTEXT((((((OPEN<=均线)AND((均线30-REF(均线30,1))>0))
AND(CLOSE>均线89))AND(BB10>1))AND((CLOSE/OPEN)>1.04)),
LOW,'←天马过桥'),COLORCC99FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。
K1:=SMA(RSV,3,1);//RSV的移动平均值
D1:=SMA(K1,3,1);//K的移动平均值
J1:=3*K1-2*D1;
角线:=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926);
角线MA:=MA(角线,5);
ANA:=VALUEWHEN(CROSS(角线,角线MA),角线MA),COLORRED;
ANB:=VALUEWHEN(CROSS(角线MA,角线),角线MA),COLORFF00FF;
角买点:=CROSS(角线,角线MA)AND((ANB>REF(ANB,1)ANDANB>ANAAND角线MA<=0)OR((角线MA<=-45ORCROSS(角线MA,-45))AND(ANB<-60ORLLV(J1,3)<=-49)ANDANB>0)),COLORGREEN;
角起涨:=COUNT(CROSS(角线,角线MA),ANA<REF(ANA,5)ANDANB>REF(ANB,5));
角卖点:=(CROSS(角线MA,角线)AND(ANB>REF(ANB,1)ORANA<REF(ANA,1))ANDANB>ANA{ANDANB>0}AND角线MA>0)*1;
角始跌:=COUNT(CROSS(角线MA,角线),ANA<REF(ANA,5)ANDANB>REF(ANB,5));
DRAWTEXT(角买点,L,'━━角买'),COLOR00FFFF;
//2、
A1:=ABS((EMA(CLOSE,5)-EMA(CLOSE,10)))*628;
A2:=A1/CLOSE;
超短线1:IF((A1<A2),1,0),LINETHICK2,COLORRED;
A3:=REF(CLOSE,1);
A4:=SMA(MAX((CLOSE-A3),0),8,1)/SMA(ABS((CLOSE-A3)),8.000,1)*100;
A5:=SMA(MAX((CLOSE-A3),0),55,1)/SMA(ABS((CLOSE-A3)),55.000,1)*100;
超短线2:(((A4<=20)AND(A5<=49))*1),LINETHICK2,COLORYELLOW;
超卖1:IF(SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2))
,7,1)*100<12,0.5,0),LINETHICK2,COLOR00FF00;
超卖2:IF(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1))
,7,1)*100<12,0.5,0),LINETHICK2,COLORF00FF0;
//3、
DFO:=(C-REF(C,1))/REF(C,1)*100<-5;
AAO:=BARSLAST(DFO);
突破箱体:=CROSS(C,REF(O,AAO));
抄底买点:突破箱体,LINETHICK4,COLORRED;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA :=EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
XXX:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(XXX,3,1);
D:=SMA(K,3,1);
叉1:=CROSS(K,D);
AA:=DIFF;
AB:=DEA;
叉2:=CROSS(AA,AB);
金塔叉:叉1AND叉2;
STICKLINE(金塔叉,0,1.3,1,0),COLOR00FFFF;
DRAWTEXT(金塔叉,1,'金塔'),COLOR00FFFF; 来源 程序化久久网
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 或微信号:cxh99cxh99 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)
相关文章
-
没有相关内容