欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 文华代码转金字塔求助

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有3169人关注过本帖树形打印复制链接

主题:文华代码转金字塔求助

帅哥哟,离线,有人找我吗?
yinghe1213
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:3 积分:0 威望:0 精华:0 注册:2018/8/7 17:32:27
文华代码转金字塔求助  发帖心情 Post By:2020/1/14 13:04:03    Post IP:180.169.30.6[只看该作者]

文华财经的指标帮我转换一下 谢谢
 
1.
AA:=EMA(C,5) > EMA(C,19);
BB:=EMA(C,5) < EMA(C,19);
CC:= EMA(C,5) > EMA(C,10);
CC1:=EMA(C,5) < EMA(C,10);
//本为阴线,变阳线,红色,实心
STICKLINE(AA AND C<=O,C,O,COLORRED,0); //画K线为阳线(柱体部分)
DRAWLINE(AA AND C<=O,L,AA AND C<=O,H,COLORRED); //画K线为阳线(上下影线部分)
//本为阳线,变阴线,青色,空心
STICKLINE(BB AND C>=O,C,O,COLORCYAN,1); //画K线为阴线(柱体部分)
DRAWLINE(BB AND C>=O,H,BB AND C>=O,C,COLORCYAN);//画K线为阴线(上影线部分)
DRAWLINE(BB AND C>=O,O,BB AND C>=O,L,COLORCYAN);//画K线为阴线(下影线部分)
//矛盾处画白色实体K线,阳线空心,阴线实心
STICKLINE(BB AND CC AND C>=O,C,O,COLORWHITE,1); //画K线为阳线(柱体部分)
DRAWLINE(BB AND CC AND C>=O,H,BB AND CC AND C>=O,C,COLORWHITE);//画K线为阳线(上影线部分)
DRAWLINE(BB AND CC AND C>=O,O,BB AND CC AND C>=O,L,COLORWHITE);//画K线为阳线(下影线部分)
STICKLINE(BB AND CC AND C<O,C,O,COLORWHITE,0); //画K线为阴线(柱体部分)
DRAWLINE(BB AND CC AND C<O,L,BB AND CC AND C<O,H,COLORWHITE); //画K线为阴线(上下影线部分)
//矛盾处画白色实体K线
STICKLINE(AA AND CC1 AND C>=O,C,O,COLORWHITE,1); //画K线为阳线(柱体部分)
DRAWLINE(AA AND CC1 AND C>=O,H,AA AND CC1 AND C>=O,C,COLORWHITE);//画K线为阳线(上影线部分)
DRAWLINE(AA AND CC1 AND C>=O,O,AA AND CC1 AND C>=O,L,COLORWHITE);//画K线为阳线(下影线部分)
STICKLINE(AA AND CC1 AND C<O,C,O,COLORWHITE,0); //画K线为阴线(柱体部分)
DRAWLINE(AA AND CC1 AND C<O,L,AA AND CC1 AND C<O,H,COLORWHITE); //画K线为阴线(上下影线部分)
//操盘线
趋势线:EMA(EMA(C,10),10),NODRAW;
DRAWCOLORLINE(趋势线>=REF(趋势线,1),趋势线,COLORRED,COLORBLUE),LINETHICK2; //均线上升时为红色,否则为蓝色
//==布林线
//中轨:MA(C,26),COLORCYAN;
//上轨:中轨+2*STD(C,26),COLORYELLOW;
//下轨:中轨-2*STD(C,26),COLORFF00FF;
//背景
DRAWGBK((AA>BB),RGB(64,0,0),RGB(128,0,0),0);//上涨
DRAWGBK((AA<BB),RGB(0,128,0),RGB(0,64,0),0);//下跌


2.
MID:MA(CLOSE,26);
TMP2:=STD(CLOSE,26);
TOP:MID+2*TMP2;
BOTTOM:MID-2*TMP2;
N:=BARSLAST(CROSSDOWN(L,BOTTOM))+1;
M:=BARSLAST(CROSS(H,TOP))+1;
LL:=IF(L<BOTTOM,L,100000);
HH:=IF(H>TOP,H,0);
LX:=BACKSET(M=1&&REF(EXIST(N=1,M),1),REF(LLVBARS(LL,M),1)+2);
HX:=BACKSET(N=1&&REF(EXIST(M=1,N),1),REF(HHVBARS(HH,N),1)+2);
DRAWLINE1(CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),LINETHICK3,COLORRED;
DRAWLINE1(CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),LINETHICK3,COLORGREEN;
//DRAWKLINE(9/10,COLORRED,1,COLORCYAN,1);

M1:=5;//M值需要大于等于5 
G:=MA(C,5);
D:=MA(C,10);
NNH:=BARSLAST(H=HHV(H,M1)) ,NODRAW;
NNL:=BARSLAST(L=LLV(L,M1)) ,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>0,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=0 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=0 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 L>LLV(L,REF(DT1,1)+M-1),1,0),NODRAW;
TTTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;
HHHHHH:=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)=0,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);
 


DRAWLINE1(HHH&&TJX2 ,H,LLL&&TJX1,L,0),COLORWHITE,DOT;//分型线
DRAWLINE1(LLL&&TJX1,L,HHH&&TJX2 ,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,BARSLAST(HHH)),NODRAW;
DRAWSL((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&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,'ICO4');
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 ,QSA1,'ICO11');
DRAWICON(C>ABS(SAR2) AND C>REF(C,1)*1.0005 ,QSA1,'ICO12');


PARTLINE1(C>ABS(SAR2) AND SAR2>0,QSA1),COLORRED,LINETHICK3; 
PARTLINE1(C<ABS(SAR2) AND SAR2>0,QSA1),COLORFF0000,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*0.99,'空单减仓'),COLORYELLOW;
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),L*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,线条),COLORFF00FF,LINETHICK3; 
PARTLINE1(C<压力支持位1 AND 压力支持位1>0,线条),COLOR00FFFF,LINETHICK3; 
PARTLINE1(C=压力支持位1 AND 压力支持位1>0,线条),COLOR000000,LINETHICK3; 






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(TY1,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),COLORRED,POINTDOT,LINETHICK2,NODRAW;
下跌支撑:IF(T2,BA,BA),COLORGREEN,POINTDOT,LINETHICK2,NODRAW;




支撑:=REF(LOW,BARSLAST(LD)),COLOR008000,POINTDOT,LINETHICK3;
压力:=REF(HIGH,BARSLAST(HD)),COLORFF0000,POINTDOT,LINETHICK3;


DRAWSL(C>0,支撑,0,1,0,COLOR008000),RGB(0,255,64),DOT;
DRAWSL(C>0,压力,0,1,0,COLORFF0000),COLORRED,DOT;


DRAWNUMBER1(ISLASTBAR,上涨压力,上涨压力,2),COLOR00FF00,FONTSIZE20,ALIGN0;
DRAWNUMBER1(ISLASTBAR,下跌支撑,下跌支撑,2),COLORRED,FONTSIZE20,ALIGN0;
LC:= REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC, 0), 6, 1)/SMA(ABS(CLOSE-LC), 6, 1)*100;
DRAWTEXT(FILTER(CROSS(RSI,30) AND (CLOSE>REF(HIGH,1.5)),5),LOW-LOW*0.001,'空止赢'),COLORGREEN,FONTSIZE20;
DRAWTEXT(FILTER(CROSS(70,RSI) AND (CLOSE<REF(LOW,1.5)),5),HIGH+HIGH*0.001,'多止赢'),COLORRED,FONTSIZE20;


HZDWR:=MA((CLOSE-LLV(LOW,98))/(HHV(HIGH,98)-LLV(LOW,98))*120,8),COLORWHITE; 
HZZWR:=MA((CLOSE-LLV(LOW,88))/(HHV(HIGH,88)-LLV(LOW,88))*120,8),COLORYELLOW; 
RSV:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26)); 
DY1:=(OPEN+CLOSE+HIGH+LOW)/4; 
DY2:=LLV(LOW,13); 
DY3:=HHV(HIGH,13); 
DYA:=MA((DY1-DY2)/(DY3-DY2)*100,1); 
DYB:=MA(DYA,5); 
A11:=EMA((DY1-DY2)/(DY3-DY2)*180,20); 
B1:=EMA(REF(A1,1),1); 
B2:=MA((0.667*REF(RSV,1)+0.333*RSV),1); 
RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
RSV2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;
J1:=SMA(RSV1,3,1);
J2:=SMA(J1,3,1);
MA1:=MA(CLOSE,92);
资金线1:=3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),NODRAW,COLOR00FFFF;
资金线:3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),NODRAW,COLOR00FFFF,NOTEXT;


DRAWBKBMP( 资金线>=70.0000 AND 资金线<101.0000,  'DFKP'),ALIGN2;
DRAWBKBMP(资金线>=36.0000 AND 资金线<69.0000,     'DKZD'),ALIGN2;
DRAWBKBMP( 资金线>=1.0000 AND 资金线<36.0000,      'KFKP'),ALIGN2;


