通达信优化的股市的大肥羊

n:=120;
KT:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,KT),0));{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,KT),0));{低点}
KJ:=GD-DD;{高低点差值=分区高度}
GD4:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL);
低:IF(CURRBARSCOUNT<=N/30,DD,DRAWNULL),COLORFFFF00;
高:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL),COLOR00FFFF;
支撑:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.191,DRAWNULL),COLOR00FFFF;
强势: IF(CURRBARSCOUNT<=N/30,DD+KJ*0.382,DRAWNULL),COLORFF00FF;
突破:IF(CURRBARSCOUNT<=N/30,DD+KJ/2,DRAWNULL),COLOR0000FF;
警示:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.618,DRAWNULL),COLOR00FFFF;
压力:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.809,DRAWNULL),COLOR00FF00;
低涨:IF(CURRBARSCOUNT<=N/30,(C/LLV(LOW,KT)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;
天数:BARSLAST(L=DD),COLORCYAN,NODRAW;
DRAWBAND(高,RGB(200,200,0),压力,RGB(0,0,0));
DRAWBAND(压力,RGB(0,190,0),警示,RGB(0,0,0));
DRAWBAND(警示,RGB(220,120,0),突破,RGB(0,0,0));
DRAWBAND(突破,RGB(120,0,120),强势,RGB(0,0,0));
DRAWBAND(强势,RGB(120, 0,0),支撑,RGB(0,0,0));
DRAWBAND(支撑,RGB(80,80,80),低,RGB(0,0,0));
STICKLINE(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT<=N/30,支撑,支撑,4,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,4,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,4,0),COLORABABAB;
STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,4,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,4,0),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,高,'● 0.809高位');
DRAWTEXT(ISLASTBAR,压力,'● 0.681压力');
DRAWTEXT(ISLASTBAR,警示,'● 0.5警示');
DRAWTEXT(ISLASTBAR,强势,'● 0.382强势');
DRAWTEXT(ISLASTBAR,支撑,'● 0.191支撑');
DRAWTEXT(ISLASTBAR,低,'● 0.00低位');
M7:MA(C,7),LINETHICK2,COLORYELLOW;
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
黄线上牛股起:=(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,LINETHICK2,COLORYELLOW;
红线上熊出没:=MA(黄线上牛股起,6),COLORRED,LINETHICK2;
DRAWBAND(M7,RGB(150,10,10),黄线上牛股起,RGB(0,120,0));
STICKLINE(C>O,O,C,3,1)COLORRED;
STICKLINE(O>C,O,C,3,0)COLORCYAN;
STICKLINE(C>O,H,L,0,0)COLORRED;
STICKLINE(O>C,H,L,0,0)COLORCYAN;
HH:=100*V/CAPITAL;
VAR1A:=REF(C,1);
VAR4:=(VAR1A-L)/(H-L);
VAR5:=V*VAR4;
VAR6:=ABS(VAR5);
HSL:=VOL/CAPITAL*100;
PT := REF(HIGH,1)-REF(LOW,1);
重心:=(HIGH + LOW + CLOSE)/3;
压力Ⅰ:= 2*重心-LOW;
压力Ⅱ:= 重心 + PT;
支撑Ⅰ:= 2.002*重心-HIGH;
支撑Ⅱ:= 重心 - PT;
DRAWTEXT_FIX(1,0.00,0.0,0,'【换手率解盘】'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HH<2 AND HH>0,0,0.05,0, '★绝对地量:成交低靡,1%—2%'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HH>=2 AND HH<3,0,0.05,0, '★成交温和:2%—3%'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HH>=3 AND HH<5,0,0.05,0, '★成交活跃:3%—5%'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HH>=5 AND HH<8,0,0.05,0, '★带量:5%—8%'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL<=2,0.3,0.05,0, '★该股票少人关注,属于冷门股。'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL>2 AND HSL<3,0.3,0.05,0, '★该股票成交温和,属于备份股。'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL>3 AND HSL<5,0.3,0.05,0, '★该股票的交投越来越活跃,人们购买该股票的意愿高,属于热门股。'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL>5 AND HSL<8,0.3,0.05,0, '★该股票带量!'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL>8 AND HSL<15,0.3,0.05,0, '★该股票放量!'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL>15 AND HSL<25,0.3,0.05,0, '★该股票巨量!'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND HSL>=25,0.3,0.05,0, '★该股票成交怪异!'),COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.10,0,'【压力/支撑解盘】'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.01,0.15,0, '第一压力位:'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.10,0.15,0,压力Ⅰ),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.15,0.15,0,' 元'),COLORFFCC99;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.01,0.20,0, '第一支撑位:'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.10,0.20,0,支撑Ⅰ),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.15,0.20,0,' 元'),COLORFFCC99;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.15,0, '第二压力位:'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.30,0.15,0,压力Ⅱ),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.35,0.15,0,' 元'),COLORFFCC99;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.20,0, '第二支撑位:'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.30,0.20,0,支撑Ⅱ),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.35,0.20,0,' 元'),COLORFFCC99;
趋势线:=MA(CLOSE,55),COLORYELLOW,NODRAW;
BBB:=趋势线+2*STD(CLOSE,120),COLORLIBLUE;
CCC:=趋势线-2*STD(CLOSE,60),COLORRED;
VAR1:=HHV(HIGH,55);
VAR3:=HHV(L,55);
顶:VAR1*0.95,COLORBLUE,LINETHICK2;
底:VAR3*0.88,COLORWHITE,LINETHICK2;
操作:(LLV(HIGH,55)+HHV(LOW,55))/2,COLORLIRED,DOTLINE,LINETHICK1;
操作2:(C*4+L*3+H*2+O)/10,COLORGREEN,DOTLINE,LINETHICK1;
STICKLINE(操作<操作2,操作,操作2,0,-1),COLORRED,LINETHICK2;
STICKLINE(操作>操作2,操作,操作2,0,-1),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(操作2 ,M7) AND 操作2<=底,L-0.3,7);
DRAWICON(CROSS(顶,操作2),H+0.3,8);
MW:=10;
MW1:=CONST(LLVBARS(V,MW));
MW0:IF(CURRBARSCOUNT<=MW+7,CONST(IF(MW1=0,O,REF(O,MW1))),DRAWNULL);
MW2:=IF(CURRBARSCOUNT=MW1+1,MW0,DRAWNULL),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,MW0,'地量反量能评台');
MT1:=IF(ISLASTBAR,REF((C*2-REF(C,3)),1),DRAWNULL);
MT2:=IF(ISLASTBAR,REF((C*2-REF(C,3)),2),DRAWNULL);
MT3:=IF(ISLASTBAR,C*2-REF(C,3),DRAWNULL);
DRAWTEXT(ISLASTBAR,MT2,' ●'),COLORMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,MT1,' ●'),COLORMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,MT3,' ●'),COLORMAGENTA,LINETHICK2;



