双线持币单线持股+MACD主图指标 (源码)
大智慧双线持币单线持股+MACD主图指标公式源码如下:
DRAWGBKLAST(v>1,STRIP(RGB(0,40,0),RGB(0,0,0),0));
MA5:MA(CLOSE,5),PRECIS2,COLORred,linethick2;
MA10:MA(CLOSE,10),PRECIS2,color009900,linethick1;
MA20:MA(CLOSE,20),linethick1;
MA30:MA(CLOSE,30),PRECIS2,colorffffFF,linethick1;
{K线}
STICKLINE(CLOSE>OPEN,HIGH,LOW,0.5,0 ),COLOR0000FF;
STICKLINE(OPEN>=CLOSE,HIGH,LOW,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR006600;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000466;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000499;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0003bb;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0002dd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0001ff;
LC:=REF(C,1);
卖黄金:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(CROSS(80,卖黄金) ,high*1.04,'顶'),COLOR00ffFF,ALIGN1,LINETHICK1;
STICKLINE(CROSS(80,卖黄金) AND C<O,H,L,2,0),COLOR00ffff,LAYER0;
STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,12,0 ),COLOR007777,LAYER0;
STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,8,0 ),COLOR009999,LAYER0;
STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,6,0 ),COLOR00BBBB,LAYER0;
STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,4,0 ),COLOR00DDDD,LAYER0;
STICKLINE(CROSS(80,卖黄金) AND C<O,C,O,2 ,0 ),COLOR00ffff,LAYER0;
双线持币:HHV(MA(HIGH,2),3)*1.08,COLORGREEN,LINETHICK1;
单线持股:LLV(MA(HIGH,2),1)*1.08,COLORRED,LINETHICK2;
FILLRGN(双线持币,单线持股,双线持币>单线持股,RGB(0,0,255)),LINETHICK2,LAYER7;
PARTLINE(单线持股 ,(单线持股>REF(单线持股,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),LINETHICK3,LAYER0;
{www.gpxiazai.com 股票软件下载网_股票大智慧指标公式}
gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
STICKLINE(DISPSTATUS=2 and c>=今日阻力,今日阻力,今日阻力,20,0),ColorRED;
STICKLINE(DISPSTATUS=2 and c<今日阻力,今日阻力,今日阻力,20,0),Color00FFFF;
STICKLINE(DISPSTATUS=2 and c>=今日支撑,今日支撑,今日支撑,20,0),ColorFF00FF;
STICKLINE(DISPSTATUS=2 and c<今日支撑,今日支撑,今日支撑,20,0),Color00ADFF;
DRAWTEXTABS(410,5,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),Colorred,linethick5;
DRAWTEXTABS(600,5,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),Color00FFFF,linethick5;
X:=BARSLAST(DISPSTATUS=1)+1;
E:=llvall(llv(l,x))*0.95;
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),COLOR0000FF,LINETHICK0;
DEA : EMA(DIFF,9),COLOR00FF00,LINETHICK0;
MACD : 2*(DIFF-DEA),LINETHICK0;
STICKLINE(MACD>0,E+MACD,E,12,0),Color0000FF;
STICKLINE(MACD<0,E+MACD,E,12,0),Color00FF00;
DRAWGBK(DIFF>DEA,STRIP(RGB(0,0,255),RGB(140,0,80),0)),LAYER0;
VERTLINE(CROSS(REF(WMA(C,15),1),WMA(C,15)) AND MACD>0 ,2),LAYER0,COLOR00FFFF;
- 上一篇公式:动态MA主图指标 (源码)
- 下一篇公式:牛股指标 (源码)