通达信四季牛熊指标公式主图源码


TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR1,10);
MEDIAN:= (HIGH + LOW ) / 2;
上证指数:=INBLOCK('上证A股');
{分析家公式网HTTP://WWW.70822.COM
深证成指:=INBLOCK('深证A股');
平均股价:=C;}
UP:=MEDIAN+ATR * IF(C=上证指数,2.1,2.2);
DN:=MEDIAN-ATR * IF(C=上证指数,2.1,2.2);
L1:=REF(UP,BARSLAST(UP<=REF(UP,1)));
L2:=LLV(UP,15);
LL:=IF(L2=REF(L2,1) AND L1<REF(L1,1),L1,IF(L1=L2,L1,L2));
S1:=BARSLAST(CROSS(0.5,UP=LL))+1 OR BARSLAST(CROSS(1.5,UP=LL))+1 OR BARSLAST(CROSS(2.5,UP=LL))+1 OR BARSLAST(CROSS(3.5,UP=LL))+1,NODRAW;
S2:=CROSS(COUNT((CROSS(C,LL)) AND UP>LL,S1),0.5) OR CROSS(COUNT((CROSS(C,LL)) AND UP>LL,S1),1.5) OR CROSS(COUNT((CROSS(C,LL)) AND UP>LL,S1),2.5) OR CROSS(COUNT((CROSS(C,LL)) AND UP>LL,S1),3.5) OR CROSS(COUNT((CROSS(C,LL)) AND UP>LL,S1),4.5);
A6:=BARSLAST(S2);
B6:=BARSLAST(CROSS(HHV(DN,A6+1),C));
支撑:IF(B6>A6,HHV(DN,BARSLAST(CROSS(B6,A6))+1),DRAWNULL),COLORRED,LINETHICK2;
压力:IF(B6<A6,LLV(UP,BARSLAST(CROSS(A6,B6))+1),DRAWNULL),COLORGREEN,LINETHICK2;
AAA:=(3*C+H+L+O)/6;
VAR1:=EMA(AAA,35);
VAR2:=(HHV(VAR1,5)+HHV(VAR1,15)+HHV(VAR1,30))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,15)+LLV(VAR1,30))/3;
牛线:=(HHV(VAR2,5)+HHV(VAR2,15)+HHV(VAR2,30))/3;
熊线:=(LLV(VAR3,5)+LLV(VAR3,15)+LLV(VAR3,30))/3;
疯熊:=熊线*0.90;
SPRING:=B6>A6;
春:IF(SPRING,1,DRAWNULL),COLOR3D3DFF,NODRAW;
STICKLINE(SPRING AND C>O,O,C,8/3,1),COLOR3D3DFF;
STICKLINE(SPRING AND C>O,H,C,1,1),COLOR3D3DFF;
STICKLINE(SPRING AND C>O,O,L,1,1),COLOR3D3DFF;
STICKLINE(SPRING AND C<O,O,C,8/3,0),COLOR3D3DFF;
STICKLINE(SPRING AND C<O,H,C,1,0),COLOR3D3DFF;
STICKLINE(SPRING AND C<O,O,L,1,0),COLOR3D3DFF;
STICKLINE(SPRING AND C=O,O,C,8/3,0),COLOR3D3DFF;
STICKLINE(SPRING AND C=O,H,C,1,0),COLOR3D3DFF;
STICKLINE(SPRING AND C=O,O,L,1,0),COLOR3D3DFF;
SUMMER:=NOT(AAA<熊线 AND AAA>=疯熊 AND B6<A6) AND NOT(AAA<疯熊) AND NOT(B6>A6);
夏:IF(SUMMER,1,DRAWNULL),COLORYELLOW,NODRAW;
STICKLINE(SUMMER AND C>O,O,C,8/3,1),COLORYELLOW;
STICKLINE(SUMMER AND C>O,H,C,1,1),COLORYELLOW;
STICKLINE(SUMMER AND C>O,O,L,1,1),COLORYELLOW;
STICKLINE(SUMMER AND C<O,O,C,8/3,0),COLORYELLOW;
STICKLINE(SUMMER AND C<O,H,C,1,0),COLORYELLOW;
STICKLINE(SUMMER AND C<O,O,L,1,0),COLORYELLOW;
STICKLINE(SUMMER AND C=O,O,C,8/3,0),COLORYELLOW;
STICKLINE(SUMMER AND C=O,H,C,1,0),COLORYELLOW;
STICKLINE(SUMMER AND C=O,O,L,1,0),COLORYELLOW;
AUTUMN:=AAA<熊线 AND AAA>=疯熊 AND B6<A6;
秋:IF(AUTUMN,1,DRAWNULL),COLOR7DC739,NODRAW;
STICKLINE(AUTUMN AND C>O,O,C,8/3,1),COLOR7DC739;
STICKLINE(AUTUMN AND C>O,H,C,1,1),COLOR7DC739;
STICKLINE(AUTUMN AND C>O,O,L,1,1),COLOR7DC739;
STICKLINE(AUTUMN AND C<O,O,C,8/3,0),COLOR7DC739;
STICKLINE(AUTUMN AND C<O,H,C,1,0),COLOR7DC739;
STICKLINE(AUTUMN AND C<O,O,L,1,0),COLOR7DC739;
STICKLINE(AUTUMN AND C=O,O,C,8/3,0),COLOR7DC739;
STICKLINE(AUTUMN AND C=O,H,C,1,0),COLOR7DC739;
STICKLINE(AUTUMN AND C=O,O,L,1,0),COLOR7DC739;
WINTER:=AAA<疯熊;
冬:IF(WINTER,1,DRAWNULL),COLORFC9D53,NODRAW;
STICKLINE(WINTER AND C>O,O,C,8/3,1),COLORFC9D53;
STICKLINE(WINTER AND C>O,H,C,1,1),COLORFC9D53;
STICKLINE(WINTER AND C>O,O,L,1,1),COLORFC9D53;
STICKLINE(WINTER AND C<O,O,C,8/3,0),COLORFC9D53;
STICKLINE(WINTER AND C<O,H,C,1,0),COLORFC9D53;
STICKLINE(WINTER AND C<O,O,L,1,0),COLORFC9D53;
STICKLINE(WINTER AND C=O,O,C,8/3,0),COLORFC9D53;
STICKLINE(WINTER AND C=O,H,C,1,0),COLORFC9D53;




来函数检测结果如下:
该公式没有未来函数

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

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

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