文华财经期货支撑压力自动画线指标公式源码:
A:=”HOUR$2$TIME”;
NN:=A<>REF(A,1);
N:=BARSLAST(NN)+1;
HN:=HHV(H,N);
HN2:=REF(HN,N);
HN3:=REF(HN2,N);
LNN:=LLV(L,N);
LN2:=REF(LNN,N);
LN3:=REF(LN2,N);
HC:=MAX(MAX(HN,HN2),HN3);
LC:=MIN(MIN(LNN,LN2),LN3);
CC:=VALUEWHEN(NN,IF(0,1,REF(C,1)));
HH:=VALUEWHEN(NN,IF(0,1,REF(HC,1)));
LL:=VALUEWHEN(NN,IF(0,1,REF(LC,1)));
AAA:IF(PERIOD=1||PERIOD=2,(CC+HH+LL)/3,NULL),COLORLIGHTRED,LINETHICK1,NOTEXT;
DRAWSHIFTNUMBER(ISLASTBAR,AAA,AAA,0,COLORLIGHTBLUE,2,2),ALIGN0,VALIGN1;
BBB:=ABS((HH+LL)/2-AAA);
CCC:IF(PERIOD=1||PERIOD=2,AAA+BBB,NULL),COLORLIGHTGREEN,DOT;
DDD:IF(PERIOD=1||PERIOD=2,AAA-BBB,NULL),COLORMAGENTA,DOT;
//前一天的高低点在当天显示
NNB:=BARSLAST(DATE<>REF(DATE,1))+1;
HHHH:=HHV(H,NNB);
LLLL:=LLV(L,NNB);
HHQ:IF((PERIOD=1||PERIOD=2)&&BACKSET(ISLASTBAR,DAYBARPOS),REF(HHHH,NNB),NULL),COLORGRAY,DASH;
DRAWSHIFTNUMBER(ISLASTBAR,HHQ,HHQ,2,COLORGRAY,2,2),ALIGN0,VALIGN1;
LLQ:IF((PERIOD=1||PERIOD=2)&&BACKSET(ISLASTBAR,DAYBARPOS),REF(LLLL,NNB),NULL),COLORGRAY,DASH;
DRAWSHIFTNUMBER(ISLASTBAR,LLQ,LLQ,2,COLORGRAY,2,2),ALIGN0,VALIGN1;
NNQ:=DATE<>REF(DATE,1);
NM:=BARSLAST(NNQ)+1;
HNQ:=HHV(H,NM);
HNQ2:=REF(HNQ,NM);
HNQ3:=REF(HNQ2,NM);
LNQNQ:=LLV(L,NM);
LNQ2:=REF(LNQNQ,NM);
LNQ3:=REF(LNQ2,NM);
HCQ:=MAX(MAX(HNQ,HNQ2),HNQ3);
LCQ:=MIN(MIN(LNQNQ,LNQ2),LNQ3);
CCQ:=VALUEWHEN(NNQ,IF(0,1,REF(C,1)));
HHU:=VALUEWHEN(NNQ,IF(0,1,REF(HCQ,1)));
LLU:=VALUEWHEN(NNQ,IF(0,1,REF(LCQ,1)));
AAAQ:IF(PERIOD=3||PERIOD=4||PERIOD=5,(CCQ+HHU+LLU)/3,NULL),COLORLIGHTRED,LINETHICK1;
DRAWSHIFTNUMBER(ISLASTBAR,AAAQ,AAAQ,0,COLORLIGHTBLUE,2,2),ALIGN0,VALIGN1;
BBBQ:=ABS((HHU+LLU)/2-AAAQ);
CCQC:IF(PERIOD=3||PERIOD=4||PERIOD=5,AAAQ+BBBQ,NULL),COLORLIGHTGREEN,DOT;
DRAWSHIFTNUMBER(ISLASTBAR,CCQC,CCQC,0,COLORLIGHTBLUE,2,2),ALIGN0,VALIGN1;
DDDQ:IF(PERIOD=3||PERIOD=4||PERIOD=5,AAAQ-BBBQ,NULL),COLORMAGENTA,DOT;
DRAWSHIFTNUMBER(ISLASTBAR,DDDQ,DDDQ,0,COLORLIGHTBLUE,2,2),ALIGN0,VALIGN1;
//{云析赢指标公式网,指标公式,指标源码,指标编写教程、指标破解指标论坛。www.zbgs518.com}
WNN:=WEEKDAY=1 AND REF(WEEKDAY,1)>1;
WN:=BARSLAST(WNN)+1;
WHN:=HHV(H,WN);
WHN2:=REF(WHN,WN);
WHN3:=REF(WHN2,WN);
LWNN:=LLV(L,WN);
WLN2:=REF(LWNN,WN);
WLN3:=REF(WLN2,WN);
WHC:=MAX(MAX(WHN,WHN2),WHN3);
WLC:=MIN(MIN(LWNN,WLN2),WLN3);
WCC:=VALUEWHEN(WNN,IF(0,1,REF(C,1)));
WHH:=VALUEWHEN(WNN,IF(0,1,REF(WHC,1)));
WLL:=VALUEWHEN(WN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