请老师把我这个源码转换成博易大师之用 [博易POBO]
咨询内容:
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
{DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED}{左上角显示股票所属板块期货无用};
金牛:(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1+XMA(XMA(H,30),30),DOTLINE,COLORYELLOW;
金钻趋势:XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1,LINETHICK4,COLORRED;
金牛2:EMA(金钻趋势,30)COLORCYAN,LINETHICK2;
DRAWBAND(金钻趋势,RGB(60,0,0),金牛2,RGB(0,91,0));
DRAWKLINE(H,O,L,C);
STICKLINE(金钻趋势>LOW AND 金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;
STICKLINE(金钻趋势>MIN(C,O) AND 金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;
DRAWTEXT(XG,L,'▲买入'),COLORRED;
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,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
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,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2 AND L<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;
{日:=120};昨前:=5;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H11:=高1-(高1-低1)*0.191;
H21:=高1-(高1-低1)*0.382;
H31:=高1-(高1-低1)*0.5;
H41:=高1-(高1-低1)*0.618;
H51:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),LINETHICK3,COLORRED;
一0.809:REFDATE(H11,DATE),COLORFFFF00};
{ 二0.618:REFDATE(H21,DATE),COLORMAGENTA};
{三0.500:REFDATE(H31,DATE),COLORWHITE};
{四0.382:REFDATE(H41,DATE),COLORGREEN};
五0.191:REFDATE(H51,DATE),COLORYELLOW};
低:REFDATE(低1,DATE), LINETHICK3,COLORRED;
金钻趋势:EMA(EMA(L,30),30)-(EMA(EMA(H,30),30)-EMA(EMA(L,30),30))*1,LINETHICK4,COLORRED;
金牛2:EMA(金钻趋势,30),COLORCYAN,LINETHICK2;
FILLRGN2(金钻趋势,金牛2,金钻趋势>金牛2,COLOR00003C,金钻趋势<金牛2,COLOR005B00);
DRAWKLINE(H,O,L,C);
STICKLINE(金钻趋势>LOWAND金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;
STICKLINE(金钻趋势>MIN(C,O)AND金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*EMA(EMA((C-REF(C,1)),6),6)/EMA(EMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7)ANDCOUNT(VAR23<0,2)ANDCROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGHAND回调买ANDL<=金钻趋势;
DRAWTEXT(XG,L,'▲买入'),COLORRED;
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,LINETHICK1;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
AA1:=REF(HOUR,1)=15ANDHOUR<>15;
AA2:=BARSLAST(AA1);
V5:=SMA(V2*120/AA2*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=DATACOUNT-BARPOS=1ANDC<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>OANDDY2<0.02ANDMA(C,5)>MA(C,60)ANDC/REF(C,1)>=1.02ANDH<金牛;
{DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2ANDL<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;
日:=120;昨前:=5;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H11:=高1-(高1-低1)*0.191;
H21:=高1-(高1-低1)*0.382;
H31:=高1-(高1-低1)*0.5;
H41:=高1-(高1-低1)*0.618;
H51:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),LINETHICK3,COLORRED;
一0809:REFDATE(H11,DATE),COLORFFFF00;
五0191:REFDATE(H51,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),LINETHICK3,COLORRED; 来源 程序化久久网
请老师把我这个源码转换成博易大师之用
{DRAWTEXT_FIX(1,0.88,5,0,'~☆~夏阳~☆~'),COLORBLUE};Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
{DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED}{左上角显示股票所属板块期货无用};
金牛:(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1+XMA(XMA(H,30),30),DOTLINE,COLORYELLOW;
金钻趋势:XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1,LINETHICK4,COLORRED;
金牛2:EMA(金钻趋势,30)COLORCYAN,LINETHICK2;
DRAWBAND(金钻趋势,RGB(60,0,0),金牛2,RGB(0,91,0));
DRAWKLINE(H,O,L,C);
STICKLINE(金钻趋势>LOW AND 金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;
STICKLINE(金钻趋势>MIN(C,O) AND 金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;
DRAWTEXT(XG,L,'▲买入'),COLORRED;
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,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
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,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2 AND L<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;
{日:=120};昨前:=5;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H11:=高1-(高1-低1)*0.191;
H21:=高1-(高1-低1)*0.382;
H31:=高1-(高1-低1)*0.5;
H41:=高1-(高1-低1)*0.618;
H51:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),LINETHICK3,COLORRED;
一0.809:REFDATE(H11,DATE),COLORFFFF00};
{ 二0.618:REFDATE(H21,DATE),COLORMAGENTA};
{三0.500:REFDATE(H31,DATE),COLORWHITE};
{四0.382:REFDATE(H41,DATE),COLORGREEN};
五0.191:REFDATE(H51,DATE),COLORYELLOW};
低:REFDATE(低1,DATE), LINETHICK3,COLORRED;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 谢谢老师,请问老师还有这个语句 DRAWBAND(金钻趋势,RGB(60,0,0),金牛2,RGB(0,91,0));是加不进去吗? 金牛:(EMA(EMA(H,30),30)-EMA(EMA(L,30),30))*1+EMA(EMA(H,30),30),POINTDOT,COLORYELLOW;金钻趋势:EMA(EMA(L,30),30)-(EMA(EMA(H,30),30)-EMA(EMA(L,30),30))*1,LINETHICK4,COLORRED;
金牛2:EMA(金钻趋势,30),COLORCYAN,LINETHICK2;
FILLRGN2(金钻趋势,金牛2,金钻趋势>金牛2,COLOR00003C,金钻趋势<金牛2,COLOR005B00);
DRAWKLINE(H,O,L,C);
STICKLINE(金钻趋势>LOWAND金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;
STICKLINE(金钻趋势>MIN(C,O)AND金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*EMA(EMA((C-REF(C,1)),6),6)/EMA(EMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7)ANDCOUNT(VAR23<0,2)ANDCROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGHAND回调买ANDL<=金钻趋势;
DRAWTEXT(XG,L,'▲买入'),COLORRED;
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,LINETHICK1;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
AA1:=REF(HOUR,1)=15ANDHOUR<>15;
AA2:=BARSLAST(AA1);
V5:=SMA(V2*120/AA2*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=DATACOUNT-BARPOS=1ANDC<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>OANDDY2<0.02ANDMA(C,5)>MA(C,60)ANDC/REF(C,1)>=1.02ANDH<金牛;
{DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2ANDL<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;
日:=120;昨前:=5;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H11:=高1-(高1-低1)*0.191;
H21:=高1-(高1-低1)*0.382;
H31:=高1-(高1-低1)*0.5;
H41:=高1-(高1-低1)*0.618;
H51:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),LINETHICK3,COLORRED;
一0809:REFDATE(H11,DATE),COLORFFFF00;
五0191:REFDATE(H51,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),LINETHICK3,COLORRED; 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容