未来函数检测结果如下:
该公式包含未来函数:CAPITAL

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

N赋值:120

KT赋值:上次CURRBARSCOUNT=N距今天数

GD赋值:CONST(IF(ISLASTBAR=1,KT日内H最高值,0))
{高点}
DD赋值:CONST(IF(ISLASTBAR=1,KT日内L最低值,0))
{低点}
KJ赋值:GD-DD
如果CURRBARSCOUNT<=N/30返回GD否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回DD否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回GD否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回DD+KJ*0.191否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回DD+KJ*0.382否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回DD+KJ/2否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回DD+KJ*0.618否则返回DRAWNULL
如果CURRBARSCOUNT<=N/30返回DD+KJ*0.809否则返回DRAWNULL

低涨:IF(CURRBARSCOUNT<=N/30,(C/KT日内最低价最低值-1)*100,DRAWNULL),COLOR0000FF,NODRAW
输出
天数:上次L=DD距今天数,COLORCYAN,NODRAW

DRAWBAND(高,RGB(200,200,0),压力,RGB(0,0,0))

DRAWBAND(压力,RGB(0,190,0),警示,RGB(0,0,0))

DRAWBAND(警示,RGB(220,120,0),突破,RGB(0,0,0))

DRAWBAND(突破,RGB(120,0,120),强势,RGB(0,0,0))

DRAWBAND(强势,RGB(120, 0,0),支撑,RGB(0,0,0))

DRAWBAND(支撑,RGB(80,80,80),低,RGB(0,0,0))
当满足条件CURRBARSCOUNT=N/30时,在GD和DD之间画柱状线
当满足条件CURRBARSCOUNT=1时,在GD和DD之间画柱状线
当满足条件CURRBARSCOUNT<=N/30时,在支撑和支撑之间画柱状线
当满足条件CURRBARSCOUNT<=N/30时,在强势和强势之间画柱状线
当满足条件CURRBARSCOUNT<=N/30时,在突破和突破之间画柱状线
当满足条件CURRBARSCOUNT<=N/30时,在警示和警示之间画柱状线
当满足条件CURRBARSCOUNT<=N/30时,在压力和压力之间画柱状线
当满足条件ISLASTBAR时,在高和'● 0.809高位'位置书写文字
当满足条件ISLASTBAR时,在压力和'● 0.681压力'位置书写文字
当满足条件ISLASTBAR时,在警示和'● 0.5警示'位置书写文字
当满足条件ISLASTBAR时,在强势和'● 0.382强势'位置书写文字
当满足条件ISLASTBAR时,在支撑和'● 0.191支撑'位置书写文字
当满足条件ISLASTBAR时,在低和'● 0.00低位'位置书写文字
输出
M7:C的7日简单移动平均,LINETHICK2,画黄色

HHJSJDA赋值:(3*收盘价+OPEN+最低价+最高价)/6

