最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 农历时间之窗(飞狐)

    正文概述    2024-04-08 00:25:23  

    input:干支周期(6,3,999),神奇数周期(20,3,999);
    农历年: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),(0 - 1),0));
    AA1:=IF((CLOSE REF(CLOSE,1)),1,IF((CLOSE REF(CLOSE,1)),(0 - 1),0));
    AA2:=IF((VOL REF(VOL,1)),1,IF((VOL = REF(VOL,1)),(0 - 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;
    variable:AA[1]=0;
    FOR RAWTEXT (LDAY = 23 ,57,'下弦'),color808040(COND to 干支周期)DO
    I:=(I AND (HIGH REFX(HIGH,COND)));
    HH:=(I AND (HIGH = HHV(HIGH,干支周期)));
    variable:AA[1]=0;
    FOR TEST=IF HH,HIGH,0 D to 干支周期)DO
    I:=(I AND (LOW REFX(LOW,COND)));
    COND1:=(I AND (LOW = LLV(LOW,干支周期)));
    LL:=IF(COND1,LOW,0);
    QQ:=GANZHI(DATE,TIME,2);
    BZ:=INTPART((QQ / 12));
    六壬:=((QQ - (BZ * 12)) + 1);
    AKA:=IF((TEST = HIGH),99,IF((LL = LOW),6,0));
    DRAWTEXT(((六壬 = 1) AND (AKA 0)),AKA,'子'),color808080;
    DRAWTEXT(((六壬 = 2) AND (AKA 0)),AKA,'丑'),colorFFFF;
    DRAWTEXT(((六壬 = 3) AND (AKA 0)),AKA,'寅'),colorFFFF00;
    DRAWTEXT(((六壬 = 4) AND (AKA 0)),AKA,'卯'),colorFFFF00;
    DRAWTEXT(((六壬 = 5) AND (AKA 0)),AKA,'辰'),colorFFFF;
    DRAWTEXT(((六壬 = 6) AND (AKA 0)),AKA,'巳'),colorFF;
    DRAWTEXT(((六壬 = 7) AND (AKA 0)),AKA,'午'),colorFF;
    DRAWTEXT(((六壬 = 8) AND (AKA 0)),AKA,'未'),colorFFFF;
    DRAWTEXT(((六壬 = 9) AND (AKA 0)),AKA,'申'),colorFFFFFF;
    DRAWTEXT(((六壬 = 10) AND (AKA 0)),AKA,'酉'),colorFFFFFF;
    DRAWTEXT(((六壬 = 11) AND (AKA 0)),AKA,'戌'),colorFFFF;
    DRAWTEXT(((六壬 = 12) AND (AKA 0)),AKA,'亥'),color808080;
    QQ1:=(GANZHI(DATE,TIME,2) + 1);
    XY3:=MOD(QQ1,10);
    TG:=IF((XY3 = 0),10,XY3);
    DRAWTEXT(((TG = 1) AND AKA),AKA,'甲'),ALIGN2,colorFFFF00;
    DRAWTEXT(((TG = 2) AND AKA),AKA,'乙'),ALIGN2,colorFFFF00;
    DRAWTEXT(((TG = 3) AND AKA),AKA,'丙'),ALIGN2,colorFF;
    DRAWTEXT(((TG = 4) AND AKA),AKA,'丁'),ALIGN2,colorFF;
    DRAWTEXT(((TG = 5) AND AKA),AKA,'戊'),ALIGN2,colorFFFF;
    DRAWTEXT(((TG = 6) AND AKA),AKA,'己'),ALIGN2,colorFFFF;
    DRAWTEXT(((TG = 7) AND AKA),AKA,'庚'),ALIGN2,colorFFFFFF;
    DRAWTEXT(((TG = 8) AND AKA),AKA,'辛'),ALIGN2,colorFFFFFF;
    DRAWTEXT(((TG = 9) AND AKA),AKA,'壬'),ALIGN2,color808080;
    variable:AA[1]=0;
    FOR RAWTEXT ((TG = 10AND AKA),AKA,'癸'),ALIGN2,color808080(COND to 神奇数周期)DO
    I:=(I AND (HIGH REFX(HIGH,COND)));
    HH:=(I AND (HIGH = HHV(HIGH,神奇数周期)));
    variable:AA[1]=0;
    FOR TEST=IF HH,HIGH,0 D to 神奇数周期)DO
    I:=(I AND (LOW REFX(LOW,COND)));
    COND1:=(I AND (LOW = LLV(LOW,神奇数周期)));
    HHH:=IF(COND1,LOW,0);
    AA:=IF(REF((TEST 0),5),49,0);
    BB:=IF(REF((TEST 0),5),44,0);
    CC:=IF(REF((TEST 0),10),39,0);
    TEST:=IF(REF((TEST 0),18),34,0);
    LLL:=IF(REF((TEST 0),31),27.5,0);
    DD:=IF(REF((TEST 0),52),23,0);
    EE:=IF(REF((TEST 0),86),18,0);
    TEST:=IF(REF((TEST 0),141),13,0);
    DRAWTEXT((AA 0),AA,'5,顶'),ALIGN0,colorFF00;
    DRAWTEXT((BB 0),BB,'8,顶'),ALIGN0,SHIFT3,colorFF00;
    DRAWTEXT((CC 0),CC,'13,顶'),ALIGN0,SHIFT3,colorFF00;
    DRAWTEXT((TEST 0),TEST,'21,顶'),ALIGN0,SHIFT3,colorFF00;
    DRAWTEXT((LLL 0),LLL,'34,顶'),ALIGN0,SHIFT3,colorFF00;
    DRAWTEXT((DD 0),DD,'55,顶'),ALIGN0,SHIFT3,colorFF00;
    DRAWTEXT((EE 0),EE,'89,顶'),ALIGN0,SHIFT3,colorFF00;
    DRAWTEXT((TEST 0),TEST,'144,顶'),ALIGN0,SHIFT3,colorFF00;
    AA1:=IF(REF((HHH 0),5),49,0);
    FF:=IF(REF((HHH 0),5),44,0);
    GG:=IF(REF((HHH 0),10),39,0);
    BB1:=IF(REF((HHH 0),18),34,0);
    CC1:=IF(REF((HHH 0),31),27.5,0);
    DD1:=IF(REF((HHH 0),52),23,0);
    EE1:=IF(REF((HHH 0),86),18,0);
    FF1:=IF(REF((HHH 0),141),13,0);
    DRAWTEXT((AA1 0),AA1,'5,底'),ALIGN0,colorFF;
    DRAWTEXT((FF 0),FF,'8,底'),ALIGN0,SHIFT3,colorFF;
    DRAWTEXT((GG 0),GG,'13,底'),ALIGN0,SHIFT3,colorFF;
    DRAWTEXT((BB1 0),BB1,'21,底'),ALIGN0,SHIFT3,colorFF;
    DRAWTEXT((CC1 0),CC1,'34,底'),ALIGN0,SHIFT3,colorFF;
    DRAWTEXT((DD1 0),DD1,'55,底'),ALIGN0,SHIFT3,colorFF;
    DRAWTEXT((EE1 0),EE1,'89,底'),ALIGN0,SHIFT3,colorFF;
    DRAWTEXT((FF1 0),FF1,'144,底'),ALIGN0,SHIFT3,colorFF;
    GG1:=(SYSPARAM(2) = BARPOS);
    DRAWTEXT(GG1,99,'██████'),ALIGN1,colorFFFFFF;
    DRAWTEXT(GG1,80,'██████'),ALIGN1,colorFFFFFF;
    DRAWTEXT(GG1,29,'██████'),ALIGN1,colorFFFFFF;
    DRAWTEXT(GG1,6,'██████'),ALIGN1,colorFFFFFF;
    DRAWTEXT(GG1,99,'顶部转势日:'),ALIGN1,color4441FF;
    DRAWTEXT(GG1,80,'中国历法:'),ALIGN1,color4441FF;
    DRAWTEXT(GG1,29,'菲波纳奇数:'),ALIGN1,color4441FF;
    DRAWTEXT(GG1,6,'底部转势日:'),ALIGN1,color4441FF;
    DRAWTEXT((IF((AKA 0),1,0) 0),AKA,'日:'),ALIGN1,color4441FF;
    0,SHIFT3,color4441FF;
    8,SHIFT3,color4441FF;
    50,SHIFT3,color4441FF;
    92,SHIFT3,color4441FF;
    100,SHIFT3,color4441FF;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 农历时间之窗(飞狐) 加入收藏