通达信北沙月周日macd框主图公式
绿柱最高价:IF(天数1>=0 AND REFX(TS1>=1,BARSNEXT(ISLASTBAR)),CONST(HHV(H,TS1)),DRAWNULL),COLORLIBLUE;
绿柱最低价:IF(天数1>=0 AND REFX(TS1>=1,BARSNEXT(ISLASTBAR)),CONST(LLV(L,TS1)),DRAWNULL),COLORLIBLUE;
STICKLINE(起点1,绿柱最高价,绿柱最低价,0,-1),COLORLIBLUE;
STICKLINE(ISLASTBAR,绿柱最高价,绿柱最低价,0,-1),COLORLIBLUE;
DRAWBAND(绿柱最高价,RGB(0,100,100),绿柱最低价,RGB(120,80,0));
{周金叉红柱}
ZJC:="MACD.MACD#WEEK"<0;
ZTS:=BARSLAST(ZJC),NODRAW;
Z起点:=FILTERX(ZTS=1,BARSSINCE(C));
Z终点:=FILTERX(ZTS>=1 AND REFX(ZTS,1)=0,BARSSINCE(C));
Z天数:=BARSLAST(Z起点);
Z红柱最高价:IF(Z天数>=0 AND REFX(ZTS>=1,BARSNEXT(ISLASTBAR)),CONST(HHV(H,ZTS)),DRAWNULL),COLORMAGENTA;
Z红柱最低价:IF(Z天数>=0 AND REFX(ZTS>=1,BARSNEXT(ISLASTBAR)),CONST(LLV(L,ZTS)),DRAWNULL),COLORMAGENTA;
STICKLINE(Z起点,Z红柱最高价,Z红柱最低价,0,-1),COLORMAGENTA;
STICKLINE(ISLASTBAR,Z红柱最高价,Z红柱最低价,0,-1),COLORMAGENTA;
DRAWBAND(Z红柱最高价,RGB(100,0,100),Z红柱最低价,RGB(50,150,200));
{周死叉绿柱}
ZSC:="MACD.MACD#WEEK">0;
ZTS1:=BARSLAST(ZSC),NODRAW;
Z起点1:=FILTERX(ZTS1=1,BARSSINCE(C));
Z终点1:=FILTERX(ZTS1>=1 AND REFX(ZTS1,1)=0,BARSSINCE(C));
Z天数1:=BARSLAST(Z起点1);
Z绿柱最高价:IF(Z天数1>=0 AND REFX(ZTS1>=1,BARSNEXT(ISLASTBAR)),CONST(HHV(H,ZTS1)),DRAWNULL),COLORGREEN;
Z绿柱最低价:IF(Z天数1>=0 AND REFX(ZTS1>=1,BARSNEXT(ISLASTBAR)),CONST(LLV(L,ZTS1)),DRAWNULL),COLORGREEN;
STICKLINE(Z起点1,Z绿柱最高价,Z绿柱最低价,0,-1),COLORGREEN;
STICKLINE(ISLASTBAR,Z绿柱最高价,Z绿柱最低价,0,-1),COLORGREEN;
DRAWBAND(Z绿柱最高价,RGB(50,150,200),Z绿柱最低价,RGB(100,0,100));
{日金叉红柱}
RJC:="MACD.MACD#DAY"<0;
RTS:=BARSLAST(RJC),NODRAW;
R起点:=FILTERX(RTS=1,BARSSINCE(C));
R终点:=FILTERX(RTS>=1 AND REFX(RTS,1)=0,BARSSINCE(C));
R天数:=BARSLAST(R起点);
R红柱最高价:IF(R天数>=0 AND REFX(RTS>=1,BARSNEXT(ISLASTBAR)),CONST(HHV(H,RTS)),DRAWNULL),COLORMAGENTA;
R红柱最低价:IF(R天数>=0 AND REFX(RTS>=1,BARSNEXT(ISLASTBAR)),CONST(LLV(L,RTS)),DRAWNULL),COLORMAGENTA;
STICKLINE(R起点,R红柱最高价,R红柱最低价,0,-1),COLORMAGENTA;
STICKLINE(ISLASTBAR,R红柱最高价,R红柱最低价,0,-1),COLORMAGENTA;
DRAWBAND(R红柱最高价,RGB(220,120,120),R红柱最低价,RGB(80,80,80));
{日死叉绿柱}
RSC:="MACD.MACD#DAY">0;
RTS1:=BARSLAST(RSC),NODRAW;
R起点1:=FILTERX(RTS1=1,BARSSINCE(C));
R终点1:=FILTERX(RTS1>=1 AND REFX(RTS1,1)=0,BARSSINCE(C));
R天数1:=BARSLAST(R起点1);
R绿柱最高价:IF(R天数1>=0 AND REFX(RTS1>=1,BARSNEXT(ISLASTBAR)),CONST(HHV(H,RTS1)),DRAWNULL),COLORGREEN;
R绿柱最低价:IF(R天数1>=0 AND REFX(RTS1>=1,BARSNEXT(ISLASTBAR)),CONST(LLV(L,RTS1)),DRAWNULL),COLORGREEN;
STICKLINE(R起点1,R绿柱最高价,R绿柱最低价,0,-1),COLORGREEN;
STICKLINE(ISLASTBAR,R绿柱最高价,R绿柱最低价,0,-1),COLORGREEN;
DRAWBAND(R绿柱最高价,RGB(80,80,80),R绿柱最低价,RGB(220,120,120));
{公式网 www.gpxiazai.com}
DRAWKLINE(H,O,L,C);
- 上一篇公式:通达信楼猪飞天公式,将你的资金年年翻倍
- 下一篇公式:通达信七道防线公式 有了他大部分不会被套