快好知 kuaihz

红八卦量化交易系统

昨天说把《红八卦量化交易模型》发上来,今天发代码。大家自己安装。

十年前找人写的东西。应该可以安手机上。

MA1:=MA(C,5);

MA2:=MA(C,10);

MA3:=MA(C,20);

MA4:=MA(C,60);

A:=IF(VOL>REF(VOL,1),1,0);

B:=IF(C>O OR C=O,1,0);

T1:=C<MA1 AND C<MA2 AND C<MA3 AND C<MA4 AND B=1 AND A=0;

T2:=C<MA1 AND C<MA2 AND C<MA3 AND C<MA4 AND A=1 AND B=1;

T31:=C>MA1 AND C<MA2 AND C<MA3 AND C<MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T32:=C<MA1 AND C<MA2 AND CMA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T33:=CMA2 AND C<MA3 AND C<MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T34:=C<MA1 AND CMA3 AND C<MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T41:=C>MA1 AND C<MA2 AND C<MA3 AND C<MA4 AND A=1 AND B=1;

T42:=C<MA1 AND C<MA2 AND CMA4 AND A=1 AND B=1;

T43:=CMA2 AND C<MA3 AND C<MA4 AND A=1 AND B=1;

T44:=C<MA1 AND CMA3 AND C<MA4 AND A=1 AND B=1;

T51:=C>MA1 AND C>MA2 AND C<MA3 AND C<MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T52:=C>MA1 AND C<MA2 AND CMA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T53:=CMA2 AND C>MA3 AND C<MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T54:=CMA2 AND CMA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T55:=C<MA1 AND CMA3 AND C>MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T56:=CMA2 AND CMA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T61:=C>MA1 AND C>MA2 AND C<MA3 AND C<MA4 AND A=1 AND B=1;

T62:=C>MA1 AND C<MA2 AND CMA4 AND A=1 AND B=1;

T63:=CMA2 AND C>MA3 AND C<MA4 AND A=1 AND B=1;

T64:=CMA2 AND CMA4 AND A=1 AND B=1;

T65:=C<MA1 AND CMA3 AND C>MA4 AND A=1 AND B=1;

T66:=CMA2 AND CMA4 AND A=1 AND B=1;

T71:=C>MA1 AND C>MA2 AND C>MA3 AND C<MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T72:=C>MA1 AND C>MA2 AND CMA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T73:=C>MA1 AND CMA3 AND C>MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T74:=CMA2 AND C>MA3 AND C>MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T81:=C>MA1 AND C>MA2 AND C>MA3 AND C<MA4 AND A=1 AND B=1;

T82:=C>MA1 AND C>MA2 AND CMA4 AND A=1 AND B=1;

T83:=C>MA1 AND CMA3 AND C>MA4 AND A=1 AND B=1;

T84:=CMA2 AND C>MA3 AND C>MA4 AND A=1 AND B=1;

T9:=C>MA1 AND C>MA2 AND C>MA3 AND C>MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));

T10:=C>MA1 AND C>MA2 AND C>MA3 AND C>MA4 AND A=1 AND B=1;

STICKLINE(T1,0,1,3,0),COLORGREEN;

STICKLINE(T2,0,2,3,0),COLORGREEN;

STICKLINE(T31 OR T32 OR T33 OR T34,0,3,3,0),COLORGREEN;

STICKLINE(T41 OR T42 OR T43 OR T44,0,4,3,0),COLORYELLOW;

STICKLINE(T51 OR T52 OR T53 OR T54 OR T55 OR T56,0,5,3,0),COLORYELLOW;

STICKLINE(T61 OR T62 OR T63 OR T64 OR T65 OR T66,0,6,3,0),COLORYELLOW;

STICKLINE(T71 OR T72 OR T73 OR T74,0,7,3,0),COLORYELLOW;

STICKLINE(T81 OR T82 OR T83 OR T84,0,8,3,0),COLORRED;

STICKLINE(T9,0,9,3,0),COLORRED;

STICKLINE(T10,0,10,3,0),COLORRED;

DRAWTEXT(T1,3,"1");

DRAWTEXT(T2,4,"2");

DRAWTEXT(T31 OR T32 OR T33 OR T34,5,"3");

DRAWTEXT(T41 OR T42 OR T43 OR T44,6,"4");

DRAWTEXT(T51 OR T52 OR T53 OR T54 OR T55 OR T56,7,"5");

DRAWTEXT(T61 OR T62 OR T63 OR T64 OR T65 OR T66,8,"6");

DRAWTEXT(T71 OR T72 OR T73 OR T74,9,"7");

DRAWTEXT(T81 OR T82 OR T83 OR T84,10,"8");

DRAWTEXT(T9,11,"9");

DRAWTEXT(T10,12,"10");

安装方法,点开任何一个行情软件(包括通达信),功能——公式系统——公式管理器——技术指标公式——均线型——公式名称(比如红八卦)

然后把代码贴进空白处(确定)

然后再点击成交量位置的副图,输入HBG(红八卦的首字母)

确定就出来了。

黑是极弱,绿色是转好,黄色代表强壮,红色表示亢奋。

看你怎么用。

你要做超短,就是只买红色区。

做中线,可以在黄色和红色区间一直持有。

还有那个20%试探仓位的问题。

还有选股问题。

如果对这个程序还有疑问,可以在回复里咨询,我会找时间解答。

本站资源来自互联网,仅供学习,如有侵权,请通知删除,敬请谅解!
搜索建议:红八卦量化交易系统  量化  量化词条  八卦  八卦词条  交易  交易词条  系统  系统词条  
股票

 反包k线的组合形态(实用)

当后一根K线实体包裹前一天的K线实体的K线组合叫做反包,不论是个股还是大盘,出现反包的情况不多,但是如果一旦碰上反包的走势,我们可以用反包辅助我们判断股票的趋势...(展开)