老师您好,谢谢您,请您帮我改一下指标,谢谢 [博易POBO]
咨询内容:
LONG:=26;
M:=9;
CAPITAL:=GETPRICE1('流通股本');
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA:=EMA(DIF,M);
MACD:=2*(DIF-DEA);
KK:=IF(DIF>DEA,5,-5);
JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));
{计算出金叉死叉时的DIFF值}
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));
{计算出明日MACD=MACD时的DIFF值}
DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORGREEN,LINETHICK1,POINTDOT;
金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;
黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,NULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;
拐头价:IF(DIF拐头价<柱变向价,DIF拐头价,NULL), COLORRED,LINETHICK4;
DRAWNUMBER1(DIF<DEA,DIF拐头价,BARSLAST(CROSS(DEA,DIF))+1,0),COLORCYAN,NODRAW;
DRAWNUMBER1(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1,0),COLORWHITE,NODRAW;
ZJ:拐头价,COLOR0000FF;
HY:=金死叉价,COLORFF00FF;
IF(ZJ > REF(ZJ,1),ZJ,NULL),COLORRED,LINETHICK2;
IF(ZJ < REF(ZJ,1),ZJ,NULL),COLORGREEN,LINETHICK2;
IF(HY > REF(HY,1),HY,NULL),COLORMAGENTA,LINETHICK2,NODRAW;
IF(HY < REF(HY,1),HY,NULL),COLORBLUE,LINETHICK2,NODRAW;
STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;
STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;
STICKLINE(CLOSE = ZJ,H,L,3,0),COLORWHITE;
STICKLINE(CLOSE < ZJ,H,L,0,0),COLORYELLOW;
STICKLINE(CLOSE < ZJ,O,C,2.5,0),COLORYELLOW;
STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;
STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;
HD0:=CROSS(DIF,DEA);
金收:REF(L,BARSLAST(HD0)),COLORYELLOW,DOT;
DRAWNUMBER1(ISLASTBAR,金收,金收,0),COLORCYAN;
LD0:=CROSS(DEA,DIF);
死收:REF(H,BARSLAST(LD0)),COLOR00FF00,DOT;
{分时中的收盘标记}
IF(HOUR=15,H*1.008,NULL),POINTDOT,COLORFFFAAA,LINETHICK7;
IF(HOUR=15,H*1.008,NULL),POINTDOT,COLOR000FFF,LINETHICK5;
HSL:=V/CAPITAL*100;
DRAWNUMBER1(CURRBARSCOUNT=1 AND HSL,C,HSL,0),COLOR00FFFF;
AMOUNT:=AVPRICE*V;
分时均价:AMOUNT/VOL/100,COLORWHITE,NODRAW;
LONG:=26;
M:=9;
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA:=EMA(DIF,M);
MACD:=2*(DIF-DEA);
KK:=IF(DIF>DEA,5,-5);
JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));
{计算出金叉死叉时的DIFF值}
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));
{计算出明日MACD=MACD时的DIFF值}
DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORGREEN,LINETHICK1,POINTDOT;
金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;
黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;
拐头价:IF(DIF拐头价<柱变向价,DIF拐头价,DRAWNULL), COLORRED,LINETHICK4;
DRAWNUMBER(DIF<DEA,DIF拐头价,BARSLAST(CROSS(DEA,DIF))+1,0),COLORCYAN,NODRAW;
DRAWNUMBER(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1,0),COLORWHITE,NODRAW;
ZJ:拐头价,COLOR0000FF;
HY:=金死叉价,COLORFF00FF;
IF(ZJ > REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;
IF(ZJ < REF(ZJ,1),ZJ,DRAWNULL),COLORGREEN,LINETHICK2;
IF(HY > REF(HY,1),HY,DRAWNULL),COLORMAGENTA,LINETHICK2,NODRAW;
IF(HY < REF(HY,1),HY,DRAWNULL),COLORBLUE,LINETHICK2,NODRAW;
STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;
STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;
STICKLINE(CLOSE = ZJ,H,L,3,0),COLORWHITE;
STICKLINE(CLOSE < ZJ,H,L,0,0),COLORYELLOW;
STICKLINE(CLOSE < ZJ,O,C,2.5,0),COLORYELLOW;
STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;
STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;
HD0:=CROSS(DIF,DEA);
金收:REF(L,BARSLAST(HD0)),COLORYELLOW,POINTDOT;
DRAWNUMBER(ISLASTBAR,金收,金收,0),COLORCYAN;
LD0:=CROSS(DEA,DIF);
死收:REF(H,BARSLAST(LD0)),COLOR00FF00,POINTDOT;
{分时中的收盘标记}
IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLORFFFAAA,LINETHICK7;
IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLOR000FFF,LINETHICK5;
HSL:=V/CAPITAL*100;
DRAWNUMBER(CURRBARSCOUNT=1 AND HSL,C,HSL,0),COLOR00FFFF;
分时均价:AMOUNT/VOL/100,COLORWHITE,NODRAW; 谢谢老师;感谢 来源 程序化久久网
老师您好,谢谢您,请您帮我改一下指标,谢谢
SHORT:=12;LONG:=26;
M:=9;
CAPITAL:=GETPRICE1('流通股本');
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA:=EMA(DIF,M);
MACD:=2*(DIF-DEA);
KK:=IF(DIF>DEA,5,-5);
JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));
{计算出金叉死叉时的DIFF值}
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));
{计算出明日MACD=MACD时的DIFF值}
DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORGREEN,LINETHICK1,POINTDOT;
金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;
黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,NULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;
拐头价:IF(DIF拐头价<柱变向价,DIF拐头价,NULL), COLORRED,LINETHICK4;
DRAWNUMBER1(DIF<DEA,DIF拐头价,BARSLAST(CROSS(DEA,DIF))+1,0),COLORCYAN,NODRAW;
DRAWNUMBER1(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1,0),COLORWHITE,NODRAW;
ZJ:拐头价,COLOR0000FF;
HY:=金死叉价,COLORFF00FF;
IF(ZJ > REF(ZJ,1),ZJ,NULL),COLORRED,LINETHICK2;
IF(ZJ < REF(ZJ,1),ZJ,NULL),COLORGREEN,LINETHICK2;
IF(HY > REF(HY,1),HY,NULL),COLORMAGENTA,LINETHICK2,NODRAW;
IF(HY < REF(HY,1),HY,NULL),COLORBLUE,LINETHICK2,NODRAW;
STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;
STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;
STICKLINE(CLOSE = ZJ,H,L,3,0),COLORWHITE;
STICKLINE(CLOSE < ZJ,H,L,0,0),COLORYELLOW;
STICKLINE(CLOSE < ZJ,O,C,2.5,0),COLORYELLOW;
STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;
STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;
HD0:=CROSS(DIF,DEA);
金收:REF(L,BARSLAST(HD0)),COLORYELLOW,DOT;
DRAWNUMBER1(ISLASTBAR,金收,金收,0),COLORCYAN;
LD0:=CROSS(DEA,DIF);
死收:REF(H,BARSLAST(LD0)),COLOR00FF00,DOT;
{分时中的收盘标记}
IF(HOUR=15,H*1.008,NULL),POINTDOT,COLORFFFAAA,LINETHICK7;
IF(HOUR=15,H*1.008,NULL),POINTDOT,COLOR000FFF,LINETHICK5;
HSL:=V/CAPITAL*100;
DRAWNUMBER1(CURRBARSCOUNT=1 AND HSL,C,HSL,0),COLOR00FFFF;
AMOUNT:=AVPRICE*V;
分时均价:AMOUNT/VOL/100,COLORWHITE,NODRAW;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: SHORT:=12;LONG:=26;
M:=9;
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA:=EMA(DIF,M);
MACD:=2*(DIF-DEA);
KK:=IF(DIF>DEA,5,-5);
JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));
{计算出金叉死叉时的DIFF值}
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));
{计算出明日MACD=MACD时的DIFF值}
DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORGREEN,LINETHICK1,POINTDOT;
金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;
黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;
拐头价:IF(DIF拐头价<柱变向价,DIF拐头价,DRAWNULL), COLORRED,LINETHICK4;
DRAWNUMBER(DIF<DEA,DIF拐头价,BARSLAST(CROSS(DEA,DIF))+1,0),COLORCYAN,NODRAW;
DRAWNUMBER(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1,0),COLORWHITE,NODRAW;
ZJ:拐头价,COLOR0000FF;
HY:=金死叉价,COLORFF00FF;
IF(ZJ > REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;
IF(ZJ < REF(ZJ,1),ZJ,DRAWNULL),COLORGREEN,LINETHICK2;
IF(HY > REF(HY,1),HY,DRAWNULL),COLORMAGENTA,LINETHICK2,NODRAW;
IF(HY < REF(HY,1),HY,DRAWNULL),COLORBLUE,LINETHICK2,NODRAW;
STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;
STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;
STICKLINE(CLOSE = ZJ,H,L,3,0),COLORWHITE;
STICKLINE(CLOSE < ZJ,H,L,0,0),COLORYELLOW;
STICKLINE(CLOSE < ZJ,O,C,2.5,0),COLORYELLOW;
STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;
STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;
STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;
HD0:=CROSS(DIF,DEA);
金收:REF(L,BARSLAST(HD0)),COLORYELLOW,POINTDOT;
DRAWNUMBER(ISLASTBAR,金收,金收,0),COLORCYAN;
LD0:=CROSS(DEA,DIF);
死收:REF(H,BARSLAST(LD0)),COLOR00FF00,POINTDOT;
{分时中的收盘标记}
IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLORFFFAAA,LINETHICK7;
IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLOR000FFF,LINETHICK5;
HSL:=V/CAPITAL*100;
DRAWNUMBER(CURRBARSCOUNT=1 AND HSL,C,HSL,0),COLOR00FFFF;
分时均价:AMOUNT/VOL/100,COLORWHITE,NODRAW; 谢谢老师;感谢 来源 程序化久久网
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)
相关文章
-
没有相关内容