股票论坛
标题:
请老师帮忙写一句表达式,谢谢!!
[打印本页]
作者:
东南小聪明
时间:
2016-11-6 16:59
标题:
请老师帮忙写一句表达式,谢谢!!
红面积:IF(DIF>DEA,SUM(MACD,BARSLAST(CROSS(DIF,DEA))),DRAWNULL),NODRAW,COLORLIRED;
绿面积:IF(DIF<DEA,SUM(MACD,BARSLAST(CROSS(DEA,DIF))),DRAWNULL),NODRAW,COLORGREEN;
DRAWNUMBER(CROSS(DIF,DEA),DEA,REF(绿面积,1)),COLORGREEN;
DRAWNUMBER(CROSS(DEA,DIF),DEA*1.1,REF(红面积,1)),COLORLIRED;
DRAWNUMBER(DIF>DEA,MACD,BARSLAST(CROSS(DIF,DEA))+1),COLORRED;
DRAWNUMBER(DIF<DEA,MACD,BARSLAST(CROSS(DEA,DIF))+1),COLORCYAN;
MACD上一次条件成立:绿面积总和除以现在的绿面积的比值,感谢!!
作者:
陪练专家
时间:
2016-11-6 16:59
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
T:=BARSLAST(CROSS(MACD,0));
T1:=SUMBARS(T=0,2);
红面积:IF(DIF>DEA,SUM(MACD,BARSLAST(CROSS(DIF,DEA))),DRAWNULL),NODRAW,COLORLIRED;
绿面积:IF(DIF<DEA,SUM(MACD,BARSLAST(CROSS(DEA,DIF))),DRAWNULL),NODRAW,COLORGREEN;
DRAWNUMBER(CROSS(DIF,DEA),DEA,REF(绿面积,1)),COLORGREEN;
DRAWNUMBER(CROSS(DEA,DIF),DEA*1.1,REF(红面积,1)),COLORLIRED;
DRAWNUMBER(DIF>DEA,MACD,BARSLAST(CROSS(DIF,DEA))+1),COLORRED;
DRAWNUMBER(DIF<DEA,MACD,BARSLAST(CROSS(DEA,DIF))+1),COLORCYAN;
M1:=REF(绿面积,T+1);
M2:=REF(绿面积,T1);
绿面积比值:IF(ISLASTBAR AND MACD>0,M1/M2,IF(ISLASTBAR AND MACD<0,绿面积/M1,DRAWNULL)),NODRAW;
欢迎光临 股票论坛 (http://100000w.com/)
Powered by Discuz! X3.2