黄线上牛股起赋值:(20*HHJSJDA+19*1日前的HHJSJDA+18*2日前的HHJSJDA+17*3日前的HHJSJDA+16*4日前的HHJSJDA+15*5日前的HHJSJDA+14*6日前的HHJSJDA
+13*7日前的HHJSJDA+12*8日前的HHJSJDA+11*9日前的HHJSJDA+10*10日前的HHJSJDA+9*11日前的HHJSJDA+8*12日前的HHJSJDA
+7*13日前的HHJSJDA+6*14日前的HHJSJDA+5*15日前的HHJSJDA+4*16日前的HHJSJDA+3*17日前的HHJSJDA+2*18日前的HHJSJDA+
20日前的HHJSJDA)/210,LINETHICK2,画黄色

红线上熊出没赋值:黄线上牛股起的6日简单移动平均,画红色,LINETHICK2

DRAWBAND(M7,RGB(150,10,10),黄线上牛股起,RGB(0,120,0))
当满足条件C>O时,在O和C之间画柱状线
当满足条件O>C时,在O和C之间画柱状线
当满足条件C>O时,在H和L之间画柱状线
当满足条件O>C时,在H和L之间画柱状线

HH赋值:100*V/当前流通股本

VAR1A赋值:1日前的C

VAR4赋值:(VAR1A-L)/(H-L)

VAR5赋值:V*VAR4

VAR6赋值:VAR5的绝对值

HSL赋值:成交量/当前流通股本*100

PT := 1日前的最高价-1日前的最低价

重心赋值:(最高价 + 最低价 + 收盘价)/3

压力Ⅰ:= 2*重心-最低价

压力Ⅱ:= 重心 + PT

支撑Ⅰ:= 2.002*重心-最高价

支撑Ⅱ:= 重心 - PT
当满足条件1时,在横轴0.00纵轴0.0位置书写文字
当满足条件CURRBARSCOUNT=1 AND HH<2 AND HH>0时,在横轴0纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HH>=2 AND HH<3时,在横轴0纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HH>=3 AND HH<5时,在横轴0纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HH>=5 AND HH<8时,在横轴0纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL<=2时,在横轴0.3纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL>2 AND HSL<3时,在横轴0.3纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL>3 AND HSL<5时,在横轴0.3纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL>5 AND HSL<8时,在横轴0.3纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL>8 AND HSL<15时,在横轴0.3纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL>15 AND HSL<25时,在横轴0.3纵轴0.05位置书写文字
当满足条件CURRBARSCOUNT=1 AND HSL>=25时,在横轴0.3纵轴0.05位置书写文字
当满足条件1时,在横轴0.00纵轴0.10位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.01纵轴0.15位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.10纵轴0.15位置书写数字
当满足条件CURRBARSCOUNT=1时,在横轴0.15纵轴0.15位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.01纵轴0.20位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.10纵轴0.20位置书写数字
当满足条件CURRBARSCOUNT=1时,在横轴0.15纵轴0.20位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.21纵轴0.15位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.30纵轴0.15位置书写数字
当满足条件CURRBARSCOUNT=1时,在横轴0.35纵轴0.15位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.21纵轴0.20位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.30纵轴0.20位置书写数字
当满足条件CURRBARSCOUNT=1时,在横轴0.35纵轴0.20位置书写文字

趋势线赋值:收盘价的55日简单移动平均,画黄色,NODRAW

BBB赋值:趋势线+2*收盘价的120估算标准差, 画淡蓝色

CCC赋值:趋势线-2*收盘价的60估算标准差,画红色

VAR1赋值:55日内最高价最高值

VAR3赋值:55日内L最高值
输出
顶:VAR1*0.95, 画蓝色,LINETHICK2
输出
底:VAR3*0.88,画白色,LINETHICK2
输出
操作:(55日内最高价最低值+55日内最低价最高值)/2,COLORLIRED,DOTLINE,LINETHICK1

操作2:(C*4+L*3+H*2+O)/10,COLORGREEN,DOTLINE,LINETHICK1
当满足条件操作<操作2时,在操作和操作2之间画柱状线
当满足条件操作>操作2时,在操作和操作2之间画柱状线

DRAWICON(操作2 上穿M7 AND 操作2<=底,L-0.3,7)

DRAWICON(顶上穿操作2,H+0.3,8)

MW赋值:10

MW1:=CONST(LLVBARS(V,MW))

MW0:IF(CURRBARSCOUNT<=MW+7,CONST(IF(MW1=0,O,MW1日前的O)),DRAWNULL)
如果CURRBARSCOUNT=MW1+1返回MW0否则返回DRAWNULL
当满足条件ISLASTBAR时,在MW0和'地量反量能评台'位置书写文字
MT1赋值:IF(ISLASTBAR,REF((C*2-REF(C,3)),1),DRAWNULL)

MT2赋值:IF(ISLASTBAR,REF((C*2-REF(C,3)),2),DRAWNULL)

MT3赋值:IF(ISLASTBAR,C*2-3日前的C,DRAWNULL)
当满足条件ISLASTBAR时,在MT2和' ●'位置书写文字
当满足条件ISLASTBAR时,在MT1和' ●'位置书写文字
当满足条件ISLASTBAR时,在MT3和' ●'位置书写文字

指标安装下载帮助  |   联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:指标公式网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图