【对角戏】乱画角度线 {主图 源码 贴图 }介绍
【对角戏】乱画角度线 {主图 源码 贴图 }
{【对角戏】 - 壹瓣杺埖 }
{请设置参数:HDAY 1 999 15 寻找区间高点
LDAY 1 999 15 寻找区间低点
调点 1 4 3 移动角起点
角度 0 9999 200 调整中心红线角度 }
CURR:=CURRBARSCOUNT;
TCH:=CONST(FINDHIGH(H,0,HDAY*10,1));
GTT:=CONST(BARSLAST(TCH=H))+1;
SX跌H:=CONST(IF(GTT=1,H,REF(H,GTT-1)));
BCL:=CONST(FINDLOW(L,0,LDAY*10,1));
DTT:=CONST(BARSLAST(BCL=L))+1;
SX涨L:=CONST(IF(DTT=1,L,REF(L,DTT-1)));
涨点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L=SX涨L)+1));
跌点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H=SX跌H)+1));
最低:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,涨点,跌点)));
L斜率:=角度/IF(C<300,1000,10);
最高:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,跌点,涨点)));
H斜率:=角度/IF(C<300,1000,10);
IM68:=((SX跌H-SX涨L)/6-(SX跌H-SX涨L)/8);
GH跌X:=SX跌H+(SX跌H-SX涨L)/8; DL涨X:=SX涨L-(SX跌H-SX涨L)/8;
GTHT:=IF(DTT>GTT,DTT,GTT); R:=ABS(GTT-DTT);
DRAWBAND(IF(CURR<=GTHT+R/8,GH跌X,DRAWNULL),RGB(80,124,124),DL涨X,RGB(80,124,124));
DRAWBAND(IF(CURR<=GTHT+R/8,SX跌H,DRAWNULL),RGB(8,168,168),SX跌H,RGB(8,168,168));
DRAWBAND(IF(CURR<=GTHT+R/8,SX涨L,DRAWNULL),RGB(8,168,168),SX涨L,RGB(8,168,168));
DRAWBAND(IF(CURR<=GTHT+R/8,SX跌H-(SX跌H-SX涨L)/8,DRAWNULL),RGB(80,124,24),SX涨L+(SX跌H-SX涨L)/8,RGB(80,124,24));
DRAWBAND(IF(CURR<=GTHT+R/8,SX跌H-(SX跌H-SX涨L)/4,DRAWNULL),RGB(0,124,154),SX涨L+(SX跌H-SX涨L)/4,RGB(0,124,154));
DRAWBAND(IF(CURR<=GTHT+R/8,SX跌H-(SX跌H-SX涨L)*3/8,DRAWNULL),RGB(80,124,24),SX涨L+(SX跌H-SX涨L)*3/8,RGB(80,124,24));
DRAWBAND(IF(CURR<=GTHT+R/8,(SX跌H+SX涨L)/2,DRAWNULL),RGB(8,168,168),(SX跌H+SX涨L)/2,RGB(8,168,168));
DRAWTEXT(CURR=GTHT,SX涨L-IM68,' 壹瓣杺埖 '),COLOR8899AA;
天线:=SX跌H; 地线:=SX涨L;
K:=(天线-地线)/(IF(跌点>=涨点,跌点,涨点)-IF(跌点>=涨点,涨点,跌点));
上斜线:=IF(地线+CONST(L斜率*3.618)*最低>=地线,地线+CONST(L斜率*3.618)*最低,DRAWNULL);
上斜线0:=IF(地线+CONST(L斜率*1.618)*最低>=地线,地线+CONST(L斜率*1.618)*最低,DRAWNULL);
上斜线1:=IF(地线+CONST(L斜率*1.000)*最低>=地线,地线+CONST(L斜率*1.000)*最低,DRAWNULL);
上斜线2:=IF(地线+CONST(L斜率*0.750)*最低>=地线,地线+CONST(L斜率*0.750)*最低,DRAWNULL);
上斜线3:=IF(地线+CONST(L斜率*0.618)*最低>=地线,地线+CONST(L斜率*0.618)*最低,DRAWNULL);
上斜线4:=IF(地线+CONST(L斜率*0.50)*最低>=地线,地线+CONST(L斜率*0.50)*最低,DRAWNULL);
上斜线5:=IF(地线+CONST(L斜率*0.382)*最低>=地线,地线+CONST(L斜率*0.382)*最低,DRAWNULL);
上斜线6:=IF(地线+CONST(L斜率*0.250)*最低>=地线,地线+CONST(L斜率*0.250)*最低,DRAWNULL);
上斜线7:=IF(地线+CONST(L斜率*0.156)*最低>=地线,地线+CONST(L斜率*0.156)*最低,DRAWNULL);
上斜线8:=IF(地线+CONST(L斜率*0.092)*最低>=地线,地线+CONST(L斜率*0.092)*最低,DRAWNULL);
上斜线9:=IF(地线+CONST(L斜率*0.055)*最低>=地线,地线+CONST(L斜率*0.055)*最低,DRAWNULL);
上斜线10:=IF(地线+CONST(L斜率*0.033)*最低>=地线,地线+CONST(L斜率*0.033)*最低,DRAWNULL);
尚10:IF(上斜线10<=天线*1.05,上斜线10,DRAWNULL),COLOR8B2368;
尚9:IF(上斜线9<=天线*1.05,上斜线9,DRAWNULL)COLOR8B2368;
尚8:IF(上斜线8<=天线*1.05,上斜线8,DRAWNULL)COLOR8B2368;
尚7:IF(上斜线7<=天线*1.05,上斜线7,DRAWNULL)COLOR8B2368;
尚6:IF(上斜线6<=天线*1.05,上斜线6,DRAWNULL)COLOR8B2368;
尚5:IF(上斜线5<=天线*1.05,上斜线5,DRAWNULL)COLOR8B2368;
尚4:IF(上斜线4<=天线*1.05,上斜线4,DRAWNULL)COLOR0000FF;
尚3:IF(上斜线3<=天线*1.05,上斜线3,DRAWNULL)COLOR8B2368;
尚2:IF(上斜线2<=天线*1.05,上斜线2,DRAWNULL)COLOR8B2368;
尚1:IF(上斜线1<=天线*1.05,上斜线1,DRAWNULL)COLOR8B2368;
尚0:IF(上斜线0<=天线*1.05,上斜线0,DRAWNULL)COLOR8B2368;
尚:IF(上斜线<=天线*1.05,上斜线,DRAWNULL)COLOR8B2368;
下斜线:=IF(天线-CONST(H斜率*3.618)*最高<=天线,天线-CONST(H斜率*3.618)*最高,DRAWNULL);
下斜线0:=IF(天线-CONST(H斜率*1.618)*最高<=天线,天线-CONST(H斜率*1.618)*最高,DRAWNULL);
下斜线1:=IF(天线-CONST(H斜率*1.000)*最高<=天线,天线-CONST(H斜率*1.000)*最高,DRAWNULL);
下斜线2:=IF(天线-CONST(H斜率*0.750)*最高<=天线,天线-CONST(H斜率*0.750)*最高,DRAWNULL);
下斜线3:=IF(天线-CONST(H斜率*0.618)*最高<=天线,天线-CONST(H斜率*0.618)*最高,DRAWNULL);
下斜线4:=IF(天线-CONST(H斜率*0.50)*最高<=天线,天线-CONST(H斜率*0.50)*最高,DRAWNULL);
下斜线5:=IF(天线-CONST(H斜率*0.382)*最高<=天线,天线-CONST(H斜率*0.382)*最高,DRAWNULL);
下斜线6:=IF(天线-CONST(H斜率*0.250)*最高<=天线,天线-CONST(H斜率*0.250)*最高,DRAWNULL);
下斜线7:=IF(天线-CONST(H斜率*0.156)*最高<=天线,天线-CONST(H斜率*0.156)*最高,DRAWNULL);
下斜线8:=IF(天线-CONST(H斜率*0.092)*最高<=天线,天线-CONST(H斜率*0.092)*最高,DRAWNULL);
下斜线9:=IF(天线-CONST(H斜率*0.055)*最高<=天线,天线-CONST(H斜率*0.055)*最高,DRAWNULL);
下斜线10:=IF(天线-CONST(H斜率*0.033)*最高<=天线,天线-CONST(H斜率*0.033)*最高,DRAWNULL);
下10:IF(下斜线10>=地线*0.95,下斜线10,DRAWNULL),COLOR8B2368;
下9:IF(下斜线9>=地线*0.95,下斜线9,DRAWNULL),COLOR8B2368;
下8:IF(下斜线8>=地线*0.95,下斜线8,DRAWNULL),COLOR8B2368;
下7:IF(下斜线7>=地线*0.95,下斜线7,DRAWNULL),COLOR8B2368;
下6:IF(下斜线6>=地线*0.95,下斜线6,DRAWNULL),COLOR8B2368;
下5:IF(下斜线5>=地线*0.95,下斜线5,DRAWNULL),COLOR8B2368;
下4:IF(下斜线4>=地线*0.95,下斜线4,DRAWNULL),COLOR0000FF;
下3:IF(下斜线3>=地线*0.95,下斜线3,DRAWNULL),COLOR8B2368;
下2:IF(下斜线2>=地线*0.95,下斜线2,DRAWNULL),COLOR8B2368;
下1:IF(下斜线1>=地线*0.95,下斜线1,DRAWNULL),COLOR8B2368;
下0:IF(下斜线0>=地线*0.95,下斜线0,DRAWNULL),COLOR8B2368;
下:IF(下斜线>=地线*0.95,下斜线,DRAWNULL),COLOR8B2368;
DRAWKLINE(H,O,L,C);
gd16205