当前位置:首页 > 股票公式 > 飞狐公式

多周期MACD+支撑压力+画线

时间:2019-04-20 09:41:32 来源:久久财经网 人气:

DIFF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
VARX2:=LLV(DEA1,43);
VARX3:=DEA1-(DIFF1-DEA1);
低点线:=IF(DIFF1<VARX2 AND DEA1=VARX2,MIN(HHV(VARX2,10),VARX3),VARX2);
VL:=REF(LOW,1);
VAR12:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;
VAR14:=MA(VAR12,13);
VAR15:=LLV(LOW,34);
VAR18:=EMA(IF(LOW<=VAR15,VAR14,0),3);
VAR110:=SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,7,1),5,1);
VAR111:=SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,8,1)*15-VAR110*10.38;
T:=FILTER(IF(VAR111<=VAR110 AND VAR18>0,VAR18*8,0),5);
止跌:DRAWTEXT(T AND DIFF1<低点线,DIFF1*1.01,'止跌'),COLORYELLOW;
{中周期}
DIFF: EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE,LINETHICK2;
DEA:EMA(DIFF,9),COLORYELLOW,LINETHICK2;
MACD: 2*(DIFF-DEA),COLORSTICK;
{形态}
A:=IF(CROSS(0,DEA),1,0);
A11:=IF(DIFF<0 AND CROSS(DIFF,DEA),1,0);
SS:=IF(A,SUM(A11,0),0);
SSB:=HHV(SS,0);
SSS:=SUM(A11,0);
W底:=SSS-SSB=2 AND SSS>REF(SSS,1);
DRAWTEXT(W底,DIFF,'↖W底'),COLORYELLOW;
{画趋势线}
M:=INTPART(3*10/5);
A12:=REF(DIFF,M)=HHV(DIFF,2*M+1);
B12:=FILTER(A12,M);
C12:=BACKSET(B12,M+1);
D12:=FILTER(C12,M);{高点}
R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1);
短压:DRAWLINE(D12,DIFF,S112,DIFF,1),COLORFF9966;
M1:=INTPART(3*20/5);
A111:=REF(DIFF,M1)=HHV(DIFF,2*M1+1);
B111:=FILTER(A111,M1);
C111:=BACKSET(B111,M1+1);
D1:=FILTER(C111,M1);{高点}
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S11:=R11>REF(R11,1);
长压:DRAWLINE(D1,DIFF,S11,DIFF,1),COLORFF99FF;
{支撑压力}
绿线天:=BARSLAST(CROSS(DEA,DIFF));
红线天:=BARSLAST(CROSS(DIFF,DEA));
压力:=REF(H,绿线天);
支撑:=REF(O,红线天);
{压力支撑价}
YLZC:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
阻价:=IF(CLOSE=INDEXC,YLZC+INDEXC-INDEXL,YLZC+(CLOSE-LOW));
支价:=IF(CLOSE=INDEXC,INDEXL+INDEXC-YLZC,LOW+(CLOSE-YLZC));
今压:REF(阻价,1),LINETHICK0,COLORAA11BB;
今撑:REF(支价,1),LINETHICK0,COLOR009900;
明压:阻价,LINETHICK0;

 

下载地址: 多周期MACD+支撑压力+画线

标签 支撑   压力   点线   止跌   周期   红线