通达信价位时空主图指标(源码)
低点:=15;
高点:=15;
时间:=1;
价格:=1;
调点:=2;
上角度:=178;
下角度:=178;
PURC:=CONST(FINDHIGH(H,0,高点*10,1));
PLZ:=CONST(BARSLAST(PURC=H))+1;
顶X:=CONST(IF(PLZ=1,H,REF(H,PLZ-1)));
QQT:=CONST(FINDLOW(L,0,低点*10,1));
PLL:=CONST(BARSLAST(QQT=L))+1;
低X:=CONST(IF(PLL=1,L,REF(L,PLL-1)));
ATM:=时间=1 OR 时间=3;
QTM:=时间=2 OR 时间=3;
BTM:=时间=1 OR 时间=2 OR 时间=3;
AAZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*0.809),DRAWNULL);
ABZ:=IF(BTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*0.5),DRAWNULL);
ACZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*0.618),DRAWNULL);
ADZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*0.382),DRAWNULL);
AEZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*0.236),DRAWNULL);
AFZ:=IF(BTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*1),DRAWNULL);
AGZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*1.809),DRAWNULL);
AHZ:=IF(BTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*1.5),DRAWNULL);
AIZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*1.618),DRAWNULL);
AJZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*1.382),DRAWNULL);
AKZ:=IF(ATM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ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>PLL,PLZ,PLL)-ABS(PLZ-PLL)*18/8),DRAWNULL);
QUZ:=IF(QTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*19/8),DRAWNULL);
QVZ:=IF(QTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*21/8),DRAWNULL);
QWZ:=IF(QTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*22/8),DRAWNULL);
QXZ:=IF(QTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*23/8),DRAWNULL);
QYZ:=IF(QTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*7/3),DRAWNULL);
QZZ:=IF(QTM,ROUND(IF(PLZ>PLL,PLZ,PLL)-ABS(PLZ-PLL)*8/3),DRAWNULL);
HXCS2:=CURRBARSCOUNT=QAZ OR CURRBARSCOUNT=QBZ OR CURRBARSCOUNT=QCZ
OR CURRBARSCOUNT=QDZ OR CURRBARSCOUNT=QEZ OR CURRBARSCOUNT=QGZ
OR CURRBARSCOUNT=QHZ OR CURRBARSCOUNT=QIZ OR CURRBARSCOUNT=QJZ
OR CURRBARSCOUNT=QKZ OR CURRBARSCOUNT=QMZ OR CURRBARSCOUNT=QNZ
OR CURRBARSCOUNT=QOZ OR CURRBARSCOUNT=QPZ OR CURRBARSCOUNT=QQZ
OR CURRBARSCOUNT=QRZ
OR CURRBARSCOUNT=QSZ OR CURRBARSCOUNT=QTZ OR CURRBARSCOUNT=QUZ
OR CURRBARSCOUNT=QVZ OR CURRBARSCOUNT=QWZ OR CURRBARSCOUNT=QXZ
OR CURRBARSCOUNT=QYZ OR CURRBARSCOUNT=QZZ ;
STICKLINE(HXCS1 OR HXCS2 ,顶X,低X,0,0),COLORMAGENTA;
DRAWKLINE(H,O,L,C);
天XX线:=IF(价格=5 AND 时间=5,DRAWNULL,顶X),COLORMAGENTA;
地XX线:=IF(价格=5 AND 时间=5,DRAWNULL,低X),COLORMAGENTA;
顶点:天XX线,COLORMAGENTA;
底点:地XX线,COLORMAGENTA;
立春:=IF(PERIOD=5,FILTER(MONTH=2 AND (DAY=3 OR DAY=4 OR DAY=5 ),2),DRAWNULL);
雨水:=IF(PERIOD=5,FILTER(MONTH=2 AND (DAY=18 OR DAY=19 OR DAY=20 ),2),DRAWNULL);
惊蛰:=IF(PERIOD=5,FILTER(MONTH=3 AND (DAY=5 OR DAY=6 OR DAY=7 ),2),DRAWNULL);
春分:=IF(PERIOD=5,FILTER(MONTH=3 AND (DAY=20 OR DAY=21 OR DAY=22 ),2),DRAWNULL);
清明:=IF(PERIOD=5,FILTER(MONTH=4 AND (DAY=4 OR DAY=5 OR DAY=6 ),2),DRAWNULL);
谷雨:=IF(PERIOD=5,FILTER(MONTH=4 AND (DAY=19 OR DAY=20 OR DAY=21 ),2),DRAWNULL);
立夏:=IF(PERIOD=5,FILTER(MONTH=5 AND (DAY=5 OR DAY=6 OR DAY=7 ),2),DRAWNULL);
小满:=IF(PERIOD=5,FILTER(MONTH=5 AND (DAY=21 OR DAY=22 OR DAY=23 ),2),DRAWNULL);
芒种:=IF(PERIOD=5,FILTER(MONTH=6 AND (DAY=5 OR DAY=6 OR DAY=7),2),DRAWNULL);
夏至:=IF(PERIOD=5,FILTER(MONTH=6 AND (DAY=21 OR DAY=22 OR DAY=23 ),2),DRAWNULL);
小暑:=IF(PERIOD=5,FILTER(MONTH=7 AND (DAY=6 OR DAY=7 OR DAY=8),2),DRAWNULL);
大署:=IF(PERIOD=5,FILTER(MONTH=7 AND (DAY=22 OR DAY=23 OR DAY=24 ),2),DRAWNULL);
立秋:=IF(PERIOD=5,FILTER(MONTH=8 AND (DAY=7 OR DAY=8 OR DAY=9 ),2),DRAWNULL);
处暑:=IF(PERIOD=5,FILTER(MONTH=8 AND (DAY=22 OR DAY=23 OR DAY=24 ),2),DRAWNULL);
白露:=IF(PERIOD=5,FILTER(MONTH=9 AND (DAY=7 OR DAY=8 OR DAY=9 ),2),DRAWNULL);
秋分:=IF(PERIOD=5,FILTER(MONTH=9 AND (DAY=22 OR DAY=23 OR DAY=24 ),2),DRAWNULL);
寒露:=IF(PERIOD=5,FILTER(MONTH=10 AND (DAY=7 OR DAY=8 OR DAY=9 ),2),DRAWNULL);
霜降:=IF(PERIOD=5,FILTER(MONTH=10 AND (DAY=22 OR DAY=23 OR DAY=24 ),2),DRAWNULL);
立冬:=IF(PERIOD=5,FILTER(MONTH=11 AND (DAY=7 OR DAY=8 OR DAY=9),2),DRAWNULL);
小雪:=IF(PERIOD=5,FILTER(MONTH=11 AND (DAY=22 OR DAY=23 OR DAY=24 ),2),DRAWNULL);
大雪:=IF(PERIOD=5,FILTER(MONTH=12 AND (DAY=6 OR DAY=7 OR DAY=8 ),2),DRAWNULL);
冬至:=IF(PERIOD=5,FILTER(MONTH=12 AND (DAY=21 OR DAY=22 OR DAY=23 ),2),DRAWNULL);
小寒:=IF(PERIOD=5,FILTER(MONTH=1 AND (DAY=5 OR DAY=6 OR DAY=7 ),2),DRAWNULL);
大寒:=IF(PERIOD=5,FILTER(MONTH=1 AND (DAY=19 OR DAY=20 OR DAY=21 ),2),DRAWNULL);
JQ24:=立春 OR 雨水 OR 惊蛰 OR 春分 OR 清明 OR 谷雨 OR 立夏 OR 小满 OR 芒种
OR 夏至 OR 小暑 OR 大署 OR 立秋 OR 处暑 OR 白露 OR 秋分 OR 寒露 OR 霜降 OR 立冬
OR 小雪 OR 大雪 OR 冬至 OR 小寒 OR 大寒;
STICKLINE(JQ24 ,IF(C>300,低X*1.001,低X*1.005),低X,3.5,0),COLORMAGENTA;
DRAWTEXT(立春,IF(C>300,地XX线*1.002,地XX线*1.01),'立春315°'),COLORGREEN;
{DRAWTEXT(雨水,IF(C>300,地XX线*1.002,地XX线*1.01),'雨水'),COLORGREEN;
DRAWTEXT(惊蛰,IF(C>300,地XX线*1.002,地XX线*1.01),'惊蛰'),COLORGREEN;}
DRAWTEXT(春分,IF(C>300,地XX线*1.002,地XX线*1.01),'春分0°'),COLORGREEN;
{DRAWTEXT(清明,IF(C>300,地XX线*1.002,地XX线*1.01),'清明'),COLORGREEN;}
{DRAWTEXT(谷雨,IF(C>300,地XX线*1.002,地XX线*1.01),'谷雨30°'),COLORGREEN;}
DRAWTEXT(立夏,IF(C>300,地XX线*1.002,地XX线*1.01),'立夏45°'),COLORRED;
DRAWTEXT(小满,IF(C>300,地XX线*1.002,地XX线*1.01),'小满60°'),COLORRED;
{DRAWTEXT(芒种,IF(C>300,地XX线*1.002,地XX线*1.01),'芒种'),COLORRED;}
DRAWTEXT(夏至,IF(C>300,地XX线*1.002,地XX线*1.01),'夏至90°'),COLORRED;
{DRAWTEXT(小暑,IF(C>300,地XX线*1.002,地XX线*1.01),'小暑'),COLORRED;}
DRAWTEXT(大署,IF(C>300,地XX线*1.002,地XX线*1.01),'大署120°'),COLORRED;
DRAWTEXT(立秋,IF(C>300,地XX线*1.002,地XX线*1.01),'立秋135°'),COLORYELLOW;
{DRAWTEXT(处暑,IF(C>300,地XX线*1.002,地XX线*1.01),'处暑'),COLORYELLOW;
DRAWTEXT(白露,IF(C>300,地XX线*1.002,地XX线*1.01),'白露'),COLORYELLOW;}
DRAWTEXT(秋分,IF(C>300,地XX线*1.002,地XX线*1.01),'秋分180°'),COLORYELLOW;
{DRAWTEXT(寒露,IF(C>300,地XX线*1.002,地XX线*1.01),'寒露'),COLORYELLOW;
DRAWTEXT(霜降,IF(C>300,地XX线*1.002,地XX线*1.01),'霜降'),COLORYELLOW;}
DRAWTEXT(立冬,IF(C>300,地XX线*1.002,地XX线*1.01),'立冬225°'),COLORWHITE;
DRAWTEXT(小雪,IF(C>300,地XX线*1.002,地XX线*1.01),'小雪240°'),COLORWHITE;
{DRAWTEXT(大雪,IF(C>300,地XX线*1.002,地XX线*1.01),'大雪'),COLORWHITE;}
DRAWTEXT(冬至,IF(C>300,地XX线*1.002,地XX线*1.01),'冬至270°'),COLORWHITE;
{DRAWTEXT(小寒,IF(C>300,地XX线*1.002,地XX线*1.01),'小寒'),COLORWHITE;}
DRAWTEXT(大寒,IF(C>300,地XX线*1.002,地XX线*1.01),'大寒300°'),COLORWHITE;
NOTEXT1:IF(价格=1 OR 价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*0.5,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT2:IF(价格=1 OR 价格=3,地XX线+(天XX线-地XX线)*0.236,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT3:IF(价格=1 OR 价格=3,地XX线+(天XX线-地XX线)*0.382,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT4:IF(价格=1 OR 价格=3,地XX线+(天XX线-地XX线)*0.618,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT5:IF(价格=1 OR 价格=3,地XX线+(天XX线-地XX线)*0.809,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT6:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*1/8,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT7:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*2/8,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT8:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*3/8,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT10:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*5/8,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT11:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*6/8,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT12:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*7/8,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT13:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*1/3,DRAWNULL),COLORMAGENTA,DOTLINE;
NOTEXT14:IF(价格=2 OR 价格=3,地XX线+(天XX线-地XX线)*2/3,DRAWNULL),COLORMAGENTA,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=AAZ OR CURRBARSCOUNT=AGZ OR CURRBARSCOUNT=AQZ,顶X*0.98,'0.809')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=ABZ OR CURRBARSCOUNT=AHZ OR CURRBARSCOUNT=AOZ,顶X*0.98,'0.500')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=ACZ OR CURRBARSCOUNT=AIZ OR CURRBARSCOUNT=APZ,顶X*0.98,'0.618')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=ADZ OR CURRBARSCOUNT=AJZ OR CURRBARSCOUNT=ANZ,顶X*0.98,'0.382')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AEZ OR CURRBARSCOUNT=AKZ OR CURRBARSCOUNT=AMZ,顶X*0.98,'0.236')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=ASZ,顶X*0.98,'0.00')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AFZ,顶X*0.98,'1.00')COLORMAGENTA;
{DRAWTEXT(CURRBARSCOUNT=AGZ,顶X*0.98,'1.809')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AIZ,顶X*0.98,'1.618')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AJZ,顶X*0.98,'1.382')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AKZ,顶X*0.98,'1.236')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AHZ,顶X*0.98,'1.500')COLORMAGENTA;}
DRAWTEXT(CURRBARSCOUNT=ALZ,顶X*0.98,'2.00')COLORMAGENTA;
{DRAWTEXT(CURRBARSCOUNT=AMZ,顶X*0.98,'2.236')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=ANZ,顶X*0.98,'2.382')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=APZ,顶X*0.98,'2.618')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AQZ,顶X*0.98,'2.809')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=AOZ,顶X*0.98,'2.500')COLORMAGENTA;}
DRAWTEXT(CURRBARSCOUNT=ARZ,顶X*0.98,'3.00')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QAZ OR CURRBARSCOUNT=QIZ OR CURRBARSCOUNT=QSZ,顶X*0.98,'1/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QBZ OR CURRBARSCOUNT=QMZ OR CURRBARSCOUNT=QTZ,顶X*0.98,'2/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QCZ OR CURRBARSCOUNT=QNZ OR CURRBARSCOUNT=QUZ,顶X*0.98,'3/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QEZ OR CURRBARSCOUNT=QPZ OR CURRBARSCOUNT=QVZ,顶X*0.98,'5/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QGZ OR CURRBARSCOUNT=QQZ OR CURRBARSCOUNT=QWZ,顶X*0.98,'6/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QHZ OR CURRBARSCOUNT=QRZ OR CURRBARSCOUNT=QXZ,顶X*0.98,'7/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QJZ OR CURRBARSCOUNT=QDZ OR CURRBARSCOUNT=QYZ,顶X*0.98,'1/3')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QKZ OR CURRBARSCOUNT=QOZ OR CURRBARSCOUNT=QZZ,顶X*0.98,'2/3')COLORMAGENTA;
{DRAWTEXT(CURRBARSCOUNT=QDZ,顶X*0.98,'4/3')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QIZ,顶X*0.98,'9/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QMZ,顶X*0.98,'10/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QNZ,顶X*0.98,'11/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QOZ,顶X*0.98,'5/3')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QPZ,顶X*0.98,'13/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QQZ,顶X*0.98,'14/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=QRZ,顶X*0.98,'15/8')COLORMAGENTA;}
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT1,'0.500')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT2,'0.236')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT3,'0.382')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT4,'0.618')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT5,'0.809')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT6,'1/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT7,'2/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT8,'3/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT10,'5/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT11,'6/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT12,'7/8')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT13,'1/3')COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=3,NOTEXT14,'2/3')COLORMAGENTA;
TJ:=时间=5 AND 价格=5;
DRAWTEXT_FIX(CURRBARSCOUNT=3 AND TJ!=1,0.68,1-0.88,0,STRCAT('顶点周期: ',CON2STR(PLZ,0))),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=3 AND TJ!=1,0.68,1-0.78,0,STRCAT('底点周期: ',CON2STR(PLL,0))),COLORMAGENTA;
HDAY:=高点;
LDAY:=低点;
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)/8-(SX跌H-SX涨L)/8);
GH跌X:=SX跌H+(SX跌H-SX涨L)/8; DL涨X:=SX涨L-(SX跌H-SX涨L)/8;
天线:=SX跌H,COLORMAGENTA;
地线:=SX涨L,COLORMAGENTA;
K:=(天线-地线)/(IF(跌点>=涨点,跌点,涨点)-IF(跌点>=涨点,涨点,跌点));
上斜线:=IF(地线+CONST(L斜率*4.00)*最低>=地线,地线+CONST(L斜率*4.00)*最低,DRAWNULL);
上斜线0:=IF(地线+CONST(L斜率*2.00)*最低>=地线,地线+CONST(L斜率*2.00)*最低,DRAWNULL);
上斜线1:=IF(地线+CONST(L斜率*1.5)*最低>=地线,地线+CONST(L斜率*1.5)*最低,DRAWNULL);
上斜线2:=IF(地线+CONST(L斜率*1.00)*最低>=地线,地线+CONST(L斜率*1.000)*最低,DRAWNULL);
上斜线3:=IF(地线+CONST(L斜率*0.75)*最低>=地线,地线+CONST(L斜率*0.75)*最低,DRAWNULL);
上斜线4:=IF(地线+CONST(L斜率*0.50)*最低>=地线,地线+CONST(L斜率*0.50)*最低,DRAWNULL);
上斜线5:=IF(地线+CONST(L斜率*0.375)*最低>=地线,地线+CONST(L斜率*0.375)*最低,DRAWNULL);
上斜线6:=IF(地线+CONST(L斜率*0.250)*最低>=地线,地线+CONST(L斜率*0.250)*最低,DRAWNULL);
上斜线7:=IF(地线+CONST(L斜率*0.165)*最低>=地线,地线+CONST(L斜率*0.165)*最低,DRAWNULL);
上斜线8:=IF(地线+CONST(L斜率*0.125)*最低>=地线,地线+CONST(L斜率*0.125)*最低,DRAWNULL);
上斜线9:=IF(地线+CONST(L斜率*0.0625)*最低>=地线,地线+CONST(L斜率*0.0625)*最低,DRAWNULL);
上斜线A:=IF(地线+CONST(L斜率*5/8)*最低>=地线,地线+CONST(L斜率*5/8)*最低,DRAWNULL);
上斜线B:=IF(地线+CONST(L斜率*7/8)*最低>=地线,地线+CONST(L斜率*7/8)*最低,DRAWNULL);
上斜线C:=IF(地线+CONST(L斜率*9/8)*最低>=地线,地线+CONST(L斜率*9/8)*最低,DRAWNULL);
上斜线D:=IF(地线+CONST(L斜率*10/8)*最低>=地线,地线+CONST(L斜率*10/8)*最低,DRAWNULL);
上斜线E:=IF(地线+CONST(L斜率*1/32)*最低>=地线,地线+CONST(L斜率*1/32)*最低,DRAWNULL);
NOTEXT上9:IF(上斜线9<=天线*1.05,上斜线9,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上8:IF(上斜线8<=天线*1.05,上斜线8,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上7:IF(上斜线7<=天线*1.05,上斜线7,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上6:IF(上斜线6<=天线*1.05,上斜线6,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上5:IF(上斜线5<=天线*1.05,上斜线5,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上4:IF(上斜线4<=天线*1.05,上斜线4,DRAWNULL),COLOR00DDDD,DOTLINE;
NOTEXT上3:IF(上斜线3<=天线*1.05,上斜线3,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上2:IF(上斜线2<=天线*1.05,上斜线2,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上1:IF(上斜线1<=天线*1.05,上斜线1,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上0:IF(上斜线0<=天线*1.05,上斜线0,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上:IF(上斜线<=天线*1.05,上斜线,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上A:=IF(上斜线A<=天线*1.05,上斜线A,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上B:=IF(上斜线B<=天线*1.05,上斜线B,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上C:=IF(上斜线C<=天线*1.05,上斜线C,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上D:=IF(上斜线D<=天线*1.05,上斜线D,DRAWNULL),COLORAA00AA,DOTLINE;
NOTEXT上E:=IF(上斜线E<=天线*1.05,上斜线E,DRAWNULL),COLORAA00AA,DOTLINE;
下斜线:=IF(天线-CONST(H斜率*4.00)*最高<=天线,天线-CONST(H斜率*4.00)*最高,DRAWNULL);
下斜线0:=IF(天线-CONST(H斜率*2.00)*最高<=天线,天线-CONST(H斜率*2.00)*最高,DRAWNULL);
下斜线1:=IF(天线-CONST(H斜率*1.500)*最高<=天线,天线-CONST(H斜率*1.500)*最高,DRAWNULL);
下斜线2:=IF(天线-CONST(H斜率*1.000)*最高<=天线,天线-CONST(H斜率*1.000)*最高,DRAWNULL);
下斜线3:=IF(天线-CONST(H斜率*0.75)*最高<=天线,天线-CONST(H斜率*0.75)*最高,DRAWNULL);
下斜线4:=IF(天线-CONST(H斜率*0.50)*最高<=天线,天线-CONST(H斜率*0.50)*最高,DRAWNULL);
下斜线5:=IF(天线-CONST(H斜率*0.375)*最高<=天线,天线-CONST(H斜率*0.375)*最高,DRAWNULL);
下斜线6:=IF(天线-CONST(H斜率*0.250)*最高<=天线,天线-CONST(H斜率*0.250)*最高,DRAWNULL);
下斜线7:=IF(天线-CONST(H斜率*0.165)*最高<=天线,天线-CONST(H斜率*0.165)*最高,DRAWNULL);
下斜线8:=IF(天线-CONST(H斜率*0.125)*最高<=天线,天线-CONST(H斜率*0.125)*最高,DRAWNULL);
下斜线9:=IF(天线-CONST(H斜率*0.0625)*最高<=天线,天线-CONST(H斜率*0.0625)*最高,DRAWNULL);
下斜线A:=IF(天线-CONST(H斜率*5/8)*最高<=天线,天线-CONST(H斜率*5/8)*最高,DRAWNULL);
下斜线B:=IF(天线-CONST(H斜率*7/8)*最高<=天线,天线-CONST(H斜率*7/8)*最高,DRAWNULL);
下斜线C:=IF(天线-CONST(H斜率*9/8)*最高<=天线,天线-CONST(H斜率*9/8)*最高,DRAWNULL);
下斜线D:=IF(天线-CONST(H斜率*10/8)*最高<=天线,天线-CONST(H斜率*10/8)*最高,DRAWNULL);
下斜线E:=IF(天线-CONST(H斜率*1/32)*最高<=天线,天线-CONST(H斜率*1/32)*最高,DRAWNULL);
NOTEXT下9:IF(下斜线9>=地线*0.95,下斜线9,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下8:IF(下斜线8>=地线*0.95,下斜线8,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下7:IF(下斜线7>=地线*0.95,下斜线7,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下6:IF(下斜线6>=地线*0.95,下斜线6,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下5:IF(下斜线5>=地线*0.95,下斜线5,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下4:IF(下斜线4>=地线*0.95,下斜线4,DRAWNULL),COLOR00DDDD,DOTLINE;
NOTEXT下3:IF(下斜线3>=地线*0.95,下斜线3,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下2:IF(下斜线2>=地线*0.95,下斜线2,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下1:IF(下斜线1>=地线*0.95,下斜线1,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下0:IF(下斜线0>=地线*0.95,下斜线0,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下:IF(下斜线>=地线*0.95,下斜线,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下A:=IF(下斜线A>=地线*0.95,下斜线A,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下B:=IF(下斜线B>=地线*0.95,下斜线B,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下C:=IF(下斜线C>=地线*0.95,下斜线C,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下D:=IF(下斜线D>=地线*0.95,下斜线D,DRAWNULL),COLORAAAAAA,DOTLINE;
NOTEXT下E:=IF(下斜线E>=地线*0.95,下斜线E,DRAWNULL),COLORAAAAAA,DOTLINE;
DRAWTEXT(上斜线9<=天线*1.05 AND CURRBARSCOUNT=30,上斜线9,'8X1'),COLORAA00AA;
DRAWTEXT(上斜线8<=天线*1.05 AND CURRBARSCOUNT=30,上斜线8,'4X1'),COLORAA00AA;
DRAWTEXT(上斜线7<=天线*1.05 AND CURRBARSCOUNT=30,上斜线7,'3X1'),COLORAA00AA;
DRAWTEXT(上斜线6<=天线*1.05 AND CURRBARSCOUNT=30,上斜线6,'2X1'),COLORAA00AA;
DRAWTEXT(上斜线5<=天线*1.05 AND CURRBARSCOUNT=30,上斜线5,'3X2'),COLORAA00AA;
DRAWTEXT(上斜线4<=天线*1.05 AND CURRBARSCOUNT=30,上斜线4,'1X1'),COLORAA00AA;
DRAWTEXT(上斜线3<=天线*1.05 AND CURRBARSCOUNT=30,上斜线3,'2X3'),COLORAA00AA;
DRAWTEXT(上斜线2<=天线*1.05 AND CURRBARSCOUNT=30,上斜线2,'1X2'),COLORAA00AA;
{DRAWTEXT(上斜线1<=天线*1.05 AND CURRBARSCOUNT=30,上斜线1,'1X3'),COLORAA00AA;}
{DRAWTEXT(上斜线0<=天线*1.05 AND CURRBARSCOUNT=30,上斜线0,'1X4'),COLORAA00AA;
DRAWTEXT(上斜线<=天线*1.05 AND CURRBARSCOUNT=30,上斜线,'1X8'),COLORAA00AA;}
{DRAWTEXT(上斜线A<=天线*1.05 AND CURRBARSCOUNT=30,上斜线A,'5X8'),COLORAA00AA;
DRAWTEXT(上斜线B<=天线*1.05 AND CURRBARSCOUNT=30,上斜线B,'7X8'),COLORAA00AA;}
{DRAWTEXT(上斜线C<=天线*1.05 AND CURRBARSCOUNT=30,上斜线C,'9X8'),COLORAA00AA;
DRAWTEXT(上斜线D<=天线*1.05 AND CURRBARSCOUNT=30,上斜线D,'10X8'),COLORAA00AA;}
{DRAWTEXT(上斜线E<=天线*1.05 AND CURRBARSCOUNT=30,上斜线E,'16X1'),COLORAA00AA;}
DRAWTEXT(下斜线9>=地线*0.95 AND CURRBARSCOUNT=10,下斜线9,'8X1'),COLORAAAAAA;
DRAWTEXT(下斜线8>=地线*0.95 AND CURRBARSCOUNT=10,下斜线8,'4X1'),COLORAAAAAA;
DRAWTEXT(下斜线7>=地线*0.95 AND CURRBARSCOUNT=10,下斜线7,'3X1'),COLORAAAAAA;
DRAWTEXT(下斜线6>=地线*0.95 AND CURRBARSCOUNT=10,下斜线6,'2X1'),COLORAAAAAA;
DRAWTEXT(下斜线5>=地线*0.95 AND CURRBARSCOUNT=10,下斜线5,'3X2'),COLORAAAAAA;
DRAWTEXT(下斜线4>=地线*0.95 AND CURRBARSCOUNT=10,下斜线4,'1X1'),COLORAAAAAA;
DRAWTEXT(下斜线3>=地线*0.95 AND CURRBARSCOUNT=10,下斜线3,'2X3'),COLORAAAAAA;
DRAWTEXT(下斜线2>=地线*0.95 AND CURRBARSCOUNT=10,下斜线2,'1X2'),COLORAAAAAA;
{DRAWTEXT(下斜线1>=地线*0.95 AND CURRBARSCOUNT=10,下斜线1,'1X3'),COLORAAAAAA;}
{DRAWTEXT(下斜线0>=地线*0.95 AND CURRBARSCOUNT=10,下斜线0,'1X4'),COLORAAAAAA;
DRAWTEXT(下斜线>=地线*0.95 AND CURRBARSCOUNT=10,下斜线,'1X8'),COLORAAAAAA;}
{DRAWTEXT(下斜线A>=地线*0.95 AND CURRBARSCOUNT=10,下斜线A,'5X8'),COLORAAAAAA;
DRAWTEXT(下斜线B>=地线*0.95 AND CURRBARSCOUNT=10,下斜线B,'7X8'),COLORAAAAAA;}
{DRAWTEXT(下斜线C>=地线*0.95 AND CURRBARSCOUNT=10,下斜线C,'9X8'),COLORAAAAAA;
DRAWTEXT(下斜线D>=地线*0.95 AND CURRBARSCOUNT=10,下斜线D,'10X8'),COLORAAAAAA;}
{DRAWTEXT(下斜线E>=地线*0.95 AND CURRBARSCOUNT=10,下斜线E,'16X1'),COLORAAAAAA;};
- 上一篇公式:通达信成交量突破指标(源码)
- 下一篇公式:通达信强势股二次启动选股指标(源码)