快生活 - 生活常识大全

精准超前指标通达信副图指标无


  公式源码:
  {精准超前MACD}
  0,COLORGRAY;
  DIF12:=(EMA(CLOSE,12)-EMA(CLOSE,26))/((EMA(CLOSE,12)+EMA(CLOSE,26))/2)*1000;
  DEA12:=EMA(DIF12,9);
  KDIF12:=3*(DIF12-DEA12);
  KDEA12:=SMA(KDIF12,5,2);
  微分DIF:=KDIF12*5,COLORWHITE,LINETHICK1;
  微分DEA:=KDEA12*5,COLORYELLOW,LINETHICK1;
  MACD2:2*(微分DIF-微分DEA),COLORBLACK;
  MAMACD:=MA(MACD2,3),,COLORBLACK;
  STICKLINE(MACD2>REF(MACD2,1) AND MACD2>0,0,MACD2,1,0),COLORRED;
  STICKLINE(MACD2&lt;=ref(macd2,1) and="""" macd2=""""&gt;0,0,MACD2,1,0),COLORYELLOW;<!--=ref(macd2,1)-->
  STICKLINE(MACD2&lt;&gt;
  STICKLINE(MACD2&gt;=REF(MACD2,1) AND MACD2&lt;&gt;
  STICKLINE(MAMACD&lt;1*ref(mamacd,1), macd2=""""&gt;<!--1*ref(mamacd,1),-->
  STICKLINE(MAMACD&gt;1*REF(MAMACD,1), MAMACD, MACD2 , 3, 0),COLORLIRED;
  微分DIF2:KDIF12*5,COLORRED,LINETHICK1;
  微分DEA2:KDEA12*5,COLORMAGENTA,LINETHICK1;
  NOTEXT强:IF(微分DIF2&lt;&gt;
  NOTEXT弱:IF(微分DEA2&lt;&gt;
  {普通MACD}
  DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*300,COLORWHITE,DOTLINE;
  DEA:=EMA(DIF,9),COLORYELLOW,DOTLINE;
  {------背离--------}
  DIF普:=EMA(CLOSE,12)-EMA(CLOSE,26);
  DEA普:=EMA(DIF,9);
  MACD:=(DIF普-DEA普)*2,COLORSTICK;
  A1:=BARSLAST(REF(CROSS(""MACD.DIF"",""MACD.DEA""),1));
  B1:=REF(C,A1+1)&gt;C AND REF(""MACD.DIF"",A1+1)&lt;""macd.dif"" and=""""&gt;<!--""macd.dif""-->
  {DRAWTEXT(B1&gt;0,DIF*0.7,""↙MACD底背""),COLORFF00FF; }
  C1:=BARSLAST(REF(CROSS(""MACD.DEA"",""MACD.DIF""),1));
  D1:=REF(C,C1+1)""MACD.DIF"" AND CROSS(""MACD.DEA"",""MACD.DIF"");
  {DRAWTEXT(D1&gt;0,DIF*1.2,""↙MACD顶离""),COLORBLUE;}{MACD顶背离}
  JC := DEA-DIF;
  绿柱面积:=IF(MACD&lt;&gt;&lt;&gt;
  红柱面积:=IF(MACD&gt;0,SUM(MACD,BARSLAST(JC&gt;0)),0);
  本次最低价:=LLV(L,BARSLAST(JC&lt;&gt;
  本次最高价:=HHV(H,BARSLAST(JC&gt;0));
  X1:=IF (MACD&lt;&gt;
  前次绿柱面积:=REF(绿柱面积,X1+1);
  前次最低价:=REF(本次最低价,X1+1);
  Y1:=IF((绿柱面积&lt;0 and=""""&gt;&lt;&gt;<!--0-->
  AND 本次最低价&lt;前次最低价&gt;<!--前次最低价-->
  RS1:= MACD&lt;0 and=""""&gt;&lt;0 and=""""&gt;&lt;&gt;<!--0--><!--0-->
  AND ABS(绿柱面积)&lt;&gt;
  底背驰: IF (CROSS(DIF,DEA),REF(Y1,1),0);
  DRAWTEXT(底背驰,DIF*0.8,""↙积底背""),COLOR00FFFF;
  X2:=IF (MACD&gt;0,BARSLAST(CROSS(DEA,DIF)),0);
  前次红柱面积:=REF(红柱面积,X2+1);
  前次最高价:=REF(本次最高价,X2+1);
  Y2:=IF((红柱面积&gt;0 AND 红柱面积&lt;前次红柱面积 and=""""&gt;前次最高价 ),1,0);<!--前次红柱面积-->
  RS2:= MACD&gt;0 AND REF(MACD,1)&gt;0 AND C&gt;前次最高价 AND ABS(红柱面积)&lt;&gt;
  顶背驰:= IF (CROSS(DEA,DIF),REF(Y2,1),0);
  DRAWTEXT(顶背驰,DIF*0.8,""↙顶底背""),COLORGREEN;
  MACD高:=HHV(MACD,5);
  E:=REF(C,C1+1)&gt;C AND DEA&gt;0 AND REF(MACD高,C1+1)
  {DRAWTEXT(E&gt;0,DIF*1.1,""↙柱顶背""),COLORRED;}
  F:=REF(C,A1+1)&gt;C AND DEA&lt;0 and=""""&gt;<!--0-->
  {DRAWTEXT(F&gt;0,DIF*0.9,""↙柱底背""),COLORYELLOW;};
  DRAWTEXT_FIX(C&gt;O,0.01,0.9,0,""微信订阅号:翔博软件工作室""),COLOR556699;
  =========================
网站目录投稿:小柔