时间之窗(易学公式)
农历年:LYEAR,LINETHICK0,colorFF00FF;
农历月:LMONTH,LINETHICK0,colorFF9900;
农历日:LDAY,LINETHICK0,color487D24;
STICKLINE(CLOSE>0 AND ISLASTBAR,0,100,0.1,0),SHIFT3,color4441FF;
AA:=IF(CLOSE>OPEN,1,IF(CLOSE<OPEN,-1,0));
AA1:=IF(CLOSE>REF(CLOSE,1),1,IF(CLOSE<REF(CLOSE,1),-1,0));
AA2:=IF(VOL>REF(VOL,1),1,IF(VOL<=REF(VOL,1),-1,0));
BB:=IF(AA=0,AA1,AA);
CC:=IF(BB=0,AA2,BB);
S1:=IF(REF(CC,5)>0 AND REF(CC,4)>0 AND REF(CC,3)>0,1,0);
S2:=IF(REF(CC,5)<0 AND REF(CC,4)>0 AND REF(CC,3)>0,2,0);
S3:=IF(REF(CC,5)>0 AND REF(CC,4)<0 AND REF(CC,3)>0,3,0);
S4:=IF(REF(CC,5)<0 AND REF(CC,4)<0 AND REF(CC,3)>0,4,0);
S5:=IF(REF(CC,5)>0 AND REF(CC,4)>0 AND REF(CC,3)<0,5,0);
S6:=IF(REF(CC,5)<0 AND REF(CC,4)>0 AND REF(CC,3)<0,6,0);
S7:=IF(REF(CC,5)>0 AND REF(CC,4)<0 AND REF(CC,3)<0,7,0);
S8:=IF(REF(CC,5)<0 AND REF(CC,4)<0 AND REF(CC,3)<0,8,0);
S:=S1+S2+S3+S4+S5+S6+S7+S8;
X1:IF(REF(CC,2)>0 AND REF(CC,1)>0 AND CC>0,1,0),LINETHICK0,color10000;
X2:IF(REF(CC,2)<0 AND REF(CC,1)>0 AND CC>0,2,0),LINETHICK0,color10000;
X3:IF(REF(CC,2)>0 AND REF(CC,1)<0 AND CC>0,3,0),LINETHICK0,color10000;
X4:IF(REF(CC,2)<0 AND REF(CC,1)<0 AND CC>0,4,0),LINETHICK0,color10000;
X5:IF(REF(CC,2)>0 AND REF(CC,1)>0 AND CC<0,5,0),LINETHICK0,color10000;
X6:IF(REF(CC,2)<0 AND REF(CC,1)>0 AND CC<0,6,0),LINETHICK0,color10000;
X7:IF(REF(CC,2)>0 AND REF(CC,1)<0 AND CC<0,7,0),LINETHICK0,color10000;
X8:IF(REF(CC,2)<0 AND REF(CC,1)<0 AND CC<0,8,0),LINETHICK0,color10000;
X:=X1+X2+X3+X4+X5+X6+X7+X8;
SX:S*10+X,LINETHICK0,color10000;
Y:=100/(SYSPARAM(4)-SYSPARAM(5));
FC:=(SYSPARAM(4)+SYSPARAM(5))*Y/2-50;
K:=CLOSE-REF(CLOSE,1);
STICKLINE(OPEN<CLOSE OR OPEN=CLOSE AND K>0,LOW*Y-FC,HIGH*Y-FC,0.1,0),color4A3A46;
STICKLINE(OPEN<CLOSE OR OPEN=CLOSE AND K>0,OPEN*Y-FC,CLOSE*Y-FC,6,1),color4A3A46;
STICKLINE(OPEN>CLOSE OR OPEN=CLOSE AND K<0,LOW*Y-FC,HIGH*Y-FC,0.1,0),color4A3A46;
STICKLINE(OPEN>CLOSE OR OPEN=CLOSE AND K<0,OPEN*Y-FC,CLOSE*Y-FC,6,0),color4A3A46;
N:=SYSPARAM(1)=BARPOS;
DRAWYITEXT(DATE,83,GANZHI(DATE,0,2),0),ALIGN3,color487D24;
DRAWYITEXT(N AND DATE,83,GANZHI(DATE,0,2),0),ALIGN3,colorFF;
FC:=GANZHI(DATE,0,1)<>REF(GANZHI(DATE,0,1),1);
STICKLINE(FC,8,92,0,0),colorFF9900;
J1:=66;
DRAWYITEXT(FC,90,GANZHI(DATE,TIME,1),0),SHIFT2,colorFF9900;
DRAWYITEXT(FC,90,GANZHI(DATE,TIME,0),0),colorFF00FF;
JJ1:=DATE-LSOLARTERMDATE(1)>=0;
J2:=JJ1>REF(JJ1,1);
JJ2:=DATE-LSOLARTERMDATE(2)>=0;
J3:=JJ2>REF(JJ2,1);
JJ3:=DATE-LSOLARTERMDATE(3)>=0;
J4:=JJ3>REF(JJ3,1);
JJ4:=DATE-LSOLARTERMDATE(4)>=0;
J5:=JJ4>REF(JJ4,1);
JJ5:=DATE-LSOLARTERMDATE(5)>=0;
J6:=JJ5>REF(JJ5,1);
JJ6:=DATE-LSOLARTERMDATE(6)>=0;
J7:=JJ6>REF(JJ6,1);
JJ7:=DATE-LSOLARTERMDATE(7)>=0;
J8:=JJ7>REF(JJ7,1);
JJ8:=DATE-LSOLARTERMDATE(8)>=0;
J9:=JJ8>REF(JJ8,1);
JJ9:=DATE-LSOLARTERMDATE(9)>=0;
J10:=JJ9>REF(JJ9,1);
JJ10:=DATE-LSOLARTERMDATE(10)>=0;
J11:=JJ10>REF(JJ10,1);
JJ11:=DATE-LSOLARTERMDATE(11)>=0;
J12:=JJ11>REF(JJ11,1);
JJ12:=DATE-LSOLARTERMDATE(12)>=0;
J13:=JJ12>REF(JJ12,1);
JJ13:=DATE-LSOLARTERMDATE(13)>=0;
J14:=JJ13>REF(JJ13,1);
JJ14:=DATE-LSOLARTERMDATE(14)>=0;
J15:=JJ14>REF(JJ14,1);
JJ15:=DATE-LSOLARTERMDATE(15)>=0;
J16:=JJ15>REF(JJ15,1);
JJ16:=DATE-LSOLARTERMDATE(16)>=0;
J17:=JJ16>REF(JJ16,1);
JJ17:=DATE-LSOLARTERMDATE(17)>=0;
J18:=JJ17>REF(JJ17,1);
JJ18:=DATE-LSOLARTERMDATE(18)>=0;
J19:=JJ18>REF(JJ18,1);
JJ19:=DATE-LSOLARTERMDATE(19)>=0;
J20:=JJ19>REF(JJ19,1);
JJ20:=DATE-LSOLARTERMDATE(20)>=0;
J21:=JJ20>REF(JJ20,1);
JJ21:=DATE-LSOLARTERMDATE(21)>=0;
J22:=JJ21>REF(JJ21,1);
JJ22:=DATE-LSOLARTERMDATE(22)>=0;
J23:=JJ22>REF(JJ22,1);
JJ23:=DATE-LSOLARTERMDATE(23)>=0;
J24:=JJ23>REF(JJ23,1);
JJ24:=DATE-LSOLARTERMDATE(24)>=0;
TEST:=JJ24>REF(JJ24,1);
DRAWTEXT(J2,J1,'小寒'),colorFFFF;
DRAWTEXT(J3,J1,'大寒'),colorFFFF;
DRAWTEXT(J4,J1,'立春'),color71B255;
DRAWTEXT(J5,J1,'雨水'),color71B255;
DRAWTEXT(J6,J1,'惊蛰'),color71B255;
DRAWTEXT(J7,J1,'春分'),color71B255;
DRAWTEXT(J8,J1,'清明'),colorFFFF;
DRAWTEXT(J9,J1,'谷雨'),colorFFFF;
DRAWTEXT(J10,J1,'立夏'),colorFF;
DRAWTEXT(J11,J1,'小满'),colorFF;
DRAWTEXT(J12,J1,'芒种'),colorFF;
DRAWTEXT(J13,J1,'夏至'),colorFF;
DRAWTEXT(J14,J1,'小暑'),colorFFFF;
DRAWTEXT(J15,J1,'大暑'),colorFFFF;
DRAWTEXT(J16,J1,'立秋'),colorBBBBBB;
DRAWTEXT(J17,J1,'处暑'),colorBBBBBB;
DRAWTEXT(J18,J1,'白露'),colorBBBBBB;
DRAWTEXT(J19,J1,'秋分'),colorBBBBBB;
DRAWTEXT(J20,J1,'寒露'),colorFFFF;
DRAWTEXT(J21,J1,'霜降'),colorFFFF;
DRAWTEXT(J22,J1,'立冬'),colorFFFF00;
DRAWTEXT(J23,J1,'小雪'),colorFFFF00;
DRAWTEXT(J24,J1,'大雪'),colorFFFF00;
DRAWTEXT(TEST,J1,'冬至'),colorFFFF00;
DRAWTEXT(LDAY=1,57,'新月'),color808040;
DRAWTEXT(LDAY=8,57,'上弦'),color808040;
DRAWTEXT(LDAY=15,57,'满月'),color808040;
DRAWTEXT(LDAY=23,57,'下弦'),color808040;
VARIABLE:I=1;
FOR COND=1 TO 干支周期 DO BEGIN
I:=I AND HIGH>REFX(HIGH,COND);
END;
HH:=I AND HIGH=HHV(HIGH,干支周期);
COND1:=IF(HH,HIGH,0);
VARIABLE:I=1;
FOR COND=1 TO 干支周期 DO BEGIN
I:=I AND LOW<REFX(LOW,COND);
END;
LL:=I AND LOW=LLV(LOW,干支周期);
QQ:=IF(LL,LOW,0);
BZ:=GANZHI(DATE,TIME,2);
六壬:=INTPART(BZ/12);
AKA:=BZ-六壬*12+1;
QQ1:=IF(COND1=HIGH,99,IF(QQ=LOW,6,0));
DRAWTEXT(AKA=1 AND QQ1>0,QQ1,'子'),color808080;
DRAWTEXT(AKA=2 AND QQ1>0,QQ1,'丑'),colorFFFF;
DRAWTEXT(AKA=3 AND QQ1>0,QQ1,'寅'),colorFFFF00;
DRAWTEXT(AKA=4 AND QQ1>0,QQ1,'卯'),colorFFFF00;
DRAWTEXT(AKA=5 AND QQ1>0,QQ1,'辰'),colorFFFF;
DRAWTEXT(AKA=6 AND QQ1>0,QQ1,'巳'),colorFF;
DRAWTEXT(AKA=7 AND QQ1>0,QQ1,'午'),colorFF;
DRAWTEXT(AKA=8 AND QQ1>0,QQ1,'未'),colorFFFF;
DRAWTEXT(AKA=9 AND QQ1>0,QQ1,'申'),colorFFFFFF;
DRAWTEXT(AKA=10 AND QQ1>0,QQ1,'酉'),colorFFFFFF;
DRAWTEXT(AKA=11 AND QQ1>0,QQ1,'戌'),colorFFFF;
DRAWTEXT(AKA=12 AND QQ1>0,QQ1,'亥'),color808080;
XY3:=GANZHI(DATE,TIME,2)+1;
TG:=MOD(XY3,10);
HHH:=IF(TG=0,10,TG);
DRAWTEXT(HHH=1 AND QQ1,QQ1,'甲'),ALIGN2,colorFFFF00;
DRAWTEXT(HHH=2 AND QQ1,QQ1,'乙'),ALIGN2,colorFFFF00;
DRAWTEXT(HHH=3 AND QQ1,QQ1,'丙'),ALIGN2,colorFF;
DRAWTEXT(HHH=4 AND QQ1,QQ1,'丁'),ALIGN2,colorFF;
DRAWTEXT(HHH=5 AND QQ1,QQ1,'戊'),ALIGN2,colorFFFF;
DRAWTEXT(HHH=6 AND QQ1,QQ1,'己'),ALIGN2,colorFFFF;
DRAWTEXT(HHH=7 AND QQ1,QQ1,'庚'),ALIGN2,colorFFFFFF;
DRAWTEXT(HHH=8 AND QQ1,QQ1,'辛'),ALIGN2,colorFFFFFF;
DRAWTEXT(HHH=9 AND QQ1,QQ1,'壬'),ALIGN2,color808080;
DRAWTEXT(HHH=10 AND QQ1,QQ1,'癸'),ALIGN2,color808080;
VARIABLE:I=1;
FOR COND=1 TO 神奇数周期 DO BEGIN
I:=I AND HIGH>REFX(HIGH,COND);
END;
HH:=I AND HIGH=HHV(HIGH,神奇数周期);
LLL:=IF(HH,HIGH,0);
VARIABLE:I=1;
FOR COND=1 TO 神奇数周期 DO BEGIN
I:=I AND LOW<REFX(LOW,COND);
END;
LL:=I AND LOW=LLV(LOW,神奇数周期);
DD:=IF(LL |