3.
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
操盘线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,NODRAW;
安全线:MA(操盘线,11),COLORGRAY,LINETHICK1;
MA20:MA(C,20),NODRAW;
EMA6:MA(C,6),COLORGREEN, LINETHICK2;
大牛:=CROSS(EMA6,MA20);
死牛:=CROSS(MA20,EMA6);
DRAWTEXT(大牛,L,'↖鱼身行情'),COLORFF00FF,LINETHICK4;
DRAWTEXT(死牛,H,'↖行情结束'),COLORWHITE ,LINETHICK4;
STICKLINE1(CROSS(EMA6,MA20),OPEN,CLOSE,2,0),COLOR00FFFF ;
STICKLINE1(CROSS(MA20,EMA6),OPEN,CLOSE,2,0),COLOR00DD00;
VAR2:=O>MA(C,安全线) AND C<MA(C,安全线);
STICKLINE(CROSS(安全线,C),OPEN,CLOSE,2,0),COLORFF0000;
AMA3:IF(EMA6/REF(EMA6,安全线)>0.997,EMA6,NULL),COLORBLUE,LINETHICK3;
AMA4:IF(EMA6/REF(EMA6,安全线)>1.001,EMA6,NULL),COLORRED,LINETHICK3; 
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
WH1: =IF(L=LLV(L, 9), L, 0);
WH2: =REFX1(BARSLAST(WH1<>0), 10000);
WH3: =REFX1(IF(WH2=0, H, REF(H, WH2)), 10000);
WH4: =REFX1(REF(BARSLAST(H>WH3), WH2+1)+WH2+1, 10000);
WH5: =REFX1(IF(WH4=0, H, REF(H, WH4)), 10000);
WH6: =REFX1(REF(BARSLAST( H>WH5),WH4+1)+ WH4+1, 10000);
WH7:=IF(CURRBARSCOUNT<=WH2+10, REFX1(IF(WH6=0, H, REF(H, WH6)),10000),NULL),COLORYELLOW,DOT;
DRAWTEXT(ISLASTBAR,WH7,'进场线'),COLORYELLOW;
GJ: =AvPRICE*V;//100;

明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
今日阻力:REF(明日阻力 , 1),NODRAW;
今日支撑:REF(明日支撑 , 1),NODRAW;
止盈价:H*0.95,LINETHICK1,COLORRED;



 回到顶部
帅哥哟,离线,有人找我吗?
FireScript
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:14496 积分:0 威望:0 精华:0 注册:2017/7/4 13:40:18
  发帖心情 Post By:2020/1/14 14:07:09    Post IP:180.169.30.6[只看该作者]

 代码比较多。工作人员需要时间慢慢处理。
先给第一个段的:
1.
AA:=EMA(C,5) > EMA(C,19);
BB:=EMA(C,5) < EMA(C,19);
CC:= EMA(C,5) > EMA(C,10);
CC1:=EMA(C,5) < EMA(C,10);
//本为阴线,变阳线,红色,实心
STICKLINE(AA AND C<=O,C,O,10,0,COLORRED); //画K线为阳线(柱体部分)
DRAWLINE(AA AND C<=O,L,AA AND C<=O,H,COLORRED); //画K线为阳线(上下影线部分)
//本为阳线,变阴线,青色,空心
STICKLINE(BB AND C>=O,C,O,10,1,COLORCYAN); //画K线为阴线(柱体部分)
DRAWLINE(BB AND C>=O,H,BB AND C>=O,C,COLORCYAN);//画K线为阴线(上影线部分)
DRAWLINE(BB AND C>=O,O,BB AND C>=O,L,COLORCYAN);//画K线为阴线(下影线部分)
//矛盾处画白色实体K线,阳线空心,阴线实心
STICKLINE(BB AND CC AND C>=O,C,O,10,1,COLORWHITE); //画K线为阳线(柱体部分)
DRAWLINE(BB AND CC AND C>=O,H,BB AND CC AND C>=O,C,COLORWHITE);//画K线为阳线(上影线部分)
DRAWLINE(BB AND CC AND C>=O,O,BB AND CC AND C>=O,L,COLORWHITE);//画K线为阳线(下影线部分)
STICKLINE(BB AND CC AND C<O,C,O,10,0,COLORWHITE); //画K线为阴线(柱体部分)
DRAWLINE(BB AND CC AND C<O,L,BB AND CC AND C<O,H,COLORWHITE); //画K线为阴线(上下影线部分)
//矛盾处画白色实体K线
STICKLINE(AA AND CC1 AND C>=O,C,O,10,1,COLORWHITE); //画K线为阳线(柱体部分)
DRAWLINE(AA AND CC1 AND C>=O,H,AA AND CC1 AND C>=O,C,COLORWHITE);//画K线为阳线(上影线部分)
DRAWLINE(AA AND CC1 AND C>=O,O,AA AND CC1 AND C>=O,L,COLORWHITE);//画K线为阳线(下影线部分)
STICKLINE(AA AND CC1 AND C<O,C,O,10,0,COLORWHITE); //画K线为阴线(柱体部分)
DRAWLINE(AA AND CC1 AND C<O,L,AA AND CC1 AND C<O,H,COLORWHITE); //画K线为阴线(上下影线部分)
//操盘线
趋势线:EMA(EMA(C,10),10),NODRAW;
red:if(趋势线>=REF(趋势线,1),趋势线,drawnull),colorred,LINETHICK2;//均线上升时为红色,否则为蓝色
blue:if(趋势线<REF(趋势线,1),趋势线,drawnull),COLORBLUE,LINETHICK2;//均线上升时为红色,否则为蓝色
DRAWGBK((AA>BB),RGB(64,0,0),RGB(128,0,0),0);//上涨
DRAWGBK((AA<BB),RGB(0,128,0),RGB(0,64,0),0);//下跌


