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

请教老师,改下指标 [文华财经]

  • 咨询内容: 能否将以下指标改成主图指标,加入开多空、加减仓文字提示,图型整体更加简洁清晰明了,可分享给云端指标

    //DRAWGBKLAST(CLOSE>0,STRIP(RGB(41,36,0),RGB(0,0,0),0));B1:=MA(C,1);B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1);SMA2:=MA(B2,3);停损下限:IF(LLV(MA(B2,8),3)<B2,LLV(MA(B2,8),3),B2);FILLRGN(B2>SMA2,B2,SMA2,RGB(255,200,0));FILLRGN(B2<SMA2,B2,SMA2,RGB(0,255,0));SNAKEA:HHV(MA(B2,1),13),COLORYELLOW;VAR1:=(2*CLOSE+HIGH+LOW)/4;VAR2:=MA(VAR1,7);VAR3:=VAR2-MA(VAR1,7/2)<0;VAR4:=VAR2-MA(VAR1,7/2)>0;VAR5:=BARSLAST(VAR3);VAR6:=0-BARSLAST(VAR4);VAR7:=IF(VAR3<=0,VAR5,VAR6);//STICKLINE1(SNAKEA>B2 AND B2>SMA2,SNAKEA,B2,1,1),COLORBLUE;//STICKLINE1(SNAKEA>SMA2 AND B2<SMA2,SNAKEA,SMA2,1,1),COLORBLUE;VAR11:=(CLOSE*2+HIGH+LOW)/4;VAR21:=EMA(VAR11,13)-EMA(VAR11,34);VAR31:=EMA(VAR21,5);//STICKLINE1((C>=O),OPEN,LOW,1,0),COLOR0726CA;//STICKLINE1((C>=O),CLOSE,HIGH,1,0),COLOR0726CA;//STICKLINE1((C<O),CLOSE,LOW,1,0),COLORDE9100;//STICKLINE1((C<O),OPEN,HIGH,1,0),COLORDE9100;//STICKLINE1((C<O),CLOSE,OPEN,8,0),COLORFF5B00;//STICKLINE1((C<O),CLOSE,OPEN,10,0),COLOR000000;//STICKLINE1((C<O),CLOSE,OPEN,7,0),COLORFF6C00;//STICKLINE1((C<O),CLOSE,OPEN,6,0),COLORFF7B00;//STICKLINE1((C<O),CLOSE,OPEN,5,0),COLORFF9C00;//STICKLINE1((C<O),CLOSE,OPEN,4,0),COLORFFBE00;//STICKLINE1((C<O),CLOSE,OPEN,2.5,0),COLORFFCC00;//STICKLINE1((C<O),CLOSE,OPEN,1.5,0),COLORFFFF00;//STICKLINE1((C>O),CLOSE,OPEN,8,0),COLOR070084;//STICKLINE1((C>O),CLOSE,OPEN,10,0),COLOR000000;//STICKLINE1((C>O),CLOSE,OPEN,7,0),COLOR0000A3;//STICKLINE1((C>O),CLOSE,OPEN,6,0),COLOR0000B7;//STICKLINE1((C>O),CLOSE,OPEN,5,0),COLOR0000CD;//STICKLINE1((C>O),CLOSE,OPEN,4,0),COLOR0000E9;//STICKLINE1((C>O),CLOSE,OPEN,2,0),COLOR0754E9;//STICKLINE1((C>O),CLOSE,OPEN,1.5,0),COLOR076EF3;//STICKLINE1((C>O),CLOSE,OPEN,1,0),COLOR077BF3;VAR2A:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));VAR3A:=((REF(VAR2A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR4A:=((REF(VAR3A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR5A:=((REF(VAR4A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR6A:=((REF(VAR5A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR7A:=((REF(VAR6A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR8A:=((REF(VAR7A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR9A:=((REF(VAR8A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VARAA:=((REF(VAR9A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARBA:=((REF(VARAA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VARCA:=((REF(VARBA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARDA:=((REF(VARCA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAREAA:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));VARFA:=((REF(VAREAA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR10A:=((REF(VARFA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR11A:=((REF(VAR10A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR12A:=((REF(VAR11A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR13A:=((REF(VAR12A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR14A:=((REF(VAR13A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR15A:=((REF(VAR14A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR16A:=((REF(VAR15A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR17A:=((REF(VAR16A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR18A:=((REF(VAR17A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR19A:=((REF(VAR18A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR1A:=(REF((((((((((((VAREAA OR VARFA) OR VAR10A) OR VAR11A) OR VAR12A) OR VAR13A) OR VAR14A) OR VAR15A) OR VAR16A) OR VAR17A) OR VAR18A) OR VAR19A),1) AND VAR2A);STICKLINE1(VAR1A,O,O+(C-O)/3,8,0),COLOR0000FF;STICKLINE1(VAR1A,O,O+(C-O)/3,7,0),COLOR1029FF;STICKLINE1(VAR1A,O,O+(C-O)/3,6,0),COLOR1040FF;STICKLINE1(VAR1A,O,O+(C-O)/3,5,0),COLOR1083FF;STICKLINE1(VAR1A,O,O+(C-O)/3,4,0),COLOR10ABFF;STICKLINE1(VAR1A,O,O+(C-O)/3,3,0),COLOR10D0FF;STICKLINE1(VAR1A,O,O+(C-O)/3,2,0),COLOR10FFFF;STICKLINE1(VAR1A,O,O+(C-O)/3,1,0),COLOR00FFFF;AA:=(REF((((((((((((VAR2A OR VAR3A) OR VAR4A) OR VAR5A) OR VAR6A) OR VAR7A) OR VAR8A) OR VAR9A) OR VARAA) OR VARBA) OR VARCA) OR VARDA),1) AND VAREAA);STICKLINE1(AA,O,O+(C-O)/3,8,0),COLOR008800;STICKLINE1(AA,O,O+(C-O)/3,7,0),COLOR009900;STICKLINE1(AA,O,O+(C-O)/3,6,0),COLOR00AA00;STICKLINE1(AA,O,O+(C-O)/3,5,0),COLOR00BB00;STICKLINE1(AA,O,O+(C-O)/3,4,0),COLOR00CC00;STICKLINE1(AA,O,O+(C-O)/3,3,0),COLOR00DD00;STICKLINE1(AA,O,O+(C-O)/3,2,0),COLOR00EE00;STICKLINE1(AA,O,O+(C-O)/3,1,0),COLOR00FF00;A13:=EMA(CLOSE,55);A14:=MA(CLOSE,75);A15:=EMA(A14,3);A16:=EMA(A15,3);A17:=(HIGH + LOW) / 5;A18:=(MA(A17,4)) - (MA(A17,34));A19:=CROSS(A18,0);A20:=CROSS(0,A18);A21:=BARSLAST(A19);A22:=BARSLAST(A20);A23:=REF(A19,1);A24:=REF(A20,1);A25:=BARSLAST(A23);A26:=BARSLAST(A24);A27:=IF((A25 < A26),(REF((HHV(HIGH,2)),A25)),(REF((LLV(LOW,2)),A26)));A28:=(((REF(CLOSE,1)) <= (REF(A27,1))) AND (CLOSE > A27)) AND (A21 < A22);A29:=(((REF(CLOSE,1)) >= (REF(A27,1))) AND (CLOSE < A27)) AND (A22 < A21);A30:=A28 AND ((COUNT(A28,A21)) = 1);A31:=A29 AND ((COUNT(A29,A22)) = 1);A32:=A30 AND ((REF(BARSLAST(A31),1)) < (REF(BARSLAST(A30),1)));A33:=A31 AND ((REF(BARSLAST(A31),1)) > (REF(BARSLAST(A30),1)));DRAWTEXT(A32,SMA2*0.99,'←═╬∝'),COLORYELLOW;AMOUNT:=OPI;AC:=AMOUNT/(VOL);YY:=MA(AC,13);LLL:=(C-YY)/YY*100;MIDC := MA(CLOSE,22);UPPERC:= MIDC + 2*STD(C,22);LOWERC:= MIDC - 2*STD(C,22);BBA:=(C-LOWERC)/(UPPERC-LOWERC);BBC:=FORCAST(BBA,3);LIFENGCYC:=(REF(LLL,1)<-15 AND REF(BBA,1)<0 AND LLL>REF(LLL,1));STICKLINE1(LIFENGCYC,LOW*0.93,LOW*0.95,6,0);STICKLINE1(LIFENGCYC>0,C,O,8,0),COLORRED;STICKLINE1(LIFENGCYC>0,C,O,7,0),COLOR1029FF;STICKLINE1(LIFENGCYC>0,C,O,6,0),COLOR1040FF;STICKLINE1(LIFENGCYC>0,C,O,4,0),COLOR1083FF;STICKLINE1(LIFENGCYC>0,C,O,2,0),COLOR10ABFF;STICKLINE1(LIFENGCYC>0,C,O,1.5,0),COLOR10D0FF;STICKLINE1(LIFENGCYC>0,C,O,1,0),COLOR10FFFF;DRAWTEXT(LIFENGCYC>0,LOW*0.99,'☆'),COLORDD00DD;

     

     来源:程序化99

  • 文华技术人员:  具体满足什么条件标记多空 ?满足什么条件标记加减仓?

     

     来源: WWW.CXH99.COM

  • 文华客服: 黄条趋势线出现开多,绿条趋势线出现开空;做多时蓝色圆柱体出现加仓,绿色圆柱体出现减仓,做空时蓝色圆柱体出现减仓,绿色圆柱体出现加仓,可行否?

     

  • 网友回复: 参考:
    B1:=MA(C,1); B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1); SMA2:=MA(B2,3); 停损下限:=IF(LLV(MA(B2,8),3)<B2,LLV(MA(B2,8),3),B2); FILLRGN(B2>SMA2,B2,SMA2,RGB(255,200,0)); FILLRGN(B2<SMA2,B2,SMA2,RGB(0,255,0));
    SNAKEA:=HHV(MA(B2,1),13),COLORYELLOW; VAR1:=(2*CLOSE+HIGH+LOW)/4; VAR2:=MA(VAR1,7); VAR3:=VAR2-MA(VAR1,7/2)<0; VAR4:=VAR2-MA(VAR1,7/2)>0; VAR5:=BARSLAST(VAR3); VAR6:=0-BARSLAST(VAR4); VAR7:=IF(VAR3<=0,VAR5,VAR6);//
    VAR11:=(CLOSE*2+HIGH+LOW)/4; VAR21:=EMA(VAR11,13)-EMA(VAR11,34); VAR31:=EMA(VAR21,5);// VAR2A:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2))); VAR3A:=((REF(VAR2A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR4A:=((REF(VAR3A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR5A:=((REF(VAR4A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR6A:=((REF(VAR5A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR7A:=((REF(VAR6A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR8A:=((REF(VAR7A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR9A:=((REF(VAR8A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VARAA:=((REF(VAR9A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VARBA:=((REF(VARAA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VARCA:=((REF(VARBA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VARDA:=((REF(VARCA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAREAA:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2))); VARFA:=((REF(VAREAA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR10A:=((REF(VARFA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR11A:=((REF(VAR10A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR12A:=((REF(VAR11A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR13A:=((REF(VAR12A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR14A:=((REF(VAR13A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR15A:=((REF(VAR14A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR16A:=((REF(VAR15A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR17A:=((REF(VAR16A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR18A:=((REF(VAR17A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR19A:=((REF(VAR18A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR1A:=(REF((((((((((((VAREAA OR VARFA) OR VAR10A) OR VAR11A) OR VAR12A) OR VAR13A) OR VAR14A) OR VAR15A) OR VAR16A) OR VAR17A) OR VAR18A) OR VAR19A),1) AND VAR2A); STICKLINE1(VAR1A,O,O+(C-O)/3,8/2,0),COLOR0000FF; STICKLINE1(VAR1A,O,O+(C-O)/3,7/2,0),COLOR1029FF; STICKLINE1(VAR1A,O,O+(C-O)/3,6/2,0),COLOR1040FF; STICKLINE1(VAR1A,O,O+(C-O)/3,5/2,0),COLOR1083FF; STICKLINE1(VAR1A,O,O+(C-O)/3,4/2,0),COLOR10ABFF; STICKLINE1(VAR1A,O,O+(C-O)/3,3/2,0),COLOR10D0FF; STICKLINE1(VAR1A,O,O+(C-O)/3,2/2,0),COLOR10FFFF; STICKLINE1(VAR1A,O,O+(C-O)/3,1/2,0),COLOR00FFFF; AA:=(REF((((((((((((VAR2A OR VAR3A) OR VAR4A) OR VAR5A) OR VAR6A) OR VAR7A) OR VAR8A) OR VAR9A) OR VARAA) OR VARBA) OR VARCA) OR VARDA),1) AND VAREAA); STICKLINE1(AA,O,O+(C-O)/3,8/2,0),COLOR008800; STICKLINE1(AA,O,O+(C-O)/3,7/2,0),COLOR009900; STICKLINE1(AA,O,O+(C-O)/3,6/2,0),COLOR00AA00; STICKLINE1(AA,O,O+(C-O)/3,5/2,0),COLOR00BB00; STICKLINE1(AA,O,O+(C-O)/3,4/2,0),COLOR00CC00; STICKLINE1(AA,O,O+(C-O)/3,3/2,0),COLOR00DD00; STICKLINE1(AA,O,O+(C-O)/3,2/2,0),COLOR00EE00; STICKLINE1(AA,O,O+(C-O)/3,1/2,0),COLOR00FF00;
    CROSS(B2>SMA2,0.5),WORD(0,'',FONTSIZE20,VALIGN0; CROSS(B2<SMA2,0.5),WORD(1,'',FONTSIZE20,VALIGN2;

    VAR1A&&B2>SMA2,WORD(1,'多'; AA&&B2>SMA2,WORD(1,'多';
    VAR1A&&B2<SMA2,WORD(1,'空'; AA&&B2<SMA2,WORD(1,'空';

     

  • 网友回复: 老师,那两根细小的白线和黄线可以不进去掉吗

 

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

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

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

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


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

相关文章

    没有相关内容