跌幅共振通达信公式 副图 源码附图
CD:=60;
CDZQ:=50;
CDCQ:=30;
TD:=60;
TDZQ:=50;
TDCQ:=30;
趋势:=3*SMA((C-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,5,1)-2*SMA(SMA((C-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,5,1),3,1),COLORGRAY;
短期:0;
中期:1;
长期:2;
3;
M5:=MA(O,5);
M8:=MA(O,8);
M13:=MA(O,13);
M21:=MA(O,21);
M34:=MA(O,34);
M55:=MA(O,55),LINETHICK2;
M89:=MA(O,89),LINETHICK2;
M144:=MA(O,144),LINETHICK2;
M233:=MA(O,233),LINETHICK2;
M377:=MA(O,377),LINETHICK2;
M610:=MA(O,610),LINETHICK2;
M987:=MA(O,987),LINETHICK2;
M1597:=MA(O,1597),LINETHICK2;
M2584:=MA(O,2584),LINETHICK2;
M4181:=MA(O,4181),LINETHICK2;
MZZQ:=MA(O,BARSCOUNT(C)),LINETHICK2;
M5下穿21:=CROSS(M21,M5);
M5上穿21:=CROSS(M5,M21);
T:=BARSLAST(M5下穿21);
T1:=BARSLAST(M5上穿21);
前高价:=FINDHIGH(HHV(H,5),T,21,1),LINETHICK4;
前低价:=FINDHIGH(LLV(L,5),T1,21,1);
M21下穿89:=CROSS(M89,M21);
M21上穿89:=CROSS(M21,M89);
T3:=BARSLAST(M21下穿89);
T4:=BARSLAST(M21上穿89);
前高价1:=FINDHIGH(HHV(H,8),T3,34,1),LINETHICK4;
前低价1:=FINDHIGH(LLV(L,8),T4,34,1);
M89下穿ZZQ:=CROSS(MZZQ,M55);
M89上穿ZZQ:=CROSS(M55,MZZQ);
T5:=BARSLAST(M89下穿ZZQ);
T6:=BARSLAST(M89上穿ZZQ);
前高价2:=FINDHIGH(HHV(H,13),T5,89,1),LINETHICK4;
前低价2:=FINDHIGH(LLV(L,13),T6,89,1);
QLLV:=前低价/H,LINETHICK2;
QLLV1:=前低价1/H,LINETHICK2;
QLLV2:=前低价2/H,LINETHICK2;
{公式网}
QHHV:=L/前高价;
QHHV1:=L/前高价1;
QHHV2:=L/前高价2;
QUL01:=RANGE(QLLV2,0.95,1.00);
QUL05:=RANGE(QLLV2,0.90,0.95);
QUL10:=RANGE(QLLV2,0.85,0.90);
QUL15:=RANGE(QLLV2,0.80,0.85);
QUL20:=RANGE(QLLV2,0.75,0.80);
QUL25:=RANGE(QLLV2,0.70,0.75);
QUL30:=RANGE(QLLV2,0.65,0.70);
QUL35:=RANGE(QLLV2,0.60,0.65);
QUL40:=RANGE(QLLV2,0.55,0.60);
QUL45:=RANGE(QLLV2,0.5,0.55);
QUL50:=RANGE(QLLV2,0.45,0.5);
QUL55:=RANGE(QLLV2,0.4,0.45);
QUL60:=RANGE(QLLV2,0.35,0.4);
QUL65:=RANGE(QLLV2,0.3,0.35);
QUL70:=RANGE(QLLV2,0.25,0.3);
QUL75:=RANGE(QLLV2,0.2,0.25);
QUL80:=RANGE(QLLV2,0.15,0.2);
QUL85:=RANGE(QLLV2,0.1,0.15);
QUL90:=RANGE(QLLV2,0.05,0.1);
QUL95:=RANGE(QLLV2,0,0.05);
QUL99:=RANGE(QLLV2,0,0.01);
QU01:=RANGE(QHHV2,0.95,1.00);
QU05:=RANGE(QHHV2,0.90,0.95);
QU10:=RANGE(QHHV2,0.85,0.90);
QU15:=RANGE(QHHV2,0.80,0.85);
QU20:=RANGE(QHHV2,0.75,0.80);
QU25:=RANGE(QHHV2,0.70,0.75);
QU30:=RANGE(QHHV2,0.65,0.70);
QU35:=RANGE(QHHV2,0.60,0.65);
QU40:=RANGE(QHHV2,0.55,0.60);
QU45:=RANGE(QHHV2,0.5,0.55);
QU50:=RANGE(QHHV2,0.45,0.5);
QU55:=RANGE(QHHV2,0.4,0.45);
QU60:=RANGE(QHHV2,0.35,0.4);
QU65:=RANGE(QHHV2,0.3,0.35);
QU70:=RANGE(QHHV2,0.25,0.3);
QU75:=RANGE(QHHV2,0.2,0.25);
QU80:=RANGE(QHHV2,0.15,0.2);
QU85:=RANGE(QHHV2,0.1,0.15);
QU90:=RANGE(QHHV2,0.05,0.1);
QU95:=RANGE(QHHV2,0.01,0.05);
QU99:=RANGE(QHHV2,0,0.01);
QHHVT00:IF(QHHV<=CD/100 AND CROSS(5,趋势),0.3,0),COLORRED,LINETHICK2;
QHHVT01:IF(QHHV<=CD/100 AND CROSS(趋势,5),0.6,0),COLORLIRED,LINETHICK2;
QHHVT10:IF(QHHV1<=CDZQ/100 AND CROSS(5,趋势),1.3, 1),COLORRED,LINETHICK2;
QHHVT11:IF(QHHV1<=CDZQ/100 AND CROSS(趋势,5),1.6, 1),COLORLIRED,LINETHICK2;
QHHVT20:IF(QHHV2<=CDCQ/100 AND CROSS(5,趋势),2.3, 2),COLORRED,LINETHICK2;
QHHVT21:IF(QHHV2<=CDCQ/100 AND CROSS(趋势,5),2.6, 2),COLORLIRED,LINETHICK2;
QLLVT00:IF(QLLV<=TD/100 AND CROSS(趋势,90),-0.6,0),COLORBLUE,LINETHICK2;
QLLVT01:IF(QLLV<=TD/100 AND CROSS(90,趋势),-0.6,0),COLORLIBLUE,LINETHICK2;
QLLVT10:IF(QLLV1<=TDZQ/100 AND CROSS(趋势,90),0.6,1),COLORBLUE,LINETHICK2;
QLLVT11:IF(QLLV1<=TDZQ/100 AND CROSS(90,趋势),0.6,1),COLORLIBLUE,LINETHICK2;
QLLVT20:IF(QLLV2<=TDCQ/100 AND CROSS(趋势,90),1.6,2),COLORBLUE,LINETHICK2;
QLLVT21:IF(QLLV2<=TDCQ/100 AND CROSS(90,趋势),1.6,2),COLORLIBLUE,LINETHICK2;
DRAWTEXT(QHHVT00=0.3 AND QU10=1 ,0.6,'1');
DRAWTEXT(QHHVT00=0.3 AND QU15=1 ,-0.2,'15');
DRAWTEXT(QHHVT00=0.3 AND QU20=1 ,0.6,'2');
DRAWTEXT(QHHVT00=0.3 AND QU25=1 ,-0.2,'25');
DRAWTEXT(QHHVT00=0.3 AND QU30=1 ,0.6,'3');
DRAWTEXT(QHHVT00=0.3 AND QU35=1 ,-0.2,'35');
DRAWTEXT(QHHVT00=0.3 AND QU40=1 ,0.6,'4');
DRAWTEXT(QHHVT00=0.3 AND QU45=1 ,-0.2,'45');
DRAWTEXT(QHHVT00=0.3 AND QU50=1 ,0.6,'5');
DRAWTEXT(QHHVT00=0.3 AND QU55=1 ,-0.2,'55');
DRAWTEXT(QHHVT00=0.3 AND QU60=1 ,0.6,'6');
DRAWTEXT(QHHVT00=0.3 AND QU65=1 ,-0.2,'65');
DRAWTEXT(QHHVT00=0.3 AND QU70=1 ,0.6,'7');
DRAWTEXT(QHHVT00=0.3 AND QU75=1 ,-0.2,'75');
DRAWTEXT(QHHVT00=0.3 AND QU80=1 ,0.6,'8');
DRAWTEXT(QHHVT00=0.3 AND QU85=1 ,-0.2,'85');
DRAWTEXT(QHHVT00=0.3 AND QU90=1 ,0.6,'9');
DRAWTEXT(QHHVT00=0.3 AND QU95=1 ,-0.2,'95');
DRAWTEXT(QLLVT00=-0.6 AND QUL10=1 ,0.6,'1');
DRAWTEXT(QLLVT00=-0.6 AND QUL15=1 ,1.2,'15');
DRAWTEXT(QLLVT00=-0.6 AND QUL20=1 ,0.6,'2');
DRAWTEXT(QLLVT00=-0.6 AND QUL25=1 ,1.2,'25');
DRAWTEXT(QLLVT00=-0.6 AND QUL30=1 ,0.6,'3');
DRAWTEXT(QLLVT00=-0.6 AND QUL35=1 ,1.2,'35');
DRAWTEXT(QLLVT00=-0.6 AND QUL40=1 ,0.6,'4');
DRAWTEXT(QLLVT00=-0.6 AND QUL45=1 ,1.2,'45');
DRAWTEXT(QLLVT00=-0.6 AND QUL50=1 ,0.6,'5');
DRAWTEXT(QLLVT00=-0.6 AND QUL55=1 ,1.2,'55');
DRAWTEXT(QLLVT00=-0.6 AND QUL60=1 ,0.6,'6');
DRAWTEXT(QLLVT00=-0.6 AND QUL65=1 ,1.2,'65');
DRAWTEXT(QLLVT00=-0.6 AND QUL70=1 ,0.6,'7');
DRAWTEXT(QLLVT00=-0.6 AND QUL75=1 ,1.2,'75');
DRAWTEXT(QLLVT00=-0.6 AND QUL80=1 ,0.6,'8');
DRAWTEXT(QLLVT00=-0.6 AND QUL85=1 ,1.2,'85');
DRAWTEXT(QLLVT00=-0.6 AND QUL90=1 ,0.6,'9');
DRAWTEXT(QLLVT00=-0.6 AND QUL95=1 ,1.2,'95');
DRAWTEXT(ISLASTBAR=1,0,'短期');
DRAWTEXT(ISLASTBAR=1,1,'中期');
DRAWTEXT(ISLASTBAR=1,2,'长期');
未来函数检测结果如下:
该公式包含未来函数:DHIGH
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
CD赋值:60
CDZQ:=50
CDCQ:=30
TD赋值:60
TDZQ:=50
TDCQ:=30
趋势赋值:3*SMA((C-34日内最低价最低值)/(34日内最高价最高值-34日内最低价最低值)*100,5,1)-2*SMA(SMA((C-34日内最低价最低值)/(34日内最高价最高值-34日内最低价最低值)*100,5,1),3,1),COLORGRAY
输出
短期:0
输出
中期:1
输出
长期:2
3
M5赋值:O的5日简单移动平均
M8赋值:O的8日简单移动平均
M13赋值:O的13日简单移动平均
M21赋值:O的21日简单移动平均
M34赋值:O的34日简单移动平均
M55:=O的55日简单移动平均, 线宽为2
M89:=O的89日简单移动平均, 线宽为2
M144赋值:O的144日简单移动平均, 线宽为2
M233赋值:O的233日简单移动平均, 线宽为2
M377赋值:O的377日简单移动平均, 线宽为2
M610赋值:O的610日简单移动平均, 线宽为2
M987赋值:O的987日简单移动平均, 线宽为2
M1597赋值:O的1597日简单移动平均, 线宽为2
M2584赋值:O的2584日简单移动平均, 线宽为2
M4181赋值:O的4181日简单移动平均, 线宽为2
MZZQ赋值:MA(O,C的有效数据周期数), 线宽为2
M5下穿21:=M21上穿M5
M5上穿21:=M5上穿M21
T赋值:上次M5下穿21距今天数
T1:=上次M5上穿21距今天数
前高价赋值:FIND最高价(5日内H最高值,T,21,1),LINETHICK4
前低价赋值:FIND最高价(5日内L最低值,T1,21,1)
M21下穿89:=M89上穿M21
M21上穿89:=M21上穿M89
T3:=上次M21下穿89距今天数
T4:=上次M21上穿89距今天数
前高价1:=FIND最高价(8日内H最高值,T3,34,1),LINETHICK4
前低价1:=FIND最高价(8日内L最低值,T4,34,1)
M89下穿ZZQ:=MZZQ上穿M55
M89上穿ZZQ:=M55上穿MZZQ
T5:=上次M89下穿ZZQ距今天数
T6:=上次M89上穿ZZQ距今天数
前高价2:=FIND最高价(13日内H最高值,T5,89,1),LINETHICK4
前低价2:=FIND最高价(13日内L最低值,T6,89,1)
QLLV赋值:前低价/H, 线宽为2
QLLV1:=前低价1/H, 线宽为2
QLLV2:=前低价2/H, 线宽为2
{公式网}
QHHV赋值:L/前高价
QHHV1赋值:L/前高价1
QHHV2赋值:L/前高价2
QUL01赋值:RANGE(QLLV2,0.95,1.00)
QUL05赋值:RANGE(QLLV2,0.90,0.95)
QUL10赋值:RANGE(QLLV2,0.85,0.90)
QUL15赋值:RANGE(QLLV2,0.80,0.85)
QUL20赋值:RANGE(QLLV2,0.75,0.80)
QUL25赋值:RANGE(QLLV2,0.70,0.75)
QUL30赋值:RANGE(QLLV2,0.65,0.70)
QUL35赋值:RANGE(QLLV2,0.60,0.65)
QUL40赋值:RANGE(QLLV2,0.55,0.60)
QUL45赋值:RANGE(QLLV2,0.5,0.55)
QUL50赋值:RANGE(QLLV2,0.45,0.5)
QUL55赋值:RANGE(QLLV2,0.4,0.45)
QUL60赋值:RANGE(QLLV2,0.35,0.4)
QUL65赋值:RANGE(QLLV2,0.3,0.35)
QUL70赋值:RANGE(QLLV2,0.25,0.3)
QUL75赋值:RANGE(QLLV2,0.2,0.25)
QUL80赋值:RANGE(QLLV2,0.15,0.2)
QUL85赋值:RANGE(QLLV2,0.1,0.15)
QUL90赋值:RANGE(QLLV2,0.05,0.1)
QUL95赋值:RANGE(QLLV2,0,0.05)
QUL99赋值:RANGE(QLLV2,0,0.01)
QU01赋值:RANGE(QHHV2,0.95,1.00)
QU05赋值:RANGE(QHHV2,0.90,0.95)
QU10赋值:RANGE(QHHV2,0.85,0.90)
QU15赋值:RANGE(QHHV2,0.80,0.85)
QU20赋值:RANGE(QHHV2,0.75,0.80)
QU25赋值:RANGE(QHHV2,0.70,0.75)
QU30赋值:RANGE(QHHV2,0.65,0.70)
QU35赋值:RANGE(QHHV2,0.60,0.65)
QU40赋值:RANGE(QHHV2,0.55,0.60)
QU45赋值:RANGE(QHHV2,0.5,0.55)
QU50赋值:RANGE(QHHV2,0.45,0.5)
QU55赋值:RANGE(QHHV2,0.4,0.45)
QU60赋值:RANGE(QHHV2,0.35,0.4)
QU65赋值:RANGE(QHHV2,0.3,0.35)
QU70赋值:RANGE(QHHV2,0.25,0.3)
QU75赋值:RANGE(QHHV2,0.2,0.25)
QU80赋值:RANGE(QHHV2,0.15,0.2)
QU85赋值:RANGE(QHHV2,0.1,0.15)
QU90赋值:RANGE(QHHV2,0.05,0.1)
QU95赋值:RANGE(QHHV2,0.01,0.05)
QU99赋值:RANGE(QHHV2,0,0.01)
输出
QHHVT00:IF(QHHV<=CD/100 AND 5上穿趋势,0.3,0),画红色, 线宽为2
输出
QHHVT01:IF(QHHV<=CD/100 AND 趋势上穿5,0.6,0),COLORLIRED, 线宽为2
输出
QHHVT10:IF(QHHV1<=CDZQ/100 AND 5上穿趋势,1.3, 1),画红色, 线宽为2
输出
QHHVT11:IF(QHHV1<=CDZQ/100 AND 趋势上穿5,1.6, 1),COLORLIRED, 线宽为2
输出
QHHVT20:IF(QHHV2<=CDCQ/100 AND 5上穿趋势,2.3, 2),画红色, 线宽为2
输出
QHHVT21:IF(QHHV2<=CDCQ/100 AND 趋势上穿5,2.6, 2),COLORLIRED, 线宽为2
QLLVT00:IF(QLLV<=TD/100 AND 趋势上穿90,-0.6,0), 画蓝色, 线宽为2
QLLVT01:IF(QLLV<=TD/100 AND 90上穿趋势,-0.6,0),COLORLIBLUE, 线宽为2
QLLVT10:IF(QLLV1<=TDZQ/100 AND 趋势上穿90,0.6,1), 画蓝色, 线宽为2
QLLVT11:IF(QLLV1<=TDZQ/100 AND 90上穿趋势,0.6,1),COLORLIBLUE, 线宽为2
QLLVT20:IF(QLLV2<=TDCQ/100 AND 趋势上穿90,1.6,2), 画蓝色, 线宽为2
QLLVT21:IF(QLLV2<=TDCQ/100 AND 90上穿趋势,1.6,2),COLORLIBLUE, 线宽为2
当满足条件QHHVT00=0.3 AND QU10=1 时,在0.6和'1'位置书写文字
当满足条件QHHVT00=0.3 AND QU15=1 时,在-0.2和'15'位置书写文字
当满足条件QHHVT00=0.3 AND QU20=1 时,在0.6和'2'位置书写文字
当满足条件QHHVT00=0.3 AND QU25=1 时,在-0.2和'25'位置书写文字
当满足条件QHHVT00=0.3 AND QU30=1 时,在0.6和'3'位置书写文字
当满足条件QHHVT00=0.3 AND QU35=1 时,在-0.2和'35'位置书写文字
当满足条件QHHVT00=0.3 AND QU40=1 时,在0.6和'4'位置书写文字
当满足条件QHHVT00=0.3 AND QU45=1 时,在-0.2和'45'位置书写文字
当满足条件QHHVT00=0.3 AND QU50=1 时,在0.6和'5'位置书写文字
当满足条件QHHVT00=0.3 AND QU55=1 时,在-0.2和'55'位置书写文字
当满足条件QHHVT00=0.3 AND QU60=1 时,在0.6和'6'位置书写文字
当满足条件QHHVT00=0.3 AND QU65=1 时,在-0.2和'65'位置书写文字
当满足条件QHHVT00=0.3 AND QU70=1 时,在0.6和'7'位置书写文字
当满足条件QHHVT00=0.3 AND QU75=1 时,在-0.2和'75'位置书写文字
当满足条件QHHVT00=0.3 AND QU80=1 时,在0.6和'8'位置书写文字
当满足条件QHHVT00=0.3 AND QU85=1 时,在-0.2和'85'位置书写文字
当满足条件QHHVT00=0.3 AND QU90=1 时,在0.6和'9'位置书写文字
当满足条件QHHVT00=0.3 AND QU95=1 时,在-0.2和'95'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL10=1 时,在0.6和'1'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL15=1 时,在1.2和'15'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL20=1 时,在0.6和'2'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL25=1 时,在1.2和'25'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL30=1 时,在0.6和'3'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL35=1 时,在1.2和'35'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL40=1 时,在0.6和'4'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL45=1 时,在1.2和'45'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL50=1 时,在0.6和'5'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL55=1 时,在1.2和'55'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL60=1 时,在0.6和'6'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL65=1 时,在1.2和'65'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL70=1 时,在0.6和'7'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL75=1 时,在1.2和'75'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL80=1 时,在0.6和'8'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL85=1 时,在1.2和'85'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL90=1 时,在0.6和'9'位置书写文字
当满足条件QLLVT00=-0.6 AND QUL95=1 时,在1.2和'95'位置书写文字
当满足条件ISLASTBAR=1时,在0和'短期'位置书写文字
当满足条件ISLASTBAR=1时,在1和'中期'位置书写文字
当满足条件ISLASTBAR=1时,在2和'长期'位置书写文字