我满怀欣喜,就在下午一边看股市一边就把他的代码复制到我的通达信股票软件了可是,他不是通达信的,就又费了点事改成通达信的代码。可有点看不明白。就发到这里,朋友们看看吧。谁可以就代码编写出使用方法就太好了。我把他用符号表示的线段改成用文字表示了,就是为了更好的了解公式是使用方法。下面是代码和图片:
C/C++ Code复制内容到剪贴板
- N:=20;
- M:=60;
- TG:=(MA(CLOSE,5)+MA(CLOSE,8)+MA(CLOSE,13)+MA(CLOSE,21))/4;
- AA:=HHV(TG,3);
- BB:=LLV(TG,3);
- TG1:=(MA(CLOSE,2)+MA(CLOSE,3)+MA(CLOSE,4)+MA(CLOSE,5))/4;
- AA1:=HHV(TG1,3);
- AA2:=REF(AA1,1);
- 短期CMA最高值:AA1;
- 中期CMA:TG;
- 中期CMA最高值:AA;
- 中期CMA最低值:BB;
- 趋势线:MA(TG,N),COLORYELLOW;
- QSX:=REF(趋势线,1);
- DRAWBAND(趋势线,RGB(255,0,0),QSX,RGB(0,255,0));
- STICKLINE(BB >趋势线 ,BB,趋势线,1,1),COLOR0000AA;
- STICKLINE(BB <趋势线 ,BB,趋势线,1,1),COLOR008800;
- STICKLINE(BB-REF(BB,1)>0 ,AA,BB,7,0),COLOR0000DD;
- STICKLINE(BB-REF(BB,1)<0 ,BB,AA,7,0),COLOR008800;
- AA12:=REF(AA,1);
- BB1:=REF(BB,1);
- DRAWBAND(AA,RGB(255,0,0),AA12,RGB(0,255,0));
- DRAWBAND(BB,RGB(255,0,0),BB1,RGB(0,255,0));
- STICKLINE((OPEN >= CLOSE),HIGH,LOW,0,0),COLORCYAN;
- STICKLINE((OPEN >= CLOSE),OPEN,CLOSE,8,0),COLORCYAN;
- STICKLINE((OPEN < CLOSE),HIGH,LOW,0,0),COLORRED;
- STICKLINE((OPEN < CLOSE),OPEN,CLOSE,6,1),COLORRED,LINETHICK3;
- STICKLINE((OPEN < CLOSE),OPEN,CLOSE,6,0),COLORYELLOW;
- DRAWBAND(AA1,RGB(255,0,255),AA2,RGB(0,55,250));
- 趋势线1:=MA(TG,3),COLORYELLOW;
- 趋势线2:=REF(趋势线1,1);
- DRAWBAND(趋势线1,RGB(255,255,0),趋势线2,RGB(0,55,255)),LINETHICK1;