您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经知识>>正文内容

求老师转换一下,谢谢 [文华财经]

  • 咨询内容: 第一个  LC:=(C+0.618*REF(C,1)+0.382*REF(C,2)+0.236*REF(C,3)+0.146*REF(C,4))/2.382,COLORWHITE,LINETHICK1;<BR>GAO:=HHV(C,60)-LLV(C,60);<BR>RSI:=SMA(MAX(LC-REF(LC,1),0),5,1)/SMA(ABS(LC-REF(LC,1)),5,1);<BR>仙人:LC+GAO*(RSI-0.5),COLORFF3399,LINETHICK1;<BR>{STICKLINE(CROSS(RSI,0.1),仙人,REF(仙人,1),1,0),COLORYELLOW;<BR>STICKLINE(CROSS(0.9,RSI),仙人,REF(仙人,1),1,0),COLORCYAN;}<BR>攻防价位:(REF((H-L)*0.618+L,1)),NODRAW,COLORYELLOW;<BR>STICKLINE(ISLASTBAR,攻防价位-0.01,攻防价位,6,0),COLORYELLOW;<BR>MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;<BR>多:(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,COLORRED;<BR>空:MA(多,6),COLORGREEN;<BR>水平面:MA(CLOSE,60),COLORYELLOW,POINTDOT;<BR>MS:IF(多&GT;=REF(多,1),多,DRAWNULL),COLORRED,LINETHICK2;<BR>MM:IF(空&GT;=REF(空,1),空,DRAWNULL),COLORYELLOW,LINETHICK2; <BR>买:=CROSS(多,空); <BR>卖:=CROSS(空,多); <BR>DRAWICON(买,L*0.97,1); <BR>DRAWICON(卖,H*1.03,2); 

    第二个
    			VAR55:=LLV(LOW,6);<br>
    VAR66:=HHV(HIGH,6);<br>
    VAR77:=(VAR66-VAR55)/10;<br>
    VAR88:=SMA((CLOSE-VAR55)/VAR77,20,1);<br>
    VARA:=3*VAR88-2*SMA(VAR88,3,1);<br>
    AA:=MA(EMA(WINNER(C),3),3);<br>
    <br>
    筹码集中度:AA-0.5,COLORYELLOW;<br>
    DRAWBAND(筹码集中度,RGB(155,50,50),0,RGB(83,135,68));<br>
    STICKLINE(筹码集中度&gt;=0.4,0.4,筹码集中度,4,1),COLORCYAN; <br>
    STICKLINE(筹码集中度&lt;=-0.4,-0.4,筹码集中度,4,1),COLORLIGRAY; <br>
    中线:EMA(AA-0.5,55),LINETHICK2,COLORLIGRAY;<br>
    IF(中线&gt;REF(中线,1),中线,DRAWNULL),LINETHICK2,COLORMAGENTA;<br>
    IF(筹码集中度&gt;=REF(筹码集中度,1),筹码集中度,DRAWNULL),COLORRED;<br>
    IF(筹码集中度&lt;REF(筹码集中度,1),筹码集中度,DRAWNULL),COLORCYAN;<br>
    AB:=EMA(AA-0.5,6);<br>
    AC:=CROSS(AA-0.5,AB) AND AB&lt;=-0.3;<br>
    AD:=CROSS(AB,AA-0.5) AND AB&gt;=0.35;<br>
    DRAWICON(AC,AB,7);<br>
    DRAWICON(AD,AB,8);<br>
    VAR6:=(2*CLOSE+HIGH+LOW)/4;<br>
    VAR7:=LLV(LOW,13);<br>
    VAR8:=HHV(HIGH,13);<br>
    VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13);<br>
    仙人: (EMA(0.382*REF(VAR9,2)+0.618*VAR9,6)-50)/100,COLORYELLOW,LINETHICK2;<br>
    AAA:=EMA(仙人,3);<br>
    DRAWICON(仙人&gt;=REF(仙人,1) AND REF(仙人,1)&lt;=REF(仙人,2),仙人*0.95,1);<br>
    DRAWICON(仙人&lt;=REF(仙人,1) AND REF(仙人,1)&gt;=REF(仙人,2),仙人*1.05,2);<br>
    IF(仙人&gt;REF(仙人,1),仙人,DRAWNULL),COLORRED,LINETHICK2;<br>
    IF(仙人&lt;REF(仙人,1),仙人,DRAWNULL),COLORCYAN,LINETHICK2;<br>
    DRAWICON(CROSS(AA-0.5,中线) AND AA-0.5&lt;0,AB,23);<br>
    A1:=BARSLAST(REF(CROSS(仙人,AAA),1));<br>
    底背离:=REF(CLOSE,A1+1)&gt;CLOSE AND 仙人&gt;REF(仙人,A1+1) AND CROSS(仙人,AAA);<br>
    STICKLINE(底背离,0,0.1,3,0),COLORMAGENTA;<br>
    DRAWLINE(A1=0,AAA,底背离,AAA,0),COLORRED,LINETHICK4;<br>
    A2:=BARSLAST(REF(CROSS(AAA,仙人),1));<br>
    顶背离:=REF(CLOSE,A2+1)&lt;CLOSE AND REF(仙人,A2+1)&gt;仙人 AND CROSS(AAA,仙人);<br>
    DRAWLINE(A2=0,AAA,顶背离,AAA,0),COLORGREEN,LINETHICK4;<br>

    第三个
    DIFF:EMA(CLOSE,6)-EMA(CLOSE,13),COLORWHITE,LINETHICK2;<br>
    DEA:EMA(DIFF,3),COLORYELLOW, LINETHICK2;<br>
    MACD:2*(DIFF-DEA),COLORRED;</p><p
    			align="left">STICKLINE(MACD&gt;=0,MACD,0,4,1),COLORF00FF0;<br>
    STICKLINE(MACD&lt;0,MACD,0,4,1),COLORWHITE;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,4,0 ),COLOR00AAFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,3.3,0 ),COLOR00BBFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,2.2,0 ),COLOR00CCFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,1.65,0 ),COLOR00DDFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,1.1,0 ),COLOR00EEFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,0.55,0 ),COLOR00FFFF;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,4 ,0 ),COLOR0000AA;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,3.3 ,0 ),COLOR0011BB;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,2.2,0 ),COLOR0022CC;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,1.65 ,0 ),COLOR0033DD;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,1.1 ,0 ),COLOR0044EE;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,0.55 ,0 ),COLOR0055FF;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,4,0 ),COLORAA00BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,3.3 ,0 ),COLORBB11BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,2.2,0 ),COLORCC22BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,1.65,0 ),COLORDD33BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,1.1,0 ),COLOREE44BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,0.55 ,0 ),COLORFF55BB;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,4,0 ),COLORFFAA00;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,3.3 ,0 ),COLORFFBB11;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,2.2,0 ),COLORFFCC22;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,1.65 ,0 ),COLORFFDD33;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,1.1 ,0 ),COLORFFEE44;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,0.55 ,0 ),COLORFFFF55;</p><p
    			align="left"><br>
    金叉:=CROSS(DIFF,DEA) AND DIFF&lt;-0.1;<br>
    STICKLINE(金叉,0,-0.18,6,0),COLORRED;<br>
    DRAWTEXT(金叉,-0.1,'金叉',COLORRED;<br>
    JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA&gt;=0));<br>
    二次金叉:=CROSS(DIFF,DEA) AND DEA&lt;0 ANDCOUNT(JCCOUNT=2,21)=1;<br>
    STICKLINE(二次金叉,0,-0.18,6,0),COLORFF00FF;<br>
    DRAWICON(二次金叉,DEA*1.04,13) ;<br>
    DRAWTEXT(二次金叉,-0.1,'二次金叉',COLORFF00FF;<br>
    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));<br>
    底背离:=REF(CLOSE,A1+1)&gt;CLOSE ANDDIFF&gt;REF(DIFF,A1+1) AND CROSS(DIFF,DEA);<br>
    STICKLINE(底背离,0,0.13,6,0),COLOR00FF00;<br>
    DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;<br>
    DRAWTEXT(底背离,0.1,'底背离',COLOR00FF00;<br>
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));<br>
    顶背离:=REF(CLOSE,A2+1)&lt;CLOSE ANDREF(DIFF,A2+1)&gt;DIFF AND CROSS(DEA,DIFF);<br>
    
    DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK2;</p><p
    			align="left">DRAWTEXT(CROSS(DEA,DIFF ),0,'叉',COLORYELLOW;</p>DIFF:EMA(CLOSE,6)-EMA(CLOSE,13),COLORWHITE,LINETHICK2;<br>
    DEA:EMA(DIFF,3),COLORYELLOW, LINETHICK2;<br>
    MACD:2*(DIFF-DEA),COLORRED;</p><p
    			align="left">STICKLINE(MACD&gt;=0,MACD,0,4,1),COLORF00FF0;<br>
    STICKLINE(MACD&lt;0,MACD,0,4,1),COLORWHITE;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,4,0 ),COLOR00AAFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,3.3,0 ),COLOR00BBFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,2.2,0 ),COLOR00CCFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,1.65,0 ),COLOR00DDFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,1.1,0 ),COLOR00EEFF;<br>
    STICKLINE(MACD&lt;REF(MACD,1)ANDMACD&gt;0,0,MACD,0.55,0 ),COLOR00FFFF;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,4 ,0 ),COLOR0000AA;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,3.3 ,0 ),COLOR0011BB;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,2.2,0 ),COLOR0022CC;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,1.65 ,0 ),COLOR0033DD;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,1.1 ,0 ),COLOR0044EE;<br>
    STICKLINE(MACD&gt;=REF(MACD,1)ANDMACD&gt;0,0,MACD,0.55 ,0 ),COLOR0055FF;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,4,0 ),COLORAA00BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,3.3 ,0 ),COLORBB11BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,2.2,0 ),COLORCC22BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,1.65,0 ),COLORDD33BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,1.1,0 ),COLOREE44BB;<br>
    STICKLINE(MACD&gt;REF(MACD,1)ANDMACD&lt;0,0,MACD,0.55 ,0 ),COLORFF55BB;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,4,0 ),COLORFFAA00;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,3.3 ,0 ),COLORFFBB11;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,2.2,0 ),COLORFFCC22;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,1.65 ,0 ),COLORFFDD33;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,1.1 ,0 ),COLORFFEE44;<br>
    STICKLINE(MACD&lt;=REF(MACD,1)ANDMACD&lt;0,0,MACD,0.55 ,0 ),COLORFFFF55;</p><p
    			align="left"><br>
    金叉:=CROSS(DIFF,DEA) AND DIFF&lt;-0.1;<br>
    STICKLINE(金叉,0,-0.18,6,0),COLORRED;<br>
    DRAWTEXT(金叉,-0.1,'金叉',COLORRED;<br>
    JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA&gt;=0));<br>
    二次金叉:=CROSS(DIFF,DEA) AND DEA&lt;0 ANDCOUNT(JCCOUNT=2,21)=1;<br>
    STICKLINE(二次金叉,0,-0.18,6,0),COLORFF00FF;<br>
    DRAWICON(二次金叉,DEA*1.04,13) ;<br>
    DRAWTEXT(二次金叉,-0.1,'二次金叉',COLORFF00FF;<br>
    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));<br>
    底背离:=REF(CLOSE,A1+1)&gt;CLOSE ANDDIFF&gt;REF(DIFF,A1+1) AND CROSS(DIFF,DEA);<br>
    STICKLINE(底背离,0,0.13,6,0),COLOR00FF00;<br>
    DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;<br>
    DRAWTEXT(底背离,0.1,'底背离',COLOR00FF00;<br>
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));<br>
    顶背离:=REF(CLOSE,A2+1)&lt;CLOSE ANDREF(DIFF,A2+1)&gt;DIFF AND CROSS(DEA,DIFF);<br>
    
    DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK2;</p><p
    			align="left">DRAWTEXT(CROSS(DEA,DIFF ),0,'叉',COLORYELLOW;</p>
    			

     

     来源:程序化99

  • 文华技术人员:  
    LC:=(C+0.618*REF(C,1)+0.382*REF(C,2)+0.236*REF(C,3)+0.146*REF(C,4))/2.382,COLORWHITE,LINETHICK1;GAO:=HHV(C,60)-LLV(C,60);RSI:=SMA(MAX(LC-REF(LC,1),0),5,1)/SMA(ABS(LC-REF(LC,1)),5,1);仙人:LC+GAO*(RSI-0.5),COLOR9933FF,LINETHICK1;攻防价位:(REF((H-L)*0.618+L,1)),NODRAW,COLORYELLOW;STICKLINE1(ISLASTBAR,攻防价位-0.01,攻防价位,6,0),COLORYELLOW;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,COLORRED;空:MA(多,6),COLORGREEN;水平面:MA(CLOSE,60),COLORYELLOW,POINTDOT;MS:IF(多>=REF(多,1),多,NULL),COLORRED,LINETHICK2;MM:IF(空>=REF(空,1),空,NULL),COLORYELLOW,LINETHICK2; 买:=CROSS(多,空); 卖:=CROSS(空,多); DRAWICON(买,L*0.97,1); DRAWICON(卖,H*1.03,2); 


    VAR55:=LLV(LOW,6);VAR66:=HHV(HIGH,6);VAR77:=(VAR66-VAR55)/10;VAR88:=SMA((CLOSE-VAR55)/VAR77,20,1);VARA:=3*VAR88-2*SMA(VAR88,3,1);AA:=MA(EMA(WINNER(C),3),3);筹码集中度:AA-0.5,COLORYELLOW;FILLRGN(筹码集中度>0,0,筹码集中度,RGB(155,50,50));FILLRGN(筹码集中度<0,0,筹码集中度,RGB(83,135,68));STICKLINE1(筹码集中度>=0.4,0.4,筹码集中度,4,1),COLORCYAN; STICKLINE1(筹码集中度<=-0.4,-0.4,筹码集中度,4,1),COLORGRAY; 中线:EMA(AA-0.5,55),LINETHICK2,COLORGRAY;IF(中线>REF(中线,1),中线,NULL),LINETHICK2,COLORMAGENTA;IF(筹码集中度>=REF(筹码集中度,1),筹码集中度,NULL),COLORRED;IF(筹码集中度<REF(筹码集中度,1),筹码集中度,NULL),COLORCYAN;AB:=EMA(AA-0.5,6);AC:=CROSS(AA-0.5,AB) AND AB<=-0.3;AD:=CROSS(AB,AA-0.5) AND AB>=0.35;DRAWICON(AC,AB,7);DRAWICON(AD,AB,8);VAR6:=(2*CLOSE+HIGH+LOW)/4;VAR7:=LLV(LOW,13);VAR8:=HHV(HIGH,13);VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13);仙人: (EMA(0.382*REF(VAR9,2)+0.618*VAR9,6)-50)/100,COLORYELLOW,LINETHICK2;AAA:=EMA(仙人,3);DRAWICON(仙人>=REF(仙人,1) AND REF(仙人,1)<=REF(仙人,2),仙人*0.95,1);DRAWICON(仙人<=REF(仙人,1) AND REF(仙人,1)>=REF(仙人,2),仙人*1.05,2);IF(仙人>REF(仙人,1),仙人,NULL),COLORRED,LINETHICK2;IF(仙人<REF(仙人,1),仙人,NULL),COLORCYAN,LINETHICK2;DRAWICON(CROSS(AA-0.5,中线) AND AA-0.5<0,AB,23);A1:=BARSLAST(REF(CROSS(仙人,AAA),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND 仙人>REF(仙人,A1+1) AND CROSS(仙人,AAA);STICKLINE1(底背离,0,0.1,3,0),COLORMAGENTA;DRAWLINE(A1=0,AAA,底背离,AAA,0),COLORRED,LINETHICK4;A2:=BARSLAST(REF(CROSS(AAA,仙人),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(仙人,A2+1)>仙人 AND CROSS(AAA,仙人);DRAWLINE(A2=0,AAA,顶背离,AAA,0),COLORGREEN,LINETHICK4;  

    DIFF:EMA(CLOSE,6)-EMA(CLOSE,13),COLORWHITE,LINETHICK2;DEA:EMA(DIFF,3),COLORYELLOW, LINETHICK2;MACD:2*(DIFF-DEA),COLORRED;STICKLINE1(MACD>=0,MACD,0,4,1),COLORF00FF0;STICKLINE1(MACD<0,MACD,0,4,1),COLORWHITE;STICKLINE1(MACD<REF(MACD,1) AND MACD>0,0,MACD,4,0 ),COLOR00AAFF; STICKLINE1(MACD<REF(MACD,1) AND MACD>0,0,MACD,3.3,0 ),COLOR00BBFF; STICKLINE1(MACD<REF(MACD,1) AND MACD>0,0,MACD,2.2,0 ),COLOR00CCFF; STICKLINE1(MACD<REF(MACD,1) AND MACD>0,0,MACD,1.65,0 ),COLOR00DDFF; STICKLINE1(MACD<REF(MACD,1) AND MACD>0,0,MACD,1.1,0 ),COLOR00EEFF; STICKLINE1(MACD<REF(MACD,1) AND MACD>0,0,MACD,0.55,0 ),COLOR00FFFF; STICKLINE1(MACD>=REF(MACD,1) AND MACD>0,0,MACD,4 ,0 ),COLOR0000AA; STICKLINE1(MACD>=REF(MACD,1) AND MACD>0,0,MACD,3.3 ,0 ),COLOR0011BB; STICKLINE1(MACD>=REF(MACD,1) AND MACD>0,0,MACD,2.2,0 ),COLOR0022CC; STICKLINE1(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1.65 ,0 ),COLOR0033DD; STICKLINE1(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1.1 ,0 ),COLOR0044EE; STICKLINE1(MACD>=REF(MACD,1) AND MACD>0,0,MACD,0.55 ,0 ),COLOR0055FF; STICKLINE1(MACD>REF(MACD,1) AND MACD<0,0,MACD,4,0 ),COLORAA00BB; STICKLINE1(MACD>REF(MACD,1) AND MACD<0,0,MACD,3.3 ,0 ),COLORBB11BB; STICKLINE1(MACD>REF(MACD,1) AND MACD<0,0,MACD,2.2,0 ),COLORCC22BB; STICKLINE1(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.65,0 ),COLORDD33BB; STICKLINE1(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.1,0 ),COLOREE44BB; STICKLINE1(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.55 ,0 ),COLORFF55BB; STICKLINE1(MACD<=REF(MACD,1) AND MACD<0,0,MACD,4,0 ),COLORFFAA00; STICKLINE1(MACD<=REF(MACD,1) AND MACD<0,0,MACD,3.3 ,0 ),COLORFFBB11; STICKLINE1(MACD<=REF(MACD,1) AND MACD<0,0,MACD,2.2,0 ),COLORFFCC22; STICKLINE1(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.65 ,0 ),COLORFFDD33; STICKLINE1(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.1 ,0 ),COLORFFEE44; STICKLINE1(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.55 ,0 ),COLORFFFF55;金叉:=CROSS(DIFF,DEA)  AND  DIFF<-0.1; STICKLINE1(金叉,0,-0.18,6,0),COLORRED; DRAWTEXT(金叉,-0.1,' 金叉'),COLORRED; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIFF,DEA)  AND  DEA<0  AND COUNT(JCCOUNT=2,21)=1; STICKLINE1(二次金叉,0,-0.18,6,0),COLORFF00FF; DRAWICON(二次金叉,DEA*1.04,13) ; DRAWTEXT(二次金叉,-0.1,' 二次金叉'),COLORFF00FF; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背离:=REF(CLOSE,A1+1)>CLOSE  AND DIFF>REF(DIFF,A1+1)  AND  CROSS(DIFF,DEA); STICKLINE1(底背离,0,0.13,6,0),COLOR00FF00; DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2; DRAWTEXT(底背离,0.1,' 底背离'),COLOR00FF00; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 顶背离:=REF(CLOSE,A2+1)<CLOSE  AND REF(DIFF,A2+1)>DIFF  AND  CROSS(DEA,DIFF); DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK2;DRAWTEXT(CROSS(DEA,DIFF ),0,'死叉'),COLORYELLOW;

     

     来源: WWW.CXH99.COM

  • 文华客服:   PARAMS NUMERIC NOTBEF(9.00); NUMERIC NOTAFT(14.55); NUMERIC F1(0.01); NUMERIC F2(1); NUMERIC F3(0.01); NUMERIC REVERSE(1.00); NUMERIC RANGEMIN(0.1); NUMERIC XDIV(3); NUMERIC OFFSET(5); VARS NUMERICSERIES SSETUP(0); NUMERICSERIES BSETUP(0); NUMERICSERIES SENTER(0); NUMERICSERIES BENTER(0); NUMERICSERIES BBREAK(0); NUMERICSERIES SBREAK(0); NUMERICSERIES LTODAY(0); NUMERICSERIES HITODAY(9999); NUMERICSERIES STARTNOW(0); NUMERICSERIES DIV(0); BOOLSERIES RFILTER(FALSE); NUMERIC I_REVERSE; NUMERIC I_RANGEMIN; NUMERIC I_VB; NUMERIC I_VS; NUMERIC I_OFFSET; NUMERIC OFFSET2; BEGIN IF(BARSTATUS==2 && TIME==0.090000 && HIGH==LOW ) RETURN;  I_OFFSET = OFFSET*MINMOVE*PRICESCALE; I_REVERSE = REVERSE*(OPEND(0)/100); I_RANGEMIN = RANGEMIN*(OPEND(0)/100); IF(BARSTATUS==0) { STARTNOW=0; DIV=MAX(XDIV,1); } IF(DATE != DATE[1]) { SETGLOBALVAR(0,0);// 将第1个全局变量设置为0,将第2个全局变量设置为0         SETGLOBALVAR(1,0);         STARTNOW=STARTNOW+1;         SSETUP=HITODAY[1]+F1*(CLOSE[1]-LTODAY[1]);         SENTER=((1+F2)/2)*(HITODAY[1]+CLOSE[1])-(F2)*LTODAY[1];         BENTER=((1+F2)/2)*(LTODAY[1]+CLOSE[1])-(F2)*HITODAY[1];         BSETUP=LTODAY[1]-F1*(HITODAY[1]-CLOSE[1]);         BBREAK=SSETUP+F3*(SSETUP-BSETUP);         SBREAK=BSETUP-F3*(SSETUP-BSETUP);         HITODAY=HIGH;         LTODAY=LOW;         RFILTER=(HITODAY[1]-LTODAY[1])>=I_RANGEMIN; } IF(HIGH>HITODAY) { HITODAY=HIGH; } IF(LOW<LTODAY) { LTODAY=LOW; } IF(TIME*100>NOTBEF AND TIME*100<NOTAFT AND STARTNOW>=2 AND RFILTER)//当前公式应用商品在当前BAR的时间乘以100》=9点或者小于14.55分 { IF(TIME != GETGLOBALVAR(1) AND GETGLOBALVAR(1) != 0)         {                 SETGLOBALVAR(1,10000);         }         IF(HITODAY>=SSETUP AND MARKETPOSITION>-1 AND GETGLOBALVAR(1)<1)         {IF(LOW<=(SENTER+(HITODAY-SSETUP)/DIV))                 { SELLSHORT(1,SENTER+(HITODAY-SSETUP)/DIV+I_OFFSET);                         SETGLOBALVAR(1,TIME);                         RETURN; }}         IF(LTODAY<=BSETUP AND MARKETPOSITION<1  AND GETGLOBALVAR(1)<1)         { IF(HIGH>=(BENTER-(BSETUP-LTODAY)/DIV))                 {  BUY(1,BENTER-(BSETUP-LTODAY)/DIV-I_OFFSET);                         SETGLOBALVAR(1,TIME);                         RETURN;  }}
            IF(MARKETPOSITION==-1)         { SETGLOBALVAR(0,1);                 IF(HIGH-ENTRYPRICE>=I_REVERSE)                 {    BUYTOCOVER(1,ENTRYPRICE);                         RETURN; }}         IF(MARKETPOSITION==1)         {   SETGLOBALVAR(0,1);              IF(ENTRYPRICE-LOW>=I_REVERSE)                 { SELL(1,ENTRYPRICE);                    RETURN; }}         IF(MARKETPOSITION==0)         { IF(HIGH>=BBREAK AND GETGLOBALVAR(0) == 0)                 {   BUY(1,BBREAK-I_OFFSET);                       RETURN;  }}         IF(MARKETPOSITION==0)         { IF(LOW<=SBREAK  AND GETGLOBALVAR(0) == 0)                 {SELLSHORT(1,SBREAK+I_OFFSET);                   RETURN;    } }}
    IF(TIME*100>=NOTAFT AND TIME<0.1600) {  IF(MARKETPOSITION==-1)         {  BUYTOCOVER(1,OPEN);  }         IF(MARKETPOSITION==1)         {  SELL(1,OPEN); }} END

     

  • 网友回复:   3楼是类C语言且有交易指令,wh6不支持,需要修改为MQ的模型
    MQ是高端程序化软件且是付费软件,下载地址:
    https://www.wenhua.com.cn
    另外,新的问题建议您重新发帖提问

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)

怎么收费,代编流程等详情请点击阅读,或QQ微信联系我们!


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

相关文章

    没有相关内容