大智慧支撑、中期趋势、压力主图公式 源码提供
-
相关简介:一个看支撑压力的主图公式
-
文章来源:股海网作者:117037发布时间:2021-12-14浏览次数:
大智慧主图公式,优化后简单直观。
均线设置;5日均线、10日均线、21日均线、48日均线。(可在指标修改里自改均线参数)
支撑、中期趋势、压力位一目了然。
源码如下:(选择主图公式)
MA5:MA(CLOSE,5),COLORMAGENTA;
MA10:MA(CLOSE,10),colorcyan,LINETHICK2;
MA21:MA(C,21),coloryellow,POINTDOT,LINETHICK3;;
MA48:MA(C,48),COLORFF00FF,PRECIS2,LAYER0;
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
HHJSJDB:(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/210,COLORYELLOW,LINETHICK1;
HHJSJDC:MA(HHJSJDB,5),COLORRED;
W:=BARSLAST(DISPSTATUS=1);
P:=BACKSET(DISPSTATUS=2,W/2+1);
K:=BARSLAST(CROSS(P,0.5));
KJ:=HHVALL(HIGH)-LLVALL(LOW);
VERTLINE(CROSS(P,0.5),4),COLOR00FFFF;
平衡:LLVALL(LOW)+KJ/2,COLOR00FFFF,DOTLINE,PRECIS2;
{FILLRGN(平衡,HHVALL(HIGH),W>K,RGB(0,0,200)),PRECIS2;该行设置背景色}
压力:IF(K>=0,HHVALL(HIGH)-KJ*0.191,平衡),COLORFF00FF,DOTLINE,PRECIS2;
支撑:IF(K>=0,LLVALL(LOW)+KJ*0.191,平衡),COLOR00FF00,DOTLINE,PRECIS2;
{低吸:K>=0 and CROSS(平衡,LOW),COLORFF8899,LINETHICK0,PRECIS2;}
低涨:(C/LLV(LOW,W)-1)*100,COLOR0000FF,LINETHICK0,PRECIS2;
天:BARSLAST(L=LLV(LOW,W)),COLOR00FFFF,LINETHICK0,PRECIS0;
DRAWTEXT(HIGH=HHVALL(HIGH) and K>=0,HIGH*1.01,'←'+NUMTOSTRN(HIGH,2)),COLORFFFFFF;
{DRAWICON(低吸,LOW,6);}
{以下设置提示文字部分}
DRAWTEXT(DISPSTATUS=2,压力,'0.809'),COLOR0000FF,ALIGN0;
DRAWTEXT(DISPSTATUS=2,平衡,'0.500'),COLORFFFFFF,ALIGN0;
DRAWTEXT(DISPSTATUS=2,支撑,'0.191'),COLOR00FFFF,ALIGN0;
DRAWTEXT(K=0,HHVALL(HIGH)-KJ/12,'★强势区域--急拉减仓!'),COLOR00FFFF,ALIGN1;
DRAWTEXT(K=0,HHVALL(HIGH)-KJ/3,'●震荡整理--寻机低吸!'),COLOR00FF00,ALIGN1;
DRAWTEXT(K=0,LLVALL(LOW)+KJ/3,'◆反弹中轨--逢高休息!'),COLORFFFFFF,ALIGN1;
DRAWTEXT(K=0,LLVALL(LOW)+KJ/10,'■弱势区域--暂不参与!'),COLORFFFF00,ALIGN1;
{以下设置个股信息}
DRAWTEXTREL(10,50,'所属板块:'+BKNAME),coloryellow;
DRAWTEXTREL(10,120,'股票名称:'+'【'+STKLABEL+' '+STKNAME+'】'),coloryellow;
{以下设置五彩立体K线}
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),OPEN,CLOSE,7,0),colorred;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),OPEN,CLOSE,7,0),colorcyan;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLORFFBBFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLORFF00FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLORFF22FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLORFF44FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLORFF66FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLORFF88FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLORFF99FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLORFFAAFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLORFFBBFF;