通达信K线包含关系指标公式

X_1:=HIGH>=REF(HIGH,1) AND LOW>=REF(LOW,1);
X_2:=LOW<=REF(LOW,1) AND HIGH<=REF(HIGH,1);
X_3:=IF(X_1,1,IF(X_2,(-1),0));
X_4:=IF(REF(HIGH,1)>=REF(HIGH,2) AND REF(LOW,1)>=REF(LOW,2),1,IF(REF(LOW,1)<=REF(LOW,2) AND REF(HIGH,1)<=REF(HIGH,2),(-1),0));
X_5:=IF(X_3=0 AND X_4=1,MAX(HIGH,REF(HIGH,1)),IF(X_3=0 AND X_4=(-1),MIN(HIGH,REF(HIGH,1)),HIGH));
X_6:=IF(X_3=0 AND X_4=1,MAX(LOW,REF(LOW,1)),IF(X_3=0 AND X_4=(-1),MIN(LOW,REF(LOW,1)),LOW));
X_7:=HIGH>=REF(X_5,1) AND LOW>=REF(X_6,1);
X_8:=LOW<=REF(X_6,1) AND HIGH<=REF(X_5,1);
X_9:=IF(X_7,1,IF(X_8,(-1),0));
X_10:=IF(REF(X_5,1)>=REF(X_5,2) AND REF(X_6,1)>=REF(X_6,2),1,IF(REF(X_6,1)<=REF(X_6,2) AND REF(X_5,1)<=REF(X_5,2),(-1),0));
X_11:=IF(X_9=0 AND X_10=1,MAX(HIGH,REF(X_5,1)),IF(X_9=0 AND X_10=(-1),MIN(HIGH,REF(X_5,1)),HIGH));
X_12:=IF(X_9=0 AND X_10=1,MAX(LOW,REF(X_6,1)),IF(X_9=0 AND X_10=(-1),MIN(LOW,REF(X_6,1)),LOW));
X_13:=HIGH>=REF(X_11,1) AND LOW>=REF(X_12,1);
X_14:=LOW<=REF(X_12,1) AND HIGH<=REF(X_11,1);
X_15:=IF(X_13,1,IF(X_14,(-1),0));
X_16:=IF(REF(X_11,1)>=REF(X_11,2) AND REF(X_12,1)>=REF(X_12,2),1,IF(REF(X_12,1)<=REF(X_12,2) AND REF(X_11,1)<=REF(X_11,2),(-1),0));
X_17:=IF(X_15=0 AND X_16=1,MAX(HIGH,REF(X_11,1)),IF(X_15=0 AND X_16=(-1),MIN(HIGH,REF(X_11,1)),HIGH));
X_18:=IF(X_15=0 AND X_16=1,MAX(LOW,REF(X_12,1)),IF(X_15=0 AND X_16=(-1),MIN(LOW,REF(X_12,1)),LOW));
X_19:=HIGH>=REF(X_17,1) AND LOW>=REF(X_18,1);
X_20:=LOW<=REF(X_18,1) AND HIGH<=REF(X_17,1);
X_21:=IF(X_19,1,IF(X_20,(-1),0));
X_22:=IF(REF(X_17,1)>=REF(X_17,2) AND REF(X_18,1)>=REF(X_18,2),1,IF(REF(X_18,1)<=REF(X_18,2) AND REF(X_17,1)<=REF(X_17,2),(-1),0));
X_23:=IF(X_21=0 AND X_22=1,MAX(HIGH,REF(X_17,1)),IF(X_21=0 AND X_22=(-1),MIN(HIGH,REF(X_17,1)),HIGH));
X_24:=IF(X_21=0 AND X_22=1,MAX(LOW,REF(X_18,1)),IF(X_21=0 AND X_22=(-1),MIN(LOW,REF(X_18,1)),LOW));
X_25:=HIGH>=REF(X_23,1) AND LOW>=REF(X_24,1);
X_26:=LOW<=REF(X_24,1) AND HIGH<=REF(X_23,1);
X_27:=IF(X_25,1,IF(X_26,(-1),0));
X_28:=IF(REF(X_23,1)>=REF(X_23,2) AND REF(X_24,1)>=REF(X_24,2),1,IF(REF(X_24,1)<=REF(X_24,2) AND REF(X_23,1)<=REF(X_23,2),(-1),0));
X_29:=IF(X_27=0 AND X_28=1,MAX(HIGH,REF(X_23,1)),IF(X_27=0 AND X_28=(-1),MIN(HIGH,REF(X_23,1)),HIGH));
X_30:=IF(X_27=0 AND X_28=1,MAX(LOW,REF(X_24,1)),IF(X_27=0 AND X_28=(-1),MIN(LOW,REF(X_24,1)),LOW));
X_31:=X_29;
X_32:=X_30;
方向:IF(X_31>=REF(X_31,1) AND X_32>=REF(X_32,1),1,IF(X_32<=REF(X_32,1) AND X_31<=REF(X_31,1),(-1),0)),NODRAW,COLORYELLOW;
X_33:=X_31<REFX(HIGH,1) AND X_32>REFX(LOW,1) OR (X_31>REFX(HIGH,1) AND X_32<REFX(LOW,1));
包含关系:X_27=0,NODRAW,COLORWHITE;
合并k线:包含关系 AND X_33!=1,NODRAW,COLORLICYAN;
STICKLINE(方向+1 AND X_33!=1,X_31,X_32,1.8,0),COLORMAGENTA;
STICKLINE(方向-1 AND X_33!=1,X_31,X_32,1.8,0),COLORBLUE;
STICKLINE(合并K线=1,X_31,X_32,0.08,0),COLORWHITE;




未来函数检测结果如下:
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

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