联系方式 Contact

云指标公式网

淘宝:zb-mart.taobao.com

电话:18020657357

Q Q:396950280

网址:www.yzhibiao.com

搜索 Search

跟太极线炒白银--信号灯

2014-12-28 12:28:01点击:

 

N:=10;
M:=1.5;
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR1,N);
MEDIAN:= (HIGH + LOW) / 2;
UP:= MEDIAN+ATR * M;
DN:= MEDIAN-ATR * M;
TR2:=IF(C>REF(UP,1),1,IF(C<REF(DN,1),-1,TR1));
FLAG:=TR2<0 AND REF(TR2,1)>0;
FLAGH:=TR2>0 AND REF(TR2,1)<0;
DN1:=IF(TR2>0 AND DN<REF(DN,1),REF(DN,1),DN);
UP1:=IF(TR2<0 AND UP>REF(UP,1),REF(UP,1),UP);
UP2:=IF(FLAG,MEDIAN + ATR * M,UP1);
DN2:=IF(FLAGH,MEDIAN - ATR * M,DN1);
STICKLINE(C<REF(UP2,1),0,1,5,0),COLOR0000FF;
STICKLINE(C>REF(UP2,1),0,1,5,0),COLOR00FF00;