我想求一个macd面积的公式 [博易POBO]
咨询内容:
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA), COLORSTICK;
A1:=MACD<0;
A2:=BARSLAST(A1),NODRAW;
B1:=MACD<0 AND REF(MACD,1)>=0 AND REFX(MACD,1)<=MACD;
B2:=BARSLAST(B1),NODRAW;
FOR I:=1 TO A2 DO
BEGIN
AA1:=10*ABS(REF(MACD,I));
BB1:=AA1+BB1;
END
FOR J:=B2 TO A2 DO
BEGIN
AA2:=10*ABS(REF(MACD,J));
BB2:=AA2+BB2;
END
AU1:=MACD>0;
AU2:=BARSLAST(AU1),NODRAW;
BU1:=MACD>0 AND REF(MACD,1)<=0 AND REFX(MACD,1)>=MACD;
BU2:=BARSLAST(BU1),NODRAW;
FOR I1:=1 TO AU2 DO
BEGIN
AAU1:=10*ABS(REF(MACD,I1));
BBU1:=AAU1+BBU1;
END
FOR J1:=BU2 TO AU2 DO
BEGIN
AAU2:=10*ABS(REF(MACD,J1));
BBU2:=AAU2+BBU2;
END
DRAWNUMBER(ISLASTBAR AND MACD>0,MACD,BB1,3),COLORRED;
DRAWNUMBER(ISLASTBAR AND MACD>0,MACD*3,BB2,3),COLORFFFF00;
DRAWNUMBER(ISLASTBAR AND MACD<0,MACD,BBU1,3),COLORRED;
DRAWNUMBER(ISLASTBAR AND MACD<0,MACD*3,BBU2,3),COLORFFFF00;
求的是前一个大于零和小于零的Macd的面积,之前的不好求,红色数字为大于0的MACD面积。 来源 程序化久久网
我想求一个macd面积的公式
我想求一个macd面积的公式 如题那文大神能给我分享下
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: VARIABLE:A2:=0,B2:=0,BB1:=0,BB2:=0,AU2:=0,BU2:=0,BBU1:=0,BBU2:=0;DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA), COLORSTICK;
A1:=MACD<0;
A2:=BARSLAST(A1),NODRAW;
B1:=MACD<0 AND REF(MACD,1)>=0 AND REFX(MACD,1)<=MACD;
B2:=BARSLAST(B1),NODRAW;
FOR I:=1 TO A2 DO
BEGIN
AA1:=10*ABS(REF(MACD,I));
BB1:=AA1+BB1;
END
FOR J:=B2 TO A2 DO
BEGIN
AA2:=10*ABS(REF(MACD,J));
BB2:=AA2+BB2;
END
AU1:=MACD>0;
AU2:=BARSLAST(AU1),NODRAW;
BU1:=MACD>0 AND REF(MACD,1)<=0 AND REFX(MACD,1)>=MACD;
BU2:=BARSLAST(BU1),NODRAW;
FOR I1:=1 TO AU2 DO
BEGIN
AAU1:=10*ABS(REF(MACD,I1));
BBU1:=AAU1+BBU1;
END
FOR J1:=BU2 TO AU2 DO
BEGIN
AAU2:=10*ABS(REF(MACD,J1));
BBU2:=AAU2+BBU2;
END
DRAWNUMBER(ISLASTBAR AND MACD>0,MACD,BB1,3),COLORRED;
DRAWNUMBER(ISLASTBAR AND MACD>0,MACD*3,BB2,3),COLORFFFF00;
DRAWNUMBER(ISLASTBAR AND MACD<0,MACD,BBU1,3),COLORRED;
DRAWNUMBER(ISLASTBAR AND MACD<0,MACD*3,BBU2,3),COLORFFFF00;
求的是前一个大于零和小于零的Macd的面积,之前的不好求,红色数字为大于0的MACD面积。 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容