在文华财经的1分钟K线图中加入分时图的均价线
在K线指标代码下加
M:=BARPOS;
M2:=ISLASTBAR,M;
M3:=IFELSE(M2=1,DATE,M);
M4:=IFELSE(M3-1=REF(M3,1),REFX(M3,1),M3);
M5:=VALUEWHEN(M4>0,M3);
P2:=IFELSE(M5<REFX(M5,1),REFX(M5,1),M5);
P3:=IFELSE(P2<REFX(P2,1),REFX(P2,2),P2);
P4:=IFELSE(P3<REFX(P3,1),REFX(P3,3),P3);
P5:=IFELSE(P4<REFX(P4,1),REFX(P4,4),P4);
P6:=IFELSE(P5<REFX(P5,1),REFX(P5,5),P5);
P7:=IFELSE(P6<REFX(P6,1),REFX(P6,6),P6);
P8:=IFELSE(P7<REFX(P7,1),REFX(P7,7),P7);
P9:=IFELSE(P8<REFX(P8,1),REFX(P8,8),P8);
P10:=IFELSE(P9<REFX(P9,1),REFX(P9,9),P9);
P11:=IFELSE(P10<REFX(P10,1),REFX(P10,10),P10);
P12:=IFELSE(P11<REFX(P11,1),REFX(P11,11),P11);
P13:=IFELSE(P12<REFX(P12,1),REFX(P12,12),P12);
P14:=IFELSE(P13<REFX(P13,1),REFX(P13,13),P13);
P15:=IFELSE(P14<REFX(P14,1),REFX(P14,14),P14);
P16:=IFELSE(P15<REFX(P15,1),REFX(P15,15),P15);
P17:=IFELSE(P16<REFX(P16,1),REFX(P16,16),P16);
P18:=IFELSE(P17<REFX(P17,1),REFX(P17,17),P17);
P19:=IFELSE(P18<REFX(P18,1),REFX(P18,18),P18);
P20:=IFELSE(P19<REFX(P19,1),REFX(P19,19),P19);
P21:=IFELSE(P20<REFX(P20,1),REFX(P20,20),P20);
P22:=IFELSE(P21<REFX(P21,1),REFX(P21,21),P21);
P23:=IFELSE(P22<REFX(P22,1),REFX(P22,22),P22);
P24:=IFELSE(P23<REFX(P23,1),REFX(P23,23),P23);
P25:=IFELSE(P24<REFX(P24,1),REFX(P24,24),P24);
P26:=IFELSE(P25<REFX(P25,1),REFX(P25,25),P25);
P27:=IFELSE(P26<REFX(P26,1),REFX(P26,26),P26);
P28:=IFELSE(P27<REFX(P27,1),REFX(P27,27),P27);
P29:=IFELSE(P28<REFX(P28,1),REFX(P28,28),P28);
P30:=IFELSE(P29<REFX(P29,1),REFX(P29,29),P29);
D:=IFELSE(P30<REFX(P30,1),REFX(P30,30),P30);
BB:=BARSLAST(DAY<>REF(DAY,1))+1;
JJ:=SUM(CLOSE*VOL,BB)/SUM(VOL,BB);
PARTLINE(DATE=D,JJ,COLORYELLOW);
试试这个
|