您现在的位置:程序化交易>> 期货公式>> 博易大师>> 博易大师知识>>正文内容

老师文化改博易 [博易POBO]

咨询内容: 老师文化改博易 M:=5;//M值需要大于等于5
G:=MA(C,5);
D:=MA(C,10);
NNH:=BARSLAST(H=HHV(H,M)),NODRAW;
NNL:=BARSLAST(L=LLV(L,M)),NODRAW;
NNY:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=M-3,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=M-3,NNL,M-2)) ,NODRAW;
NNN:=IF(ISLASTBAR AND NNY>O,NNY,M-2) ,NODRAW;
H1:=REF(H,NNN)=HHV(H,M-1);
L1:=REF(L,NNN)=LLV(L,M-1);
FG01:=BACKSET(H1,NNN+1)>BACKSET(H1,NNN),NODRAW;//只设置前面第M-1个
FD01:=BACKSET(L1,NNN+1)>BACKSET(L1,NNN) ,NODRAW;
FG02:=FG01=FD01 AND G>D,NODRAW;
FD02:=FG01=FD01 AND G<D,NODRAW;
TTTT:-BARSLAST(FD01),NODRAW;
FG0:=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,M))>=M-2,M-2,BARSLAST(FD01)))) AND FD02=0,NODRAW;
FD0:=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,M))>=M-2,M-2,BARSLAST(FG01)))) AND FG02=0,NODRAW;
//高低点间周期
GT:=BARSLAST(FG0),NODRAW;
DT:=BARSLAST(FD0),NODRAW;
//第一-次处理高低点间多余的点
LLLL:=DT=O AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW;
FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW;
FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT AND REFX(L,1)<=REF(L,DT),DT+1),NODRAW;
FG11:=IF(GT=O AND REF(GT,1)<DT AND IF(REF(G,BARSLAST(L=LLV(L,M)))>REF(D,BARSLAST(L=LLV(L,M))),BARSLAST(L=LLV(L,M))<M-2,1) AND H<REF(H,REF(GT,1)+1),1,0),NODRAW;
FD11:=IF(DT=0 AND REF(DT,1)<GT AND IF(REF(G,BARSLAST(H=HHV(H,M)))<REF(D,BARSLAST(H=HHV(H,M))),BARSLAST(H=HHV(H,M))<M-2,1) AND L>REF(L,REF(DT,1)+1),1,0),NODRAW;//再次周期
GT1:=BARSL AST(FG11<>1 AND FG1<>1 AND FG0),NODRAW;
DT1:=BARSL AST(FD11<>1 AND FD1<>1 AND FD0),NODRAW;
FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+M-2),DT1+1),NODRAW;
FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LV(L,GT1+M-2) AND REF(H,GT1)>HHV(H,GT1+M-2),GT1+1),NODRAW;
FG2B:=IF(GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+M-1) AND H>HHV(H,REF(GT1,1)+M-1),1,0),NODRAW;
FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+M-2),GT1+1),NODRAW;
FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+M-2) AND REF(L,DT1)>LLV(L,DT1+M-2),DT1+1),NODRAW;
FD2B:=IF(DT1=0 AND GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND LLV(L,REF(DT1,1)+M-1),1,0),NODRAW;
TTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;
HHHHH:=REF(LV(L,10),DT1),NODRAW;//前长后短;
FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1) ,1,0),NODRAW;
FD21:=IF(DT1=0 AND GT1<4 AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW;//前短后长,前低后高(去低) ;
FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND REF(L,DT1)>REF(LLV(L,10),DT1),DT1+1),NODRAW;
FG23:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW;
//前短后长,去2;
FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND REF(H,GT1)<REF(HHV(H, 10),GT1),GT1+1),NODRAW;
FD23:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND (REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW;//前短后长,去3;
FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=O,NODRAW;
FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)<HHV(H,GT1+3) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;
FG24:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW;//做两次高低点间多余的点
GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1 AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW;
DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1 AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW;
FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW;
FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW;
FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW;
FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW;
GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW;
DT3:=BARSL AST(DT2=0 AND FD3<>1 AND FD31<>1),NODRAW;
FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW;
FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW;
FG41:=IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW;
FD41:=IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW;
HHH:=GT3=0 AND FG31<>1 AND FG3<>1,NODRAW;
LLL:=DT3=0 AND FD31<>1 AND FD3<>1,NODRAW;//最后一段画线
N1:=BARSLAST(HHH)+1;
NY2:=BARSLAST(LLL)+1;
TJX1:=BARSLAST(HHH)+1>=5,NODRAW;
TJX2:=BARSLAST(LLL)+1>=5,NODRAW;
HAC:=VALUEWHEN(HHH,H);
LAC:=VALUEWHEN(LLL,L);
TLC:=BARSLAST(LLL);
THC:=BARSLAST(HHH);
NNNC:=COUNT(HHH||LLL, BARPOS);
AAAC:=MOD(NNNC,2);
DRAWLINE1(HHH&&TJX2,H,LLL&&TJX1||ISLASTBAR,L,0),COLORWHITE,DOT;//分型线
DRAWLINE1(LLL&&TJX1,L,HHH&&TJX2||ISLASTBAR ,H,0),COLORWHITE,DOT;//分型线
HHR:=H>HV(H,BARSLAST(LLL)),NODRAW;
//DRAWSL(BARSLAST(HHH)>=BARSLAST(LLL)||(HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)), 3)=0&&HHR,L,0,1,0,COLORYELLOW);
LLR:=L<LV(L, BARSL AST(HHH)),NODRAW;
//DRAWSL((BARSLAST(HHH)<=BARSLAST(LLL)||HHH)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=O&&LLR,H,0,1,0,COLORMAGENTA);
HHPP1:=VALUEWHEN((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR,AVPRICE),COLORRED,LINETHICK2;
HHPP2:=VALUEWHEN((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR,AVPRICE),COLORGREEN,LINETHICK2;
CROSS(BACKSET(LLL||ISLASTBAR,BARSLAST((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR)+1),0.5),ICON(1,'IC04');
CROSS(BACKSET(HHH||ISLASTBAR,BARSLAST((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR)+1),0.5),ICON(1,'ICO5');
SAR11:=SAR1(18,2,10),CIRCLEDOT;
SAR2:=SAR11;
QSA:=(MA(CLOSE,3)+MA(CLOSE, 6)+MA(CLOSE, 12)+MA(CLOSE,24))/4;
QSA1:=(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4,COLORBLUE,LINETHICK3,NOTEXT;
//DRAWICON(C<ABS(SAR2) AND C<REF(C,1)*0.9995 ,L,'IC011'),VALIGN0;
//DRAWICON(C>ABS(SAR2) AND C>REF(C,1)*1.0005 ,H,'C012');
//PARTLINE1(C>ABS(SAR2) AND SAR2>0,QSA1),COLORRED,LINETHICK3;
//PARTLINE1(C<ABS(SAR2) AND SAR2>0,QSA1),COLOFFO0OO,LINETHICK3;
QS1:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE, 12)+MA(CLOSE,24))/4;
KJC:=QS1*0.93;
DRAWTEXT(CROSS(KJC,C) AND C<KJC,L,'空单减仓'),COLORYELLOW,VALIGN0;
MI1:=C-REF(C,1);
MI:=IF(PERIOD-6>=2 AND PERIOD-6<6,MI1,0);
AMI:=SMA(MI,3,1);
F:=MA(REF(AMI,1), 10)-MA(REF(AMI,1),20);
DD:=SMA(F,10,1);
DRAWBMP(CROSS(DD,F ) AND C>SAR2 ,H*1.007,'太阳眼'),VALIGN2;
DRAWBMP(FILTER(CROSS(C,ABS(SAR2)),10),H*0.9995, 'ICON5'),VALIGN0;//B,S点//
DRAWBMP(FILTER(CROSS(ABS(SAR2),C),10),H* 1.0015, 'ICON9'),VALIGN2;//加速,点}//
压力支持位1:=MA(CLOSE,26); //{压力支撑线}/
线条:=MA(CLOSE, 28),COLORFF00FF,LINETHICK3,NOTEXT;
//PARTLINE1(C>压力支持位1 AND压力支持位1>0,线条)COLOFFOFF,LINETHICK3;
//PARTLINE1(C<压力支持位1 AND压力支持位1>0,线条)COL0OFFF,LINETHICK3;
//PARTLINE1(C=压力支持位1 AND压力支持位1>0,线条)COLOR0O00O,LINETHICK3;
A:=BARSL AST(HHH&&TJX2);
B:=BARSLAST(LLL&&TJX1);
STICKLINE1(A>B,H,MAX(O,C),0,0),COLORRED;
STICKLINE1(A>B,L,MIN(O,C),0,0),COLORRED;//{红色K}
STICKLINE1(A>B&&ISUP,C,O,3,1),COLORRED;
STICKLINE1(A>B&&ISDOWN,C,O,3,0),COLORRED;
STICKLINE1(A<B,H,MAX(O,C),0,0),COLORCYAN;
STICKLINE1(A<B,L,MIN(O,C),0,0),COLORCYAN;
//{绿色K}
STICKLINE1(A<B&&ISUP,C,O,3,1),COLORCYAN;
STICKLINE1(A<B&&ISDOWN,C,O,3,0),COLORCYAN;
第6页OCR结果为:MA3:=MA(C,170);
//DRAWGBK(MA3>C,RGB(0,0,0),RGB(9,60,1),0);
//DRAWGBK(MA3<C,RGB(0,0,0),RGB(62,1,1),0);
//DRAWGBK(MA3=0,RGB(0,0,0),RGB(0,0,0),0);
TY:=H;
TY1:=L;
A1:=REF(TY,10)=HHV(TY,2*10+1);
VB1:=FILTER(A1,10);
C11:=BACKSET(VB1, 10+1);
HD:=FILTER(C11,10);
A2:=REF(TY,10)=LV(TY1,2* 10+1);
VB2:=FILTER(A2,10);
C2:=BACKSET(VB2,10+1);
LD:=FILTER(C2,10);
AA:=REF(H,BARSLAST(HD));
BA:=REF(L,BARSLAST(LD));
T1:=BARSL AST(HD)<BARSL AST(LD) AND NOT(HD);
T2:=BARSL AST(HD)>BARSLAST(LD) AND NOT(LD);
A3:=LLV(LOW,1);
A4:=LLV(LOW,5);
A5:=LLV(LOW,8);
A6:=HHV(H,21);
A7:=LLV(LOW,21),COLORRED;
A8:=(A6+A7)/2;
上涨压力:IF(T1,AA,AA),COLORLIGHTGREEN,POINTDOT,LINETHICK2,NODRAW,PRECIS0;
下跌支撑:IF(T2,BA,BA),COLORRED,POINTDOT,LINETHICK2,NODRAW,PRECIS0;
支撑:=REF(LOW,BARSLAST(LD)),COLOR008000,POINTDOT,LINETHICK3;
压力:=REF(HIGH,BARSLAST(HD)),COLORFF0000,POINTDOT,LINETHICK3;
DRAWSL(C>0,支撑,0,1,0,COLOR008000),COLORRED,DOT;
DRAWSL(C>0,压力,0,1,0,COLORFF0000),COLORLIGHTGREEN,DOT;
DRAWNUMBER1(ISLASTBAR,上涨压力,上涨压力,0),COLOR00FF00,FONTSIZE30,ALIGN0,VALIGN1;
DRAWNUMBER1(ISLASTBAR,下跌支撑,下跌支撑,0),COLORRED,FONTSIZE30,ALIGN0,VALIGN1;

DRAWNUMBER(LLL&&TJX1,L,L,0,COLORGREEN),FONTSIZE20,VALIGN0;
DRAWNUMBER(HHH&&TJX2,H,H,0,COLORRED),FONTSIZE20;

 

 来源:程序化99网( WWW.CXH99.COM )

博易技术人员: M:=5;//M值需要大于等于5
G:=MA(C,5);
D:=MA(C,10);
NNH:=BARSLAST(H=HHV(H,M)),NODRAW;
NNL:=BARSLAST(L=LLV(L,M)),NODRAW;
NNY:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=M-3,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=M-3,NNL,M-2)) ,NODRAW;
NNN:=IF(ISLASTBAR AND NNY>O,NNY,M-2) ,NODRAW;
H1:=REF(H,NNN)=HHV(H,M-1);
L1:=REF(L,NNN)=LLV(L,M-1);
FG01:=BACKSET(H1,NNN+1)>BACKSET(H1,NNN),NODRAW;//只设置前面第M-1个
FD01:=BACKSET(L1,NNN+1)>BACKSET(L1,NNN) ,NODRAW;
FG02:=FG01=FD01 AND G>D,NODRAW;
FD02:=FG01=FD01 AND G<D,NODRAW;
TTTT:-BARSLAST(FD01),NODRAW;
FG0:=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,M))>=M-2,M-2,BARSLAST(FD01)))) AND FD02=0,NODRAW;
FD0:=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,M))>=M-2,M-2,BARSLAST(FG01)))) AND FG02=0,NODRAW;
//高低点间周期
GT:=BARSLAST(FG0),NODRAW;
DT:=BARSLAST(FD0),NODRAW;
//第一-次处理高低点间多余的点
LLLL:=DT=O AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW;
FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW;
FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT AND REFX(L,1)<=REF(L,DT),DT+1),NODRAW;
FG11:=IF(GT=O AND REF(GT,1)<DT AND IF(REF(G,BARSLAST(L=LLV(L,M)))>REF(D,BARSLAST(L=LLV(L,M))),BARSLAST(L=LLV(L,M))<M-2,1) AND H<REF(H,REF(GT,1)+1),1,0),NODRAW;
FD11:=IF(DT=0 AND REF(DT,1)<GT AND IF(REF(G,BARSLAST(H=HHV(H,M)))<REF(D,BARSLAST(H=HHV(H,M))),BARSLAST(H=HHV(H,M))<M-2,1) AND L>REF(L,REF(DT,1)+1),1,0),NODRAW;//再次周期
GT1:=BARSLAST(FG11<>1 AND FG1<>1 AND FG0),NODRAW;
DT1:=BARSLAST(FD11<>1 AND FD1<>1 AND FD0),NODRAW;
FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+M-2),DT1+1),NODRAW; 
FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+M-2) AND REF(H,GT1)>HHV(H,GT1+M-2),GT1+1),NODRAW;
FG2B:=IF(GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+M-1) AND H>HHV(H,REF(GT1,1)+M-1),1,0),NODRAW;
FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+M-2),GT1+1),NODRAW;
FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+M-2) AND REF(L,DT1)>LLV(L,DT1+M-2),DT1+1),NODRAW;
FD2B:=IF(DT1=0 AND GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND LLV(L,REF(DT1,1)+M-1),1,0),NODRAW;
TTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;
HHHHH:=REF(LLV(L,10),DT1),NODRAW;//前长后短;
FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1) ,1,0),NODRAW;
FD21:=IF(DT1=0 AND GT1<4 AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW;//前短后长,前低后高(去低) ;
FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND REF(L,DT1)>REF(LLV(L,10),DT1),DT1+1),NODRAW;
FG23:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW;
//前短后长,去2;
FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND REF(H,GT1)<REF(HHV(H, 10),GT1),GT1+1),NODRAW;
FD23:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND (REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW;//前短后长,去3;
FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=O,NODRAW;
FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)<HHV(H,GT1+3) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;
FG24:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW;//做两次高低点间多余的点
GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1 AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW;
DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1 AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW;
FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW; 
FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW;
FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW;
FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW;
GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW;
DT3:=BARSLAST(DT2=0 AND FD3<>1 AND FD31<>1),NODRAW;
FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW;
FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW;
FG41:=IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW;
FD41:=IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW;
HHH:=GT3=0 AND FG31<>1 AND FG3<>1,NODRAW;
LLL:=DT3=0 AND FD31<>1 AND FD3<>1,NODRAW;//最后一段画线
N1:=BARSLAST(HHH)+1;
NY2:=BARSLAST(LLL)+1;
TJX1:=BARSLAST(HHH)+1>=5,NODRAW;
TJX2:=BARSLAST(LLL)+1>=5,NODRAW;
HAC:=VALUEWHEN(HHH,H);
LAC:=VALUEWHEN(LLL,L);
TLC:=BARSLAST(LLL);
THC:=BARSLAST(HHH);
NNNC:=COUNT(HHH||LLL, BARPOS);
AAAC:=MOD(NNNC,2);
DRAWLINE(HHH&&TJX2,H,LLL&&TJX1||ISLASTBAR,L,0),COLORWHITE;//分型线
DRAWLINE(LLL&&TJX1,L,HHH&&TJX2||ISLASTBAR ,H,0),COLORWHITE;//分型线
HHR:=H>=HHV(H,BARSLAST(LLL)),NODRAW;
//DRAWSL(BARSLAST(HHH)>=BARSLAST(LLL)||(HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)), 3)=0&&HHR,L,0,1,0,COLORYELLOW);
LLR:=L<=LLV(L, BARSLAST(HHH)),NODRAW;
//DRAWSL((BARSLAST(HHH)<=BARSLAST(LLL)||HHH)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=O&&LLR,H,0,1,0,COLORMAGENTA);
HHPP1:=VALUEWHEN((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR,SETTLEPRICE),COLORRED,LINETHICK2;
HHPP2:=VALUEWHEN((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR,SETTLEPRICE),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(BACKSET(LLL||ISLASTBAR,BARSLAST((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR)+1),0.5),L,4);
DRAWICON(CROSS(BACKSET(HHH||ISLASTBAR,BARSLAST((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR)+1),0.5),L,5);
SAR11:=SAR(18,2,10),CIRCLEDOT;
SAR2:=SAR11;
QSA:=(MA(CLOSE,3)+MA(CLOSE, 6)+MA(CLOSE, 12)+MA(CLOSE,24))/4;
QSA1:=(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4,COLORBLUE,LINETHICK3;
//DRAWICON(C<ABS(SAR2) AND C<REF(C,1)*0.9995 ,L,'IC011'),VALIGN0;
//DRAWICON(C>ABS(SAR2) AND C>REF(C,1)*1.0005 ,H,'C012');
//PARTLINE1(C>ABS(SAR2) AND SAR2>0,QSA1),COLORRED,LINETHICK3;
//PARTLINE1(C<ABS(SAR2) AND SAR2>0,QSA1),COLOFFO0OO,LINETHICK3;
QS1:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE, 12)+MA(CLOSE,24))/4;
KJC:=QS1*0.93;
DRAWTEXT(CROSS(KJC,C) AND C<KJC,L,'空单减仓'),COLORYELLOW,VALIGN0;
MI1:=C-REF(C,1);
MI:=IF(DATAPERIOD-6>=2 AND DATAPERIOD-6<6,MI1,0);
AMI:=SMA(MI,3,1);
F:=MA(REF(AMI,1), 10)-MA(REF(AMI,1),20);
DD:=SMA(F,10,1);
DRAWBMP(CROSS(DD,F ) AND C>SAR2 ,H*1.007,'太阳眼'),VALIGN2;
DRAWBMP(FILTER(CROSS(C,ABS(SAR2)),10),H*0.9995, 'ICON5'),VALIGN0;//B,S点//
DRAWBMP(FILTER(CROSS(ABS(SAR2),C),10),H* 1.0015, 'ICON9'),VALIGN2;//加速,点}//
压力支持位1:=MA(CLOSE,26); //{压力支撑线}/
线条:=MA(CLOSE, 28),COLORFF00FF,LINETHICK3;
//PARTLINE1(C>压力支持位1 AND压力支持位1>0,线条)COLOFFOFF,LINETHICK3;
//PARTLINE1(C<压力支持位1 AND压力支持位1>0,线条)COL0OFFF,LINETHICK3;
//PARTLINE1(C=压力支持位1 AND压力支持位1>0,线条)COLOR0O00O,LINETHICK3;
A:=BARSLAST(HHH&&TJX2);
B:=BARSLAST(LLL&&TJX1);
STICKLINE(A>B,H,MAX(O,C),1,0),COLORRED;
STICKLINE(A>B,L,MIN(O,C),1,0),COLORRED;//{红色K}
STICKLINE(A>B&&ISUP,C,O,5,1),COLORRED;
STICKLINE(A>B&&ISDOWN,C,O,5,0),COLORRED;
STICKLINE(A<B,H,MAX(O,C),1,0),COLORCYAN;
STICKLINE(A<B,L,MIN(O,C),1,0),COLORCYAN;
//{绿色K}
STICKLINE(A<B&&ISUP,C,O,5,1),COLORCYAN;
STICKLINE(A<B&&ISDOWN,C,O,5,0),COLORCYAN;
第6页OCR结果为:MA(C,170);
//DRAWGBK(MA3>C,RGB(0,0,0),RGB(9,60,1),0);
//DRAWGBK(MA3<C,RGB(0,0,0),RGB(62,1,1),0);
//DRAWGBK(MA3=0,RGB(0,0,0),RGB(0,0,0),0);
TY:=H;
TY1:=L;
A1:=REF(TY,10)=HHV(TY,2*10+1);
VB1:=FILTER(A1,10);
C11:=BACKSET(VB1, 10+1);
HD:=FILTER(C11,10);
A2:=REF(TY,10)=LLV(TY1,2* 10+1);
VB2:=FILTER(A2,10);
C2:=BACKSET(VB2,10+1);
LD:=FILTER(C2,10);
AA:=REF(H,BARSLAST(HD));
BA:=REF(L,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD);
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
A3:=LLV(LOW,1);
A4:=LLV(LOW,5);
A5:=LLV(LOW,8);
A6:=HHV(H,21);
A7:=LLV(LOW,21),COLORRED;
A8:=(A6+A7)/2;
上涨压力:IF(T1,AA,AA),COLORGREEN,POINTDOT,LINETHICK2,NODRAW,PRECIS0;
下跌支撑:IF(T2,BA,BA),COLORRED,POINTDOT,LINETHICK2,NODRAW,PRECIS0;
支撑:=REF(LOW,BARSLAST(LD)),COLOR008000,POINTDOT,LINETHICK3;
压力:=REF(HIGH,BARSLAST(HD)),COLORFF0000,POINTDOT,LINETHICK3;
DRAWSL(C>0,支撑,0,1,0),COLOR008000,COLORRED;
DRAWSL(C>0,压力,0,1,0),COLORFF0000,COLORGREEN;
DRAWNUMBER(ISLASTBAR,上涨压力,上涨压力,0),COLOR00FF00,FONTSIZE30,ALIGN0,VALIGN1;
DRAWNUMBER(ISLASTBAR,下跌支撑,下跌支撑,0),COLORRED,FONTSIZE30,ALIGN0,VALIGN1;

DRAWNUMBER(LLL&&TJX1,L,L,0),COLORGREEN,FONTSIZE20,VALIGN0;
DRAWNUMBER(HHH&&TJX2,H,H,0),COLORRED,FONTSIZE20; 不显示指标 来源 程序化久久网

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容