老师:如下是几个叠加综合指标,麻烦修改,谢 [博易POBO]
咨询内容:
,VALIGN0,FONTSIZE20
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
A:=DEA;
LC:=REF(CLOSE,1);
AA:=ABS(HIGH-LC);
BB:=ABS(LOW-LC);
CC:=ABS(HIGH-REF(LOW,1));
DD:=ABS(LC-REF(OPEN,1));
R:=IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4));
一线X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));
SI:=8*一线X/R*MAX(AA,BB);
ASI:=SUM(SI,40); //ASI=M1周期的SI之和,在日线上就是M1天的SI之和
ASIT:=MA(ASI,20); //ASIT=M2周期的ASI的移动平均值
B:=ASI;
一线天:IF( 1, EMA(SLOPE(C,60)*20+C,110),DRAWNULL ),COLORRED, LINETHICK1;
红:IF( A>= 0 AND B >= 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ),COLORRED, LINETHICK2;
绿:IF( A < 0 AND B < 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ), COLORGREEN, LINETHICK2;
大黄:IF( A < 0 AND B >= 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ),COLORMAGENTA, LINETHICK2;
小黄:IF( A >= 0 AND B < 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ),COLORMAGENTA, LINETHICK2;
//二
玄机:EMA(C,89),NODRAW,LINETHICK1,COLORGREEN;
玄机B线:=玄机>REF(玄机,1);
PARTLINE2(玄机,C>玄机,玄机,COLORBLUE,C<玄机,COLORGREEN),LINETHICK1;
//三
HH1:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2),HHV(H,2),0);
LL1:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2),LLV(L,2),0);
HH2:=VALUEWHEN(HH1>0,HH1);
LL2:=VALUEWHEN(LL1>0,LL1);
K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
DRAWTEXT(CROSS(0,K2),L,'买'),VALIGN0,COLORMAGENTA,FONTSIZE20;
DRAWTEXT(CROSS(K2,0),H,'卖'),COLORBLUE,FONTSIZE20;
//四
行情A:=(3*C+L+O+H)/6;
X:=(20*行情A+19*REF(行情A,1)+18*REF(行情A,2)+17*REF(行情A,3)+16*REF(行情A,4)+15*REF(行情A,5)+
14*REF(行情A,6)+13*REF(行情A,7)+12*REF(行情A,8)+11*REF(行情A,9)+10*REF(行情A,10)+9*REF(行情A,11)+8*REF(行情A,12)
+7*REF(行情A,13)+6*REF(行情A,14)+5*REF(行情A,15)+4*REF(行情A,16)+3*REF(行情A,17)+2*REF(行情A,18)+REF(行情A,20))/210;
KKA:=EMA(C,5);
KKB:=EMA(KKA,8);
KKC:=EMA(KKB,13);
行情6线:=EMA(行情A,6),COLORWHITE;
盈损17线:=EMA(CLOSE,17),COLORMAGENTA;
强弱13线:=EMA(X,13),COLORRED;
生命30线:EMA(KKC,30),COLORYELLOW,POINTDOT;
强线:=IF(强弱13线>行情6线,强弱13线 ,DRAWNULL),COLORGREEN,LINETHICK2;//短线下穿长线--绿下跌
弱线:=IF(强弱13线<=行情6线,强弱13线,DRAWNULL),COLORRED,LINETHICK2;//短线上穿长线--红上涨
//五
中轨BBIBOLL:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4,COLORRED;//中轨
上轨UPR:=中轨BBIBOLL+3*STD(中轨BBIBOLL,10),COLORC08000,POINTDOT;//上轨
下轨DWN:=中轨BBIBOLL-3*STD(中轨BBIBOLL,10),COLORC08000,POINTDOT;//下轨
PARTLINE2(中轨BBIBOLL,中轨BBIBOLL>REF(中轨BBIBOLL,1),COLORRED,中轨BBIBOLL<REF(中轨BBIBOLL,1),COLORGREEN),LINETHICK1;//中轨
COND1:=CROSS(中轨BBIBOLL>REF(中轨BBIBOLL,1)&&上轨UPR>REF(上轨UPR,1)&&下轨DWN>REF(下轨DWN,1),0.5);
COND2:=CROSS(中轨BBIBOLL<REF(中轨BBIBOLL,1)&&上轨UPR<REF(上轨UPR,1)&&下轨DWN<REF(下轨DWN,1),0.5);
//六
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
金牛:=(REFX(MA(REFX(MA(H,25),25/2),25),25/2)-REFX(MA(REFX(MA(L,25),25/2),25),25/2))*1+REFX(MA(REFX(MA(H,25),25/2),25),25/2),POINTDOT,COLORFF8000;
金钻趋势:=REFX(MA(REFX(MA(L,25),25/2),25),25/2)-(REFX(MA(REFX(MA(H,25),25/2),25),25/2)-REFX(MA(REFX(MA(L,25),25/2),25),25/2))*1,POINTDOT,COLORFF8000;
金牛2:=EMA(金钻趋势,25),COLORCYAN,LINETHICK1;
VAR23:=100*REFX(MA(REFX(MA(C-REF(C,1),6),6/2),6),6/2)/REFX(MA(REFX(MA(ABS(C-REF(C,1)),6),6/2),6),6/2);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2)>=1 AND CROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;
DRAWTEXT(XG,L,'买入'),COLORRED,VALIGN0,FONTSIZE20;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<金牛;
DRAWTEXT(XG2 AND L<金钻趋势,L,'金牛'),COLORMAGENTA,VALIGN0,FONTSIZE20;//金钻起涨
DRAWTEXT(XG2,L,'牛'),COLORYELLOW,VALIGN0,FONTSIZE20;//▲抓牛 老师://一中“一线天”在日周期中显示不对,//二兰绿线没显示出来,//四中“生命30线”能画虚线吗?你这小圆点太小了 来源 程序化久久网
老师:如下是几个叠加综合指标,麻烦修改,谢
老师:如下是几个叠加综合指标,麻烦修改,谢,VALIGN0,FONTSIZE20
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: //一DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
A:=DEA;
LC:=REF(CLOSE,1);
AA:=ABS(HIGH-LC);
BB:=ABS(LOW-LC);
CC:=ABS(HIGH-REF(LOW,1));
DD:=ABS(LC-REF(OPEN,1));
R:=IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4));
一线X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));
SI:=8*一线X/R*MAX(AA,BB);
ASI:=SUM(SI,40); //ASI=M1周期的SI之和,在日线上就是M1天的SI之和
ASIT:=MA(ASI,20); //ASIT=M2周期的ASI的移动平均值
B:=ASI;
一线天:IF( 1, EMA(SLOPE(C,60)*20+C,110),DRAWNULL ),COLORRED, LINETHICK1;
红:IF( A>= 0 AND B >= 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ),COLORRED, LINETHICK2;
绿:IF( A < 0 AND B < 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ), COLORGREEN, LINETHICK2;
大黄:IF( A < 0 AND B >= 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ),COLORMAGENTA, LINETHICK2;
小黄:IF( A >= 0 AND B < 0, EMA(SLOPE(C,60)*20+C,110), DRAWNULL ),COLORMAGENTA, LINETHICK2;
//二
玄机:EMA(C,89),NODRAW,LINETHICK1,COLORGREEN;
玄机B线:=玄机>REF(玄机,1);
PARTLINE2(玄机,C>玄机,玄机,COLORBLUE,C<玄机,COLORGREEN),LINETHICK1;
//三
HH1:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2),HHV(H,2),0);
LL1:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2),LLV(L,2),0);
HH2:=VALUEWHEN(HH1>0,HH1);
LL2:=VALUEWHEN(LL1>0,LL1);
K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
DRAWTEXT(CROSS(0,K2),L,'买'),VALIGN0,COLORMAGENTA,FONTSIZE20;
DRAWTEXT(CROSS(K2,0),H,'卖'),COLORBLUE,FONTSIZE20;
//四
行情A:=(3*C+L+O+H)/6;
X:=(20*行情A+19*REF(行情A,1)+18*REF(行情A,2)+17*REF(行情A,3)+16*REF(行情A,4)+15*REF(行情A,5)+
14*REF(行情A,6)+13*REF(行情A,7)+12*REF(行情A,8)+11*REF(行情A,9)+10*REF(行情A,10)+9*REF(行情A,11)+8*REF(行情A,12)
+7*REF(行情A,13)+6*REF(行情A,14)+5*REF(行情A,15)+4*REF(行情A,16)+3*REF(行情A,17)+2*REF(行情A,18)+REF(行情A,20))/210;
KKA:=EMA(C,5);
KKB:=EMA(KKA,8);
KKC:=EMA(KKB,13);
行情6线:=EMA(行情A,6),COLORWHITE;
盈损17线:=EMA(CLOSE,17),COLORMAGENTA;
强弱13线:=EMA(X,13),COLORRED;
生命30线:EMA(KKC,30),COLORYELLOW,POINTDOT;
强线:=IF(强弱13线>行情6线,强弱13线 ,DRAWNULL),COLORGREEN,LINETHICK2;//短线下穿长线--绿下跌
弱线:=IF(强弱13线<=行情6线,强弱13线,DRAWNULL),COLORRED,LINETHICK2;//短线上穿长线--红上涨
//五
中轨BBIBOLL:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4,COLORRED;//中轨
上轨UPR:=中轨BBIBOLL+3*STD(中轨BBIBOLL,10),COLORC08000,POINTDOT;//上轨
下轨DWN:=中轨BBIBOLL-3*STD(中轨BBIBOLL,10),COLORC08000,POINTDOT;//下轨
PARTLINE2(中轨BBIBOLL,中轨BBIBOLL>REF(中轨BBIBOLL,1),COLORRED,中轨BBIBOLL<REF(中轨BBIBOLL,1),COLORGREEN),LINETHICK1;//中轨
COND1:=CROSS(中轨BBIBOLL>REF(中轨BBIBOLL,1)&&上轨UPR>REF(上轨UPR,1)&&下轨DWN>REF(下轨DWN,1),0.5);
COND2:=CROSS(中轨BBIBOLL<REF(中轨BBIBOLL,1)&&上轨UPR<REF(上轨UPR,1)&&下轨DWN<REF(下轨DWN,1),0.5);
//六
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
金牛:=(REFX(MA(REFX(MA(H,25),25/2),25),25/2)-REFX(MA(REFX(MA(L,25),25/2),25),25/2))*1+REFX(MA(REFX(MA(H,25),25/2),25),25/2),POINTDOT,COLORFF8000;
金钻趋势:=REFX(MA(REFX(MA(L,25),25/2),25),25/2)-(REFX(MA(REFX(MA(H,25),25/2),25),25/2)-REFX(MA(REFX(MA(L,25),25/2),25),25/2))*1,POINTDOT,COLORFF8000;
金牛2:=EMA(金钻趋势,25),COLORCYAN,LINETHICK1;
VAR23:=100*REFX(MA(REFX(MA(C-REF(C,1),6),6/2),6),6/2)/REFX(MA(REFX(MA(ABS(C-REF(C,1)),6),6/2),6),6/2);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2)>=1 AND CROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;
DRAWTEXT(XG,L,'买入'),COLORRED,VALIGN0,FONTSIZE20;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<金牛;
DRAWTEXT(XG2 AND L<金钻趋势,L,'金牛'),COLORMAGENTA,VALIGN0,FONTSIZE20;//金钻起涨
DRAWTEXT(XG2,L,'牛'),COLORYELLOW,VALIGN0,FONTSIZE20;//▲抓牛 老师://一中“一线天”在日周期中显示不对,//二兰绿线没显示出来,//四中“生命30线”能画虚线吗?你这小圆点太小了 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容