龙听期货论坛's Archiver

龙听 发表于 2018-11-30 13:35

文华黄经双线买卖指标源码[文华财经公式]

[code]
NN:=BARSLAST(DATE<>REFX(DATE,1));
CC:=VALUEWHEN(DATE<>REF(DATE,1),REF(OPI,1));
QQ:=OPI-REF(OPI,1);
K1:=IFELSE(CLOSE>OPEN&&QQ>=0,QQ,0);
KK1:=IFELSE(CLOSE<OPEN&&QQ<0,QQ,0);
KKK1:=IFELSE(CLOSE=OPEN,QQ*0.5,0);
K2:=IFELSE(CLOSE<OPEN&&QQ>=0,QQ,0);
KK2:=IFELSE(CLOSE>OPEN&&QQ<0,QQ,0);
KKK2:=IFELSE(CLOSE=OPEN,QQ*0.5,0);
DO:=SUM(K1,NN)+SUM(KK1,NN)+SUM(KKK1,NN);
KO:=SUM(K2,NN)+SUM(KK2,NN)+SUM(KKK2,NN);
PARTLINE(LOW>0,DO,COLORYELLOW);
PARTLINE(LOW>0,KO,COLORGREEN);
W:=MOD(NN,4);
J:=BACKSET(ISLASTBAR,4);
DRAWNUMBER(ISLASTBAR,DO,DO,0,COLORYELLOW);
DRAWNUMBER(ISLASTBAR,KO,KO,0,COLORGREEN);
DRAWNUMBER(W=0&&J=0,DO,DO,0,COLORYELLOW);
DRAWNUMBER(W=0&&J=0,KO,KO,0,COLORGREEN);
VERTLINE(BARSLAST(DATE=REFX(DATE,1))=2,COLORMAGENTA);
[/code]

页: [1]