这个能帮 我写成文华程序吗 [文华财经]
- 咨询内容:
通达信的程序
<!--EndFragment-->
0;
SJV:=FINANCE(34);{每股净资产}
市净率:C/SJV,NODRAW,COLOR00FF00;
每股税后利润:=(FINANCE(1)/FINANCE(29));
市盈率:C/FINANCE(33),NODRAW,COLORFFFF00;
DIF:=EMA(CLOSE,10)-EMA(CLOSE,22);
DE:=EMA(DIF,7.5);
MACDA:=2*(DIF-DE),;
HZL:=CROSS(MACDA,0);
LZH:=CROSS(0,MACDA);
BC:=BARSLAST(HZL OR LZH)+1;
ZGHZ:=IF(MACDA>0,HHV(MACDA,BC),0);
ZGLZ:=IF(MACDA<0,LLV(MACDA,BC),0);
DRAWBAND(ZGHZ,RGB(105,77,77),0,RGB(77,77,77));
DRAWBAND(ZGLZ,RGB(80,0,0),0,RGB(66,88,66));
DIFF:EMA(CLOSE,10)-EMA(CLOSE,22),COLORFFFFFF;
DEA:EMA(DIFF,7.5),COLOR00FFFF;
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK0;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD,1.5,1),COLORRED;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,1.5,0),COLOR90FF00;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,1.5,1),COLOREFFF00;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,1.5,0),COLORFFAAFF;
↑:TROUGHBARS(3,3,1),COLOR0000FF,NODRAW;
↓:PEAKBARS(3,3,1),COLOR00FF00,NODRAW; - 文华技术人员:
低:IF(↑=0,DIFF,IF(↓<↑,TROUGH(3,3,1),REF(TROUGH(3,3,1),1))),COLOR00FFFF,NODRAW;
高:IF(↓=0,DIFF,IF(↑<↓,PEAK(3,3,1),REF(PEAK(3,3,1),1))),COLOR00FF00,NODRAW;
STICKLINE(↑=0 AND DIFF<0 AND DIFF<DEA,0,DIFF,0,0),COLORFFAAFF;
STICKLINE(↓=0 AND DIFF>0 AND DIFF>DEA,DIFF,0,0,0),COLOR00FF00;
DRAWTEXT(↑=0 AND DIFF<0 AND DIFF<DEA,DIFF,'低'),COLORFFAAFF;
DRAWTEXT(↓=0 AND DIFF>0 AND DIFF>DEA,DIFF,'高'),COLOR00FF00;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
AA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=(REF(L,AA1+1)>L OR REF(C,AA1+1)>C) AND (L,DIFF)>REF((L,DIFF),AA1+1) AND CROSS(DIFF,DEA);
DRAWLINE(AA1=0,DEA,底背离,DEA,0),COLOR0000FF,LINETHICK1;
AA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=(REF(C,AA2+1)<C OR REF(H,AA2+1)<H) AND REF((H,DIFF),AA2+1)>(H,DIFF) AND CROSS(DEA,DIFF);
DRAWLINE(AA2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK1;
DRAWICON(CROSS(DIFF,DEA) AND DIFF>0,DEA,36);
DRAWICON(CROSS(DEA,DIFF) AND DIFF>0,DEA,37);
DRAWICON(CROSS(DIFF,DEA) AND DIFF<0,DEA,1);
DRAWICON(二次金叉,DEA*0.9,36) ;
解盘1:=CONST(IF(MACD>0,1,0));
解盘2:=CONST(IF(MACD<0,1,0));
解盘A:=IF(解盘1=1,'【精华8个字 买小卖小,缩头缩脚】 当股价一波比一波高时,反而红柱的堆,
一堆比一堆小,证明产生了顶背离现象,应该及时卖出',
IF(解盘2=1,'【精华8个字 买小卖小,缩头缩脚】 当股价一波比一波低时,
反而绿柱的堆一堆比一堆小,证明产生了底背离,应该买进',
DRAWNULL));
DRAWTEXT_FIX((解盘1=1 OR 解盘2=1),0.16,0,0,解盘A),COLORFFEE00; - 文华客服:
抱歉 您模型中用到的
SJV:=FINANCE(34);{每股净资产}
市净率:C/SJV,NODRAW,COLOR00FF00;
每股税后利润:=(FINANCE(1)/FINANCE(29));
市盈率:C/FINANCE(33),NODRAW,COLORFFFF00;
等股票中的概念 目前暂无可代替函数 从而暂无法实现改写 我们会在未来考虑增加函数来实现更多想法
- 网友回复:
按照这个思路运用到期货橡胶中来,把那同个指标去掉,根据这个思路,行不行。
- 网友回复:
两个软件函数差别较大 改写后会有较大差别 您酌情使用
DIF:=EMA(CLOSE,10)-EMA(CLOSE,22);
DE:=EMA(DIF,7.5);
MACDA:=2*(DIF-DE);
HZL:=CROSS(MACDA,0);
LZH:=CROSS(0,MACDA);
BC:=BARSLAST(HZL OR LZH)+1;
ZGHZ:=IF(MACDA>0,HHV(MACDA,BC),0);
ZGLZ:=IF(MACDA<0,LLV(MACDA,BC),0);
DIFF:EMA(CLOSE,10)-EMA(CLOSE,22);
DEA:EMA(DIFF,7.5);
MACD:2*(DIFF-DEA),COLORSTICK;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD,COLORRED,1);
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,COLORGREEN,0);
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,COLORGREEN,1);
STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,COLORRED,0);
SHANG:TROUGHBARS(C,3,1,1),NODRAW;
XIA:PEAKBARS(C,3,1,1),NODRAW;
DI:IF(SHANG=0,DIFF,IF(XIA<SHANG,TROUGH(C,3,1,1),REF(TROUGH(C,3,1,1),1))),NODRAW;
GAO:IF(XIA=0,DIFF,IF(SHANG<XIA,PEAK(C,3,1,1),REF(PEAK(C,3,1,1),1))),NODRAW;
STICKLINE(SHANG=0 AND DIFF<0 AND DIFF<DEA,0,DIFF,COLORGREEN,0);
STICKLINE(XIA=0 AND DIFF>0 AND DIFF>DEA,DIFF,0,COLORRED,0);
DRAWTEXT(SHANG=0 AND DIFF<0 AND DIFF<DEA,DIFF,'低');
DRAWTEXT(XIA=0 AND DIFF>0 AND DIFF>DEA,DIFF,'高');
DWJC:=CROSS(DIFF,DEA) AND DIFF<-0.1;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
ECJC:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
AA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
DBL:=(REF(L,AA1+1)>L OR REF(C,AA1+1)>C) AND L>REF(L,AA1+1) &&DIFF>REF(DIFF,AA1+1) AND CROSS(DIFF,DEA);
AA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
DINGBL:=(REF(C,AA2+1)<C OR REF(H,AA2+1)<H) AND REF(H,AA2+1)>H &&REF(DIFF,AA2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWICON(CROSS(DIFF,DEA) AND DIFF>0,DEA,'ICO36');
DRAWICON(CROSS(DEA,DIFF) AND DIFF>0,DEA,'ICO37');
DRAWICON(CROSS(DIFF,DEA) AND DIFF<0,DEA,'ICO1');
DRAWICON(ECJC,DEA*0.9,'ICO36') ;模型仅供参考
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容