通达信多空对比公式 适合高抛低吸的波段理想工具
{牛牛指标网提供:www.tdx001.com}
复制内容到剪贴板
- 短期:(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,LINETHICK1;
- 中期:(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100,LINETHICK1;
- 中长期:(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100,LINETHICK1;
- 长期:(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,LINETHICK1,COLORRED;
- 四剑归零:DRAWTEXT(短期=0 AND 中期=0 AND 长期=0,(20),'0'),COLORFFFF00;
-
-
- {2线背离}
- A1:=短期<REF(短期,1) AND 中期>REF(中期,1) AND 中长期<REF(中长期,1) AND 长期<REF(长期,1);
- A2:=短期>REF(短期,1) AND 中期<REF(中期,1) AND 中长期>REF(中长期,1) AND 长期>REF(长期,1);
- 背离2:IF(A1 OR A2,0,-10),COLOR008000;
- {3线背离}
- A3:=中长期>REF(中长期,1) AND 短期<REF(短期,1) AND 中期<REF(中期,1) AND 长期<REF(长期,1);
- A4:=中长期<REF(中长期,1) AND 短期>REF(短期,1) AND 中期>REF(中期,1) AND 长期>REF(长期,1);
- 背离3:IF(A3 OR A4,0,-10),COLORFF8000;
- {4线背离}
- A5:=长期>REF(长期,1) AND 短期<REF(短期,1) AND 中长期<REF(中长期,1) AND 中期<REF(中期,1);
- A6:=长期<REF(长期,1) AND 短期>REF(短期,1) AND 中长期>REF(中长期,1) AND 中期>REF(中期,1);
- 背离4:IF(A5 OR A6,0,-10),COLORGREEN;
- {画线}
- 50,COLORCYAN;
- {底部反弹投机}
- 投机:IF(短期<20 AND 长期<20,-10,5),COLOR0000FF;
- {深红色强势投机线}
- 强投机4:IF(中长期>=45 AND 长期>=45,长期,DRAWNULL),COLORRED,LINETHICK2;
3072542381.png
|