黄金法则通达信指标公式源码
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
黄金法则:————————————————————————;
本公式与撑压线为一母双胎指标;都是以缠论高点母本;
本指标是撑压线的简化指标;
与撑压线不同的是:
1.去掉撑压线划线指标;
2.增加单阳测顶与单阴测底;————————————————————————;
本指标包含以下五大功能(废除两项):————————————————————————;
一:黄金分割(自动判断是下跌还是上涨):
1.黄金分割有两种算法,一种用高低区间;一种用低位算法;
2.本公式采用高低区间算法,具体如下:
高位下跌:a:计算高位和前低位的区间;
b:H-区间*黄金分割点;
低位上涨:a:计算低位和前高位的区间;
b:L+区间*黄金分割点;
高位下跌为浅粉红色;
低位上涨为浅姜黄色;————————————————————————;
即下跌有;高位下跌的黄金分割;
上涨也有;低位上涨的黄金分割;————————————————————————;
二:十等分(废除);————————————————————————;
三:单阴测底与单阳测顶(参数写死,不能修改);
采用徐小明的算法:进行测算;
大盘采用正负3%为模;参数:X;
个股采用正负6%为模;参数:Y;
取模周期为低点5T天;参数:D;
总周期为30T,参数:T;
**参数k可以设置是否显示:1显示,0隐藏** ————————————————————————;
四:高低点提示(废除):
1.灰色横线:高点压力低点支撑;
2.白色数字:高低点价格;
高低点线可以看出中枢(箱体)上下沿;————————————————————————;
五:集成简化版九转提示:
黄点:九转“8”;
笑脸哭脸:九转“9”;
……;
—————————————————————————————;
2016-7-23日更新:
1.去除黄金分割的多余显示;即显示低位,前面显示高位的标志-竖线;
2.增加参数K;设置是否显示单阳测顶,单阴测底;
3.增加显示多转显示,默认18,即重点显示9-13-18;
t:=30;
k:=0;
HJ_1:=BACKSET(LLV(LOW,5) HJ_2:=BACKSET(HJ_1=0 AND REF(HJ_1,1)=1,2); HJ_3:=IF(HJ_2=1 AND REF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 AND HJ_10>REF(HJ_11,HJ_8+1) AND HJ_10>REF(HJ_11,HJ_8) AND HJ_10>REF(HJ_10,HJ_9),(-1),0); HJ_22:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1) HJ_23:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR HJ_21=(-1)),(-1),0); HJ_24:=IF(HJ_22=(-1) OR HJ_23=(-1) AND LOW HJ_25:=BARSLAST(HJ_19=1); HJ_26:=BARSLAST(HJ_24=(-1)); HJ_27:=IF(HJ_26<4 AND HHV(HJ_7,HJ_26)!=1 OR REF(HJ_24,HJ_26)=0,1,0); HJ_28:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND HJ_27=1 AND HJ_11>REF(HJ_10,HJ_26+1) AND HJ_11>REF(HJ_10,HJ_26) AND HJ_11>REF(HJ_11,HJ_25),1,0); HJ_29:=IF(HJ_6=1 AND REF(HJ_26,1)>REF(HJ_25,1) AND HHV(HIGH,HJ_26+1)>REF(HHV(HIGH,HJ_26+1),1),1,0); HJ_30:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND REF(HJ_24,HJ_26)=(-1) AND (HJ_26>=4 OR HHV(HJ_7,HJ_26)=1),1,0); HJ_31:=IF(HJ_29=1 OR HJ_30=1 OR HJ_28=1 AND HIGH>REF(LOW,HJ_26+1),1,0); HJ_32:=IF(HJ_25<4 AND HHV(HJ_7,HJ_25)!=1 OR REF(HJ_29,HJ_25)=0,1,0); HJ_33:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND HJ_32=1 AND HJ_10>REF(HJ_11,HJ_25+1) AND HJ_10>REF(HJ_11,HJ_25) AND HJ_10>REF(HJ_10,HJ_26),(-1),0); HJ_34:=IF(HJ_3=(-1) AND REF(HJ_25,1)>REF(HJ_26,1) AND LLV(LOW,HJ_25+1) HJ_35:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND (HJ_25>=4 OR LLV(HJ_7,HJ_25)=(-1) OR HJ_33=(-1)),(-1),0);