文华财经盘立方多空均线-支撑压力自动画线指标公式源码:
//MA5:=MA(C,5);
//MA10:MA(C,10);
MA20:MA(C,20),COLORRED;
MA60:MA(C,60),COLORGREEN;
TY:=CLOSE;
HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);
LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);
A:=REF(CLOSE,BARSLAST(HD));
B:=REF(CLOSE,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
压力:IF(T1,A,A),COLORFF00FF,NODRAW;
支撑:IF(T2,B,B),COLOR80FF00,NODRAW;
PARTLINE(压力=REF(压力,1), 压力,COLORRED),DOT;
PARTLINE(支撑=REF(支撑,1), 支撑,COLORGREEN),DOT;
//压力线划线后同步在左侧标记压力数值
//支撑线划线后同步在左侧标记支撑数值
TIMES:=IF(DATE<250620,1,0);
DRAWKLINE1(H,O,L,C);
双线上破:=C>=MA20 AND C>=MA60;
双线下破:=C<=MA20 AND C<=MA60;
首上破:=双线上破 AND NOT(REF(双线上破,1));
首下破:=双线下破 AND NOT(REF(双线下破,1));
DRAWCOLORKLINE(首上破 AND TIMES,COLORRED,0);
DRAWCOLORKLINE(首下破 AND TIMES,COLORGREEN,0);
//DRAWICON(双线上破 AND NOT(REF(双线上破,1)),L-7*MINPRICE,'ICO107');
//DRAWICON(双线下破 AND NOT(REF(双线下破,1)),H,'ICO106');
DRAWTEXT(首上破 AND TIMES,L-7*MINPRICE,'强'),FONTSIZE18,COLORRED,ALIGN1;
DRAWTEXT(首下破 AND TIMES,H+4*MINPRICE,'弱'),FONTSIZE18,COLORGREEN,ALIGN1;
//DRAWGBK1(MA20<MA60 AND TIMES,RGB(39,45,39));
//DRAWGBK1(MA20>=MA60 AND TIMES,RGB(45,2,22));
//FILLRGN(TIMES=0,300000,0,COLORRED);
首上破 AND TIMES,SOUND('A');
首下破 AND TIMES,SOUND('B');