快生活 - 生活常识大全

红八卦量化交易系统


  昨天说把《红八卦量化交易模型》发上来,今天发代码。大家自己安装。
  十年前找人写的东西。应该可以安手机上。
  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&lt;MA1 AND C&lt;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));</ma3>
  T33:=C<ma1 and="" c="">MA2 AND C&lt;MA3 AND C&lt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));</ma1>
  T34:=C&lt;MA1 AND C<ma2 and="" c="">MA3 AND C&lt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));</ma2>
  T41:=C&gt;MA1 AND C&lt;MA2 AND C&lt;MA3 AND C&lt;MA4 AND A=1 AND B=1;
  T42:=C&lt;MA1 AND C&lt;MA2 AND C<ma3 and="" c="">MA4 AND A=1 AND B=1;</ma3>
  T43:=C<ma1 and="" c="">MA2 AND C&lt;MA3 AND C&lt;MA4 AND A=1 AND B=1;</ma1>
  T44:=C&lt;MA1 AND C<ma2 and="" c="">MA3 AND C&lt;MA4 AND A=1 AND B=1;</ma2>
  T51:=C&gt;MA1 AND C&gt;MA2 AND C&lt;MA3 AND C&lt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));
  T52:=C&gt;MA1 AND C&lt;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));</ma3>
  T53:=C<ma1 and="" c="">MA2 AND C&gt;MA3 AND C&lt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));</ma1>
  T54:=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));</ma3></ma1>
  T55:=C&lt;MA1 AND C<ma2 and="" c="">MA3 AND C&gt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));</ma2>
  T56:=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));</ma3></ma1>
  T61:=C&gt;MA1 AND C&gt;MA2 AND C&lt;MA3 AND C&lt;MA4 AND A=1 AND B=1;
  T62:=C&gt;MA1 AND C&lt;MA2 AND C<ma3 and="" c="">MA4 AND A=1 AND B=1;</ma3>
  T63:=C<ma1 and="" c="">MA2 AND C&gt;MA3 AND C&lt;MA4 AND A=1 AND B=1;</ma1>
  T64:=C<ma1 and="" c="">MA2 AND C<ma3 and="" c="">MA4 AND A=1 AND B=1;</ma3></ma1>
  T65:=C&lt;MA1 AND C<ma2 and="" c="">MA3 AND C&gt;MA4 AND A=1 AND B=1;</ma2>
  T66:=C<ma1 and="" c="">MA2 AND C<ma3 and="" c="">MA4 AND A=1 AND B=1;</ma3></ma1>
  T71:=C&gt;MA1 AND C&gt;MA2 AND C&gt;MA3 AND C&lt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));
  T72:=C&gt;MA1 AND C&gt;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));</ma3>
  T73:=C&gt;MA1 AND C<ma2 and="" c="">MA3 AND C&gt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));</ma2>
  T74:=C<ma1 and="" c="">MA2 AND C&gt;MA3 AND C&gt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));</ma1>
  T81:=C&gt;MA1 AND C&gt;MA2 AND C&gt;MA3 AND C&lt;MA4 AND A=1 AND B=1;
  T82:=C&gt;MA1 AND C&gt;MA2 AND C<ma3 and="" c="">MA4 AND A=1 AND B=1;</ma3>
  T83:=C&gt;MA1 AND C<ma2 and="" c="">MA3 AND C&gt;MA4 AND A=1 AND B=1;</ma2>
  T84:=C<ma1 and="" c="">MA2 AND C&gt;MA3 AND C&gt;MA4 AND A=1 AND B=1;</ma1>
  T9:=C&gt;MA1 AND C&gt;MA2 AND C&gt;MA3 AND C&gt;MA4 AND ((A=1 AND B=0) OR (B=1 AND A=0) OR (A=0 AND B=0));
  T10:=C&gt;MA1 AND C&gt;MA2 AND C&gt;MA3 AND C&gt;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%试探仓位的问题。
  还有选股问题。
  如果对这个程序还有疑问,可以在回复里咨询,我会找时间解答。
网站目录投稿:恨琴