软件简介:
公式源码都是macd指标的变形优化,收集起来,仅仅是源码,公式请看下面的录像自编一下。
感觉还是把所有同类指标归类的好,方便大家比较查阅
----------不全请大家补充----------
1.
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORLIRED,LINETHICK0;
DEA:EMA(DIF,9),COLORRED,LINETHICK0;
DRAWTEXT(CROSS(DIF,DEA),DIF-0,'建仓'),COLORYELLOW;
DRAWTEXT(CROSS(DEA,DIF),DIF+0,'空仓'),COLORGREEN;
MACD彩柱:(
DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD彩柱<REF(MACD彩柱,1) AND MACD彩柱>0,0,MACD彩柱,1,0),COLORLIBLUE,LINETHICK2;
STICKLINE(MACD彩柱>REF(MACD彩柱,1) AND MACD彩柱<0,0,MACD彩柱,1,0),COLORFF00FF,LINETHICK2;
_抄底:ABS((CROSS("MACD.DIF","MACD.DEA")&&"MACD.DEA"<=-0.07)*"MACD.DIF")*1.50,COLORLIMAGENTA;
_DIF:"MACD.DIF",COLORGREEN;
_DEA:"MACD.DEA";
__强度:IF(_DIF>_DEA,_DIF,DRAWNULL),COLORRED,LINETHICK1;
_强度:IF(_DEA<_DIF,_DEA,DRAWNULL);
DRAWTEXT(ABS(_抄底)>0,_抄底*1.20,' 抄底'),COLORYELLOW;
DRAWICON(ABS(_抄底)>0,_抄底*1.10,4);
DRAWICON(CROSS(_DIF,_DEA),_DEA,1);
DRAWICON(CROSS(_DEA,_DIF),_DEA,2);
2.
A:EMA(CLOSE,9)-EMA(CLOSE,18);
B:EMA(A,7),LINETHICK1;
MACD:=2*(A-B);
STICKLINE(MACD>=0,MACD,0,0,0),COLORF00FF0;
STICKLINE(MACD<0,MACD,0,1,0),COLORF00FF0;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0,0 ),COLORFFFF00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORFFFF00;
IF(A<0,A,0),COLORRED,LINETHICK1;
IF(A<0,0,A),COLORRED,LINETHICK1;
IF(A<B,A,B),COLOR00FF00,LINETHICK1;
IF(A>B,B,B),COLORWHITE,LINETHICK1;
机会来临:REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,0.5,0),1),COLORGREEN;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
E:=CROSS(83,RSI);
STICKLINE( E,E,0.5,1,0),COLOR00FFFF;
DRAWTEXT(E,0.85,' 逃顶'),COLORGREEN;
低位金叉:CROSS(A,B) AND A<-0.1,COLORRED;
STICKLINE(低位金叉,0,0.5,2,0),COLORRED;
JCCOUNT:=COUNT(CROSS(A,B),BARSLAST(B>=0));
二次金叉:CROSS(A,B) AND B<0 AND COUNT(JCCOUNT=2,21)=1,COLORYELLOW;
STICKLINE(二次金叉,0,0.2,2,0),COLORYELLOW;
DRAWICON(二次金叉,B*0.9,25) ;
DRAWICON(LLV(MACD,4)>0 AND MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,2)>REF(MACD,3),MACD,2);
DRAWICON(HHV(MACD,4)<0 AND MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3),MACD,1);
3.
DIFF:EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:EMA(DIFF,9),COLORFFFF00;
MACD:(DIFF-DEA)*2;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLORGREEN;
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLOR00FFFF;
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(多转空,MACD,2);
DRAWICON(空转多,MACD,1);
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.2,2,0),COLORFF00FF;
DRAWTEXT(二次金叉,DEA*1.06,'二次金叉'),COLORRED;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
{STICKLINE(底背离,0.5,0.8,2,0),COLORRED};
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK3;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK3;
4.
VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
VAR2:=( MA((CLOSE-VAR1)/VAR1,1));
买点: IF(CROSS(VAR2,0) AND LOW/REF(HIGH,1)<1.012,20,0);
买点1:IF(COUNT(VAR2>REF(VAR2,1),3)=3 AND
COUNT(VAR2<0,10)=10 AND REF(VAR2,3)=LLV(VAR2,10),60,0);
买点2: IF(REF(VAR2,2)=LLV(VAR2,20) AND
REF(VAR2,2)<0.071 AND REF(VAR2,2)<REF(VAR2,1) AND
NOT(REF(LOW,1)>REF(HIGH,2) AND LOW>REF(HIGH,1)) AND
CLOSE>REF(CLOSE,1),20,0);
MMA:=EMA(VAR2,12)*0.7;
MMB:=EMA(VAR2,3);
DIFF:( EMA(CLOSE,12) - EMA(CLOSE,26))*100,COLORRED;
DEA: EMA(DIFF,9),COLORFFFFFF,LINETHICK1;
MACD:= 2*(DIFF-DEA);
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORGREEN;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2,0),COLORFFCC33;
STICKLINE(MACD>REF(MACD,1)AND MACD,0,MACD,2,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,3,0),COLORMAGENTA;
5.
SQX:=(C-MA(CLOSE,13))*100;
DIFF:EMA(MA(SQX,7),1),COLOR00FFFF;
DEA:EMA(DIFF,7),COLORFF33FF;
MACD:(DIFF-DEA)*2,COLORSTICK;
低位金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.1,0.3,0),COLORYELLOW,POINTDOT;
STICKLINE(低位金叉,0,15,8,0),COLORYELLOW;DRAWICON(低位金叉,0.3,1);
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:IF(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;
STICKLINE(二次金叉,30,15,8,0),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0.1,0),COLORRED,POINTDOT;
STICKLINE(底背离,45,30,8,0),COLORRED;DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF),COLORGREEN;
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;
A3:=CROSS(DIFF,DEA) AND DEA<0;
零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT;
STICKLINE(零下二次金叉,45,60,8,0),COLORWHITE;
6.
DIFIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEAEA1:=EMA(DIFIF1,9);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
DIFIF1,COLOR33FF33,LINETHICK2;
DEAEA1,COLORYELLOW,LINETHICK2;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED,LINETHICK2;
弱:IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;
DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
DRAWICON(CROSS(DEAEA1,DIFIF1),-0.5,2);
DRAWTEXT(CROSS(DIFIF1,DEAEA1),DIFIF1,'○'),LINETHICK2, COLORYELLOW;
7.
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低金叉:CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低金叉,0,0.50,6,0),COLORYELLOW;
DRAWTEXT(低金叉,0.16,' 低金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二金叉:CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二金叉,0,0.36,6,0),COLORFF00FF;
DRAWICON(二金叉,DEA*0.9,1) ;
DRAWTEXT(二金叉,0.2,' 二金叉'),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.18,6,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK1;
DRAWTEXT(底背离,0.12,'
上一页主散走势线(飞狐) 下一页宅民2010(II号选股)