大智慧主图公式源码 大智慧SUPERTREND主图公式源码
2015-3-17 10:31:44 股票入门 http://rumen.southmoney.com
南方财富网带来大智慧主图公式源码 大智慧SUPERTREND主图公式源码:
variable:tr=0,up=0,dn=0;
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;
tr:=if(c》ref(up,1),1,if(c《ref(dn,1),-1,tr));
flag:=tr《0 and ref(tr,1)》0;
flagh:=tr》0 and ref(tr,1)《0;
dn:=if(tr》0 and dn《ref(dn,1),ref(dn,1),dn);
up:=if(tr《0 and up》ref(up,1),ref(up,1),up);
up:=if(flag,median + atr * M,up);
dn:=if(flagh,median - atr * M,dn);
PARTLINE(dn,tr=1,rgb(200,0,0));
PARTLINE(up,tr=-1,rgb(0,200,0));
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。