命数如织,当如磐石。
 回到顶部
帅哥哟,离线,有人找我吗?
yinghe1213
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:3 积分:0 威望:0 精华:0 注册:2018/8/7 17:32:27
  发帖心情 Post By:2020/1/16 10:04:34    Post IP:122.242.207.133[只看该作者]

老师还没有好吗

 回到顶部
帅哥哟,离线,有人找我吗?
wenarm
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:26632 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2020/1/16 11:32:35    Post IP:180.169.30.6[只看该作者]

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
操盘线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,NODRAW;
安全线:MA(操盘线,11),COLORGRAY,LINETHICK1;
MA20:MA(C,20),NODRAW;
EMA6:MA(C,6),COLORGREEN, LINETHICK2;
大牛:=CROSS(EMA6,MA20);
死牛:=CROSS(MA20,EMA6);
DRAWTEXT(大牛,L,'↖鱼身行情'),COLORFF00FF,LINETHICK4;
DRAWTEXT(死牛,H,'↖行情结束'),COLORWHITE ,LINETHICK4;
STICKLINE(CROSS(EMA6,MA20),OPEN,CLOSE,2,0),COLOR00FFFF ;
STICKLINE(CROSS(MA20,EMA6),OPEN,CLOSE,2,0),COLOR00DD00;
VAR2:=O>MA(C,安全线) AND C<MA(C,安全线);
STICKLINE(CROSS(安全线,C),OPEN,CLOSE,2,0),COLORFF0000;
AMA3:IF(EMA6/REF(EMA6,安全线)>0.997,EMA6,NULL),COLORBLUE,LINETHICK3;
AMA4:IF(EMA6/REF(EMA6,安全线)>1.001,EMA6,NULL),COLORRED,LINETHICK3;
MY_CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
WH1: =IF(L=LLV(L, 9), L, 0);
WH2: =REFX(BARSLAST(WH1<>0), 10000);
WH3: =REFX(IF(WH2=0, H, REF(H, WH2)), 10000);
WH4: =REFX(REF(BARSLAST(H>WH3), WH2+1)+WH2+1, 10000);
WH5: =REFX(IF(WH4=0, H, REF(H, WH4)), 10000);
WH6: =REFX(REF(BARSLAST( H>WH5),WH4+1)+ WH4+1, 10000);
WH7:=IF(MY_CURRBARSCOUNT<=WH2+10, REFX(IF(WH6=0, H, REF(H, WH6)),10000),NULL),COLORYELLOW,CIRCLEDOT;
DRAWTEXT(ISLASTBAR,WH7,'进场线'),COLORYELLOW;
GJ: =((O+H+L+C)/4)*V;//100;


明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
今日阻力:REF(明日阻力 , 1),NODRAW;
今日支撑:REF(明日支撑 , 1),NODRAW;
止盈价:H*0.95,LINETHICK1,COLORRED;



编程无捷径,技巧靠积累。
 回到顶部