以下是文华财经的代码,帮我转化成金字塔的,谢谢
A:=L>=LV(L,2)&&H>HV(H,2)||L>=REF(L,1)&&H>REF(H,1);
B:=H<=HV(H,2)&&L<LV(L,2)||H<=REF(H,1)&&L<REF(L,1);
J:=COUNT(A,BARSLAST(B)+1)=1&&A,ICON(1,'ICO1');
S:=COUNT(B,BARSLAST(A)+1)=1&&B,ICON(1,'ICO2');
HH1:=BACKSET((REFX(S,1))&&HHV(H,BARSLAST(J)+1)=VALUEWHEN(J,H),BARSLAST(J)+1),NODRAW;
LL1:=BACKSET((REFX(J,1))&&LLV(L,BARSLAST(S)+1)=VALUEWHEN(S,L),BARSLAST(S)+1),NODRAW;
HH2:=BACKSET((REFX(S,1))&&HHV(H,BARSLAST(J)+1)<>VALUEWHEN(J,H),BARSLAST(H>HV(H,BARSLAST(J))) +1),NODRAW;
LL2:=BACKSET((REFX(J,1))&&LLV(L,BARSLAST(S)+1)<>VALUEWHEN(S,L),BARSLAST(L<LV(L,BARSLAST(S)))+1),NODRAW;
HH:=CROSS(HH1=1,0.5)||CROSS(HH2=1,0.5),ICON(1,'ICO16');
LL:=CROSS(LL1=1,0.5)||CROSS(LL2=1,0.5),ICON(1,'ICO17');
DRAWLINE1(HH,H,LL,L,0),COLORGRAY,LINETHICK1,DOT;
DRAWLINE1(LL,L,HH,H,0),COLORGRAY,LINETHICK1,DOT;
//下跌波段加粗
XXX:=LL && L<REF(L,SUMBARS(LL,2)-1) && REF(L,SUMBARS(LL,2)-1)<REF(L,SUMBARS(LL,3)-1) && REF(H,SUMBARS(HH,1)-1)<REF(H,SUMBARS(HH,2)-1);
DRAWLINE3(CROSS(LL,0.001)&&XXX,L,0,1,REF(H,SUMBARS(CROSS(HH,0.001),1)-1),SUMBARS(CROSS(HH,0.001),1)-1,0),COLORGREEN,LINETHICK3;
//上涨波段加粗
XXH:=HH && H>REF(H,SUMBARS(HH,2)-1) && REF(H,SUMBARS(HH,2)-1)>REF(H,SUMBARS(HH,3)-1)&& REF(L,SUMBARS(LL,1)-1)>REF(L,SUMBARS(LL,2)-1);
DRAWLINE3(CROSS(HH,0.001)&&XXH,H,0,1,REF(L,SUMBARS(CROSS(LL,0.001),1)-1),SUMBARS(CROSS(LL,0.001),1)-1,0),COLORRED,LINETHICK3;
A:=L>=REF(LLV(L,2),1) AND H>REF(HHV(H,2),1) OR L>=REF(L,1) AND H>REF(H,1);
B:=H<REF(HHV(H,2),1) AND L<REF(LLV(L,2),1) OR H<=REF(H,1) AND L<REF(L,1);
J:=COUNT(A,BARSLAST(B)+1)=1 AND A;
S:=COUNT(B,BARSLAST(A)+1)=1 AND B;
DRAWICON(J,H,1);
DRAWICON(S,H,2);
HH1:=BACKSET((REFX(S,1))&&HHV(H,BARSLAST(J)+1)=VALUEWHEN(J,H),BARSLAST(J)+1),NODRAW;
LL1:=BACKSET((REFX(J,1))&&LLV(L,BARSLAST(S)+1)=VALUEWHEN(S,L),BARSLAST(S)+1),NODRAW;
HH2:=BACKSET((REFX(S,1))&&HHV(H,BARSLAST(J)+1)<>VALUEWHEN(J,H),BARSLAST(H>REF(HHV(H,BARSLAST(J)),1)) +1),NODRAW;
LL2:=BACKSET((REFX(J,1))&&LLV(L,BARSLAST(S)+1)<>VALUEWHEN(S,L),BARSLAST(L<REF(LLV(L,BARSLAST(S)),1))+1),NODRAW;
HH:=CROSS(HH1=1,0.5) OR CROSS(HH2=1,0.5);
LL:=CROSS(LL1=1,0.5) OR CROSS(LL2=1,0.5);
DRAWICON(HH,H,6);
DRAWICON(LL,H,7);
DRAWLINE(HH,H,LL,L,0),COLORGRAY,LINETHICK1,DOT;
DRAWLINE(LL,L,HH,H,0),COLORGRAY,LINETHICK1,DOT;
//下跌波段加粗
XXX:=LL && L<REF(L,SUMBARS(LL,2)-1) && REF(L,SUMBARS(LL,2)-1)<REF(L,SUMBARS(LL,3)-1) && REF(H,SUMBARS(HH,1)-1)<REF(H,SUMBARS(HH,2)-1);
//DRAWLINE3(CROSS(LL,0.001)&&XXX,L,0,1,REF(H,SUMBARS(CROSS(HH,0.001),1)-1),SUMBARS(CROSS(HH,0.001),1)-1,0),COLORGREEN,LINETHICK3;
//上涨波段加粗
XXH:=HH && H>REF(H,SUMBARS(HH,2)-1) && REF(H,SUMBARS(HH,2)-1)>REF(H,SUMBARS(HH,3)-1)&& REF(L,SUMBARS(LL,1)-1)>REF(L,SUMBARS(LL,2)-1);
//DRAWLINE3(CROSS(HH,0.001)&&XXH,H,0,1,REF(L,SUMBARS(CROSS(LL,0.001),1)-1),SUMBARS(CROSS(LL,0.001),1)-1,0),COLORRED,LINETHICK3;
仅供参考,其中DRAWLINE3函数无法对应转换。