以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://222.73.7.161/bbs/index.asp) -- 公式模型编写问题提交 (http://222.73.7.161/bbs/list.asp?boardid=4) ---- [求助]文华指标改成金字塔的,谢谢 (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=172461) |
-- 作者:loveice -- 发布时间:2019/10/17 11:26:18 -- [求助]文华指标改成金字塔的,谢谢 HH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1; LL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1; D90H:=EMA(HH,90),COLORRED,LINETHICK1; D90L:=EMA(LL,90),COLORRED,LINETHICK1; DGH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1; DDL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1; D90C:=D90H-D90L; D90D:=D90H+D90C*2,COLORRED,LINETHICK1; D90T:=D90L-D90C*2,COLORRED,LINETHICK1; KK:=H; BB1:IF(REFX(KK,1)=NULL,0,REFX(KK,1))+IF(REFX(KK,2)=NULL,0,REFX(KK,2))+IF(ISNULL(REFX(KK,3)),0,REFX(KK,3))+IF(ISNULL(REFX(KK,4)),0,REFX(KK,4))+IF(ISNULL(REFX(KK,5)),0,REFX(KK,5))+IF(ISNULL(REFX(KK,6)),0,REFX(KK,6))+IF(ISNULL(REFX(KK,7)),0,REFX(KK,7))+IF(ISNULL(REFX(KK,8)),0,REFX(KK,8))+IF(ISNULL(REFX(KK,9)),0,REFX(KK,9))+IF(ISNULL(REFX(KK,10)),0,REFX(KK,10))+IF(ISNULL(REFX(KK,11)),0,REFX(KK,11))+IF(ISNULL(REFX(KK,12)),0,REFX(KK,12))+IF(ISNULL(REFX(KK,13)),0,REFX(KK,13))+IF(ISNULL(REFX(KK,14)),0,REFX(KK,14))+IF(ISNULL(REFX(KK,15)),0,REFX(KK,15))+IF(ISNULL(REFX(KK,16)),0,REFX(KK,16))+IF(ISNULL(REFX(KK,17)),0,REFX(KK,17))+IF(ISNULL(REFX(KK,18)),0,REFX(KK,18))+IF(ISNULL(REFX(KK,19)),0,REFX(KK,19))+IF(ISNULL(REFX(KK,20)),0,REFX(KK,20))+IF(ISNULL(REFX(KK,21)),0,REFX(KK,21))+IF(ISNULL(REFX(KK,22)),0,REFX(KK,22))+IF(ISNULL(REFX(KK,23)),0,REFX(KK,23))+IF(ISNULL(REFX(KK,24)),0,REFX(KK,24))+IF(ISNULL(REFX(KK,25)),0,REFX(KK,25))+IF(ISNULL(REFX(KK,26)),0,REFX(KK,26))+IF(ISNULL(REFX(KK,27)),0,REFX(KK,27))+IF(ISNULL(REFX(KK,28)),0,REFX(KK,28))+IF(ISNULL(REFX(KK,29)),0,REFX(KK,29)); BB2:=ISNULL(REFX(KK,1))+ISNULL(REFX(KK,2))+ISNULL(REFX(KK,3))+ISNULL(REFX(KK,4))+ISNULL(REFX(KK,5))+ISNULL(REFX(KK,6))+ISNULL(REFX(KK,7))+ISNULL(REFX(KK,8))+ISNULL(REFX(KK,9))+ISNULL(REFX(KK,10))+ISNULL(REFX(KK,11))+ISNULL(REFX(KK,12))+ISNULL(REFX(KK,13))+ISNULL(REFX(KK,14))+ISNULL(REFX(KK,15))+ISNULL(REFX(KK,16))+ISNULL(REFX(KK,17))+ISNULL(REFX(KK,18))+ISNULL(REFX(KK,19))+ISNULL(REFX(KK,20))+ISNULL(REFX(KK,21))+ISNULL(REFX(KK,22))+ISNULL(REFX(KK,23))+ISNULL(REFX(KK,24))+ISNULL(REFX(KK,25))+ISNULL(REFX(KK,26))+ISNULL(REFX(KK,27))+ISNULL(REFX(KK,28))+ISNULL(REFX(KK,29)); BB3:=(SUM(KK,31)+BB1)/(60-BB2); KK1:=BB3; BB4:=IF(ISNULL(REFX(KK1,1)),0,REFX(KK1,1))+IF(ISNULL(REFX(KK1,2)),0,REFX(KK1,2))+IF(ISNULL(REFX(KK1,3)),0,REFX(KK1,3))+IF(ISNULL(REFX(KK1,4)),0,REFX(KK1,4))+IF(ISNULL(REFX(KK1,5)),0,REFX(KK1,5))+IF(ISNULL(REFX(KK1,6)),0,REFX(KK1,6))+IF(ISNULL(REFX(KK1,7)),0,REFX(KK1,7))+IF(ISNULL(REFX(KK1,8)),0,REFX(KK1,8))+IF(ISNULL(REFX(KK1,9)),0,REFX(KK1,9))+IF(ISNULL(REFX(KK1,10)),0,REFX(KK1,10))+IF(ISNULL(REFX(KK1,11)),0,REFX(KK1,11))+IF(ISNULL(REFX(KK1,12)),0,REFX(KK1,12))+IF(ISNULL(REFX(KK1,13)),0,REFX(KK1,13))+IF(ISNULL(REFX(KK1,14)),0,REFX(KK1,14))+IF(ISNULL(REFX(KK1,15)),0,REFX(KK1,15))+IF(ISNULL(REFX(KK1,16)),0,REFX(KK1,16))+IF(ISNULL(REFX(KK1,17)),0,REFX(KK1,17))+IF(ISNULL(REFX(KK1,18)),0,REFX(KK1,18))+IF(ISNULL(REFX(KK1,19)),0,REFX(KK1,19))+IF(ISNULL(REFX(KK1,20)),0,REFX(KK1,20))+IF(ISNULL(REFX(KK1,21)),0,REFX(KK1,21))+IF(ISNULL(REFX(KK1,22)),0,REFX(KK1,22))+IF(ISNULL(REFX(KK1,23)),0,REFX(KK1,23))+IF(ISNULL(REFX(KK1,24)),0,REFX(KK1,24))+IF(ISNULL(REFX(KK1,25)),0,REFX(KK1,25))+IF(ISNULL(REFX(KK1,26)),0,REFX(KK1,26))+IF(ISNULL(REFX(KK1,27)),0,REFX(KK1,27))+IF(ISNULL(REFX(KK1,28)),0,REFX(KK1,28))+IF(ISNULL(REFX(KK1,29)),0,REFX(KK1,29)); BB5:=ISNULL(REFX(KK1,1))+ISNULL(REFX(KK1,2))+ISNULL(REFX(KK1,3))+ISNULL(REFX(KK1,4))+ISNULL(REFX(KK1,5))+ISNULL(REFX(KK1,6))+ISNULL(REFX(KK1,7))+ISNULL(REFX(KK1,8))+ISNULL(REFX(KK1,9))+ISNULL(REFX(KK1,10))+ISNULL(REFX(KK1,11))+ISNULL(REFX(KK1,12))+ISNULL(REFX(KK1,13))+ISNULL(REFX(KK1,14))+ISNULL(REFX(KK1,15))+ISNULL(REFX(KK1,16))+ISNULL(REFX(KK1,17))+ISNULL(REFX(KK1,18))+ISNULL(REFX(KK1,19))+ISNULL(REFX(KK1,20))+ISNULL(REFX(KK1,21))+ISNULL(REFX(KK1,22))+ISNULL(REFX(KK1,23))+ISNULL(REFX(KK1,24))+ISNULL(REFX(KK1,25))+ISNULL(REFX(KK1,26))+ISNULL(REFX(KK1,27))+ISNULL(REFX(KK1,28))+ISNULL(REFX(KK1,29)); XXMA60H:=(SUM(KK1,31)+BB4)/(60-BB5); KK2:=L; DD1:=IF(ISNULL(REFX(KK2,1)),0,REFX(KK2,1))+IF(ISNULL(REFX(KK2,2)),0,REFX(KK2,2))+IF(ISNULL(REFX(KK2,3)),0,REFX(KK2,3))+IF(ISNULL(REFX(KK2,4)),0,REFX(KK2,4))+IF(ISNULL(REFX(KK2,5)),0,REFX(KK2,5))+IF(ISNULL(REFX(KK2,6)),0,REFX(KK2,6))+IF(ISNULL(REFX(KK2,7)),0,REFX(KK2,7))+IF(ISNULL(REFX(KK2,8)),0,REFX(KK2,8))+IF(ISNULL(REFX(KK2,9)),0,REFX(KK2,9))+IF(ISNULL(REFX(KK2,10)),0,REFX(KK2,10))+IF(ISNULL(REFX(KK2,11)),0,REFX(KK2,11))+IF(ISNULL(REFX(KK2,12)),0,REFX(KK2,12))+IF(ISNULL(REFX(KK2,13)),0,REFX(KK2,13))+IF(ISNULL(REFX(KK2,14)),0,REFX(KK2,14))+IF(ISNULL(REFX(KK2,15)),0,REFX(KK2,15))+IF(ISNULL(REFX(KK2,16)),0,REFX(KK2,16))+IF(ISNULL(REFX(KK2,17)),0,REFX(KK2,17))+IF(ISNULL(REFX(KK2,18)),0,REFX(KK2,18))+IF(ISNULL(REFX(KK2,19)),0,REFX(KK2,19))+IF(ISNULL(REFX(KK2,20)),0,REFX(KK2,20))+IF(ISNULL(REFX(KK2,21)),0,REFX(KK2,21))+IF(ISNULL(REFX(KK2,22)),0,REFX(KK2,22))+IF(ISNULL(REFX(KK2,23)),0,REFX(KK2,23))+IF(ISNULL(REFX(KK2,24)),0,REFX(KK2,24))+IF(ISNULL(REFX(KK2,25)),0,REFX(KK2,25))+IF(ISNULL(REFX(KK2,26)),0,REFX(KK2,26))+IF(ISNULL(REFX(KK2,27)),0,REFX(KK2,27))+IF(ISNULL(REFX(KK2,28)),0,REFX(KK2,28))+IF(ISNULL(REFX(KK2,29)),0,REFX(KK2,29)); DD2:=ISNULL(REFX(KK2,1))+ISNULL(REFX(KK2,2))+ISNULL(REFX(KK2,3))+ISNULL(REFX(KK2,4))+ISNULL(REFX(KK2,5))+ISNULL(REFX(KK2,6))+ISNULL(REFX(KK2,7))+ISNULL(REFX(KK2,8))+ISNULL(REFX(KK2,9))+ISNULL(REFX(KK2,10))+ISNULL(REFX(KK2,11))+ISNULL(REFX(KK2,12))+ISNULL(REFX(KK2,13))+ISNULL(REFX(KK2,14))+ISNULL(REFX(KK2,15))+ISNULL(REFX(KK2,16))+ISNULL(REFX(KK2,17))+ISNULL(REFX(KK2,18))+ISNULL(REFX(KK2,19))+ISNULL(REFX(KK2,20))+ISNULL(REFX(KK2,21))+ISNULL(REFX(KK2,22))+ISNULL(REFX(KK2,23))+ISNULL(REFX(KK2,24))+ISNULL(REFX(KK2,25))+ISNULL(REFX(KK2,26))+ISNULL(REFX(KK2,27))+ISNULL(REFX(KK2,28))+ISNULL(REFX(KK2,29)); DD3:=(SUM(KK2,31)+DD1)/(60-DD2); KK3:=DD3; DD4:=IF(ISNULL(REFX(KK3,1)),0,REFX(KK3,1))+IF(ISNULL(REFX(KK3,2)),0,REFX(KK3,2))+IF(ISNULL(REFX(KK3,3)),0,REFX(KK3,3))+IF(ISNULL(REFX(KK3,4)),0,REFX(KK3,4))+IF(ISNULL(REFX(KK3,5)),0,REFX(KK3,5))+IF(ISNULL(REFX(KK3,6)),0,REFX(KK3,6))+IF(ISNULL(REFX(KK3,7)),0,REFX(KK3,7))+IF(ISNULL(REFX(KK3,8)),0,REFX(KK3,8))+IF(ISNULL(REFX(KK3,9)),0,REFX(KK3,9))+IF(ISNULL(REFX(KK3,10)),0,REFX(KK3,10))+IF(ISNULL(REFX(KK3,11)),0,REFX(KK3,11))+IF(ISNULL(REFX(KK3,12)),0,REFX(KK3,12))+IF(ISNULL(REFX(KK3,13)),0,REFX(KK3,13))+IF(ISNULL(REFX(KK3,14)),0,REFX(KK3,14))+IF(ISNULL(REFX(KK3,15)),0,REFX(KK3,15))+IF(ISNULL(REFX(KK3,16)),0,REFX(KK3,16))+IF(ISNULL(REFX(KK3,17)),0,REFX(KK3,17))+IF(ISNULL(REFX(KK3,18)),0,REFX(KK3,18))+IF(ISNULL(REFX(KK3,19)),0,REFX(KK3,19))+IF(ISNULL(REFX(KK3,20)),0,REFX(KK3,20))+IF(ISNULL(REFX(KK3,21)),0,REFX(KK3,21))+IF(ISNULL(REFX(KK3,22)),0,REFX(KK3,22))+IF(ISNULL(REFX(KK3,23)),0,REFX(KK3,23))+IF(ISNULL(REFX(KK3,24)),0,REFX(KK3,24))+IF(ISNULL(REFX(KK3,25)),0,REFX(KK3,25))+IF(ISNULL(REFX(KK3,26)),0,REFX(KK3,26))+IF(ISNULL(REFX(KK3,27)),0,REFX(KK3,27))+IF(ISNULL(REFX(KK3,28)),0,REFX(KK3,28))+IF(ISNULL(REFX(KK3,29)),0,REFX(KK3,29)); DD5:=ISNULL(REFX(KK3,1))+ISNULL(REFX(KK3,2))+ISNULL(REFX(KK3,3))+ISNULL(REFX(KK3,4))+ISNULL(REFX(KK3,5))+ISNULL(REFX(KK3,6))+ISNULL(REFX(KK3,7))+ISNULL(REFX(KK3,8))+ISNULL(REFX(KK3,9))+ISNULL(REFX(KK3,10))+ISNULL(REFX(KK3,11))+ISNULL(REFX(KK3,12))+ISNULL(REFX(KK3,13))+ISNULL(REFX(KK3,14))+ISNULL(REFX(KK3,15))+ISNULL(REFX(KK3,16))+ISNULL(REFX(KK3,17))+ISNULL(REFX(KK3,18))+ISNULL(REFX(KK3,19))+ISNULL(REFX(KK3,20))+ISNULL(REFX(KK3,21))+ISNULL(REFX(KK3,22))+ISNULL(REFX(KK3,23))+ISNULL(REFX(KK3,24))+ISNULL(REFX(KK3,25))+ISNULL(REFX(KK3,26))+ISNULL(REFX(KK3,27))+ISNULL(REFX(KK3,28))+ISNULL(REFX(KK3,29)); XXMA60L:=(SUM(KK3,31)+DD4)/(60-DD5); MM:=H; CC1:=IF(ISNULL(REFX(MM,1)),0,REFX(MM,1))+IF(ISNULL(REFX(MM,2)),0,REFX(MM,2))+IF(ISNULL(REFX(MM,3)),0,REFX(MM,3))+IF(ISNULL(REFX(MM,4)),0,REFX(MM,4))+IF(ISNULL(REFX(MM,5)),0,REFX(MM,5))+IF(ISNULL(REFX(MM,6)),0,REFX(MM,6))+IF(ISNULL(REFX(MM,7)),0,REFX(MM,7))+IF(ISNULL(REFX(MM,8)),0,REFX(MM,8))+IF(ISNULL(REFX(MM,9)),0,REFX(MM,9))+IF(ISNULL(REFX(MM,10)),0,REFX(MM,10))+IF(ISNULL(REFX(MM,11)),0,REFX(MM,11))+IF(ISNULL(REFX(MM,12)),0,REFX(MM,12)); CC2:=ISNULL(REFX(MM,1))+ISNULL(REFX(MM,2))+ISNULL(REFX(MM,3))+ISNULL(REFX(MM,4))+ISNULL(REFX(MM,5))+ISNULL(REFX(MM,6))+ISNULL(REFX(MM,7))+ISNULL(REFX(MM,8))+ISNULL(REFX(MM,9))+ISNULL(REFX(MM,10))+ISNULL(REFX(MM,11))+ISNULL(REFX(MM,12)); CC3:=(SUM(MM,13)+CC1)/(25-CC2); MM1:=CC3; CC4:=IF(ISNULL(REFX(MM1,1)),0,REFX(MM1,1))+IF(ISNULL(REFX(MM1,2)),0,REFX(MM1,2))+IF(ISNULL(REFX(MM1,3)),0,REFX(MM1,3))+IF(ISNULL(REFX(MM1,4)),0,REFX(MM1,4))+IF(ISNULL(REFX(MM1,5)),0,REFX(MM1,5))+IF(ISNULL(REFX(MM1,6)),0,REFX(MM1,6))+IF(ISNULL(REFX(MM1,7)),0,REFX(MM1,7))+IF(ISNULL(REFX(MM1,8)),0,REFX(MM1,8))+IF(ISNULL(REFX(MM1,9)),0,REFX(MM1,9))+IF(ISNULL(REFX(MM1,10)),0,REFX(MM1,10))+IF(ISNULL(REFX(MM1,11)),0,REFX(MM1,11))+IF(ISNULL(REFX(MM1,12)),0,REFX(MM1,12)); CC5:=ISNULL(REFX(MM1,1))+ISNULL(REFX(MM1,2))+ISNULL(REFX(MM1,3))+ISNULL(REFX(MM1,4))+ISNULL(REFX(MM1,5))+ISNULL(REFX(MM1,6))+ISNULL(REFX(MM1,7))+ISNULL(REFX(MM1,8))+ISNULL(REFX(MM1,9))+ISNULL(REFX(MM1,10))+ISNULL(REFX(MM1,11))+ISNULL(REFX(MM1,12)); XXMA25H:=(SUM(MM1,13)+CC4)/(25-CC5); MM2:=L; EE1:=IF(ISNULL(REFX(MM2,1)),0,REFX(MM2,1))+IF(ISNULL(REFX(MM2,2)),0,REFX(MM2,2))+IF(ISNULL(REFX(MM2,3)),0,REFX(MM2,3))+IF(ISNULL(REFX(MM2,4)),0,REFX(MM2,4))+IF(ISNULL(REFX(MM2,5)),0,REFX(MM2,5))+IF(ISNULL(REFX(MM2,6)),0,REFX(MM2,6))+IF(ISNULL(REFX(MM2,7)),0,REFX(MM2,7))+IF(ISNULL(REFX(MM2,8)),0,REFX(MM2,8))+IF(ISNULL(REFX(MM2,9)),0,REFX(MM2,9))+IF(ISNULL(REFX(MM2,10)),0,REFX(MM2,10))+IF(ISNULL(REFX(MM2,11)),0,REFX(MM2,11))+IF(ISNULL(REFX(MM2,12)),0,REFX(MM2,12)); EE2:=ISNULL(REFX(MM2,1))+ISNULL(REFX(MM2,2))+ISNULL(REFX(MM2,3))+ISNULL(REFX(MM2,4))+ISNULL(REFX(MM2,5))+ISNULL(REFX(MM2,6))+ISNULL(REFX(MM2,7))+ISNULL(REFX(MM2,8))+ISNULL(REFX(MM2,9))+ISNULL(REFX(MM2,10))+ISNULL(REFX(MM2,11))+ISNULL(REFX(MM2,12)); EE3:=(SUM(MM2,13)+EE1)/(25-EE2); MM3:=EE3; EE4:=IF(ISNULL(REFX(MM3,1)),0,REFX(MM3,1))+IF(ISNULL(REFX(MM3,2)),0,REFX(MM3,2))+IF(ISNULL(REFX(MM3,3)),0,REFX(MM3,3))+IF(ISNULL(REFX(MM3,4)),0,REFX(MM3,4))+IF(ISNULL(REFX(MM3,5)),0,REFX(MM3,5))+IF(ISNULL(REFX(MM3,6)),0,REFX(MM3,6))+IF(ISNULL(REFX(MM3,7)),0,REFX(MM3,7))+IF(ISNULL(REFX(MM3,8)),0,REFX(MM3,8))+IF(ISNULL(REFX(MM3,9)),0,REFX(MM3,9))+IF(ISNULL(REFX(MM3,10)),0,REFX(MM3,10))+IF(ISNULL(REFX(MM3,11)),0,REFX(MM3,11))+IF(ISNULL(REFX(MM3,12)),0,REFX(MM3,12)); EE5:=ISNULL(REFX(MM3,1))+ISNULL(REFX(MM3,2))+ISNULL(REFX(MM3,3))+ISNULL(REFX(MM3,4))+ISNULL(REFX(MM3,5))+ISNULL(REFX(MM3,6))+ISNULL(REFX(MM3,7))+ISNULL(REFX(MM3,8))+ISNULL(REFX(MM3,9))+ISNULL(REFX(MM3,10))+ISNULL(REFX(MM3,11))+ISNULL(REFX(MM3,12)); XXMA25L:=(SUM(MM3,13)+EE4)/(25-EE5); G0:=2*XXMA25H-XXMA25L,LINETHICK1,COLORWHITE; D0:=2*XXMA25L-XXMA25H,LINETHICK1,COLORWHITE; DTD:=D0>=D90T && G0>=D90D; KTD:=G0<=D90D && D0<=D90T; ZDD:=D0>=D90T && G0<=D90D; BDD0:=4*XXMA60H-3*XXMA60L,LINETHICK2,COLORGREEN; BDT0:=4*XXMA60L-3*XXMA60H,LINETHICK2,COLORGREEN; //ZK1:2*XXMA25H-XXMA25L,COLORBLUE,LINETHICK3; ZK1:2*XXMA25H-XXMA25L,COLORWHITE,DOT; //ZD1:2*XXMA25L-XXMA25H,COLORRED,LINETHICK3; ZD1:2*XXMA25L-XXMA25H,COLORRED,DOT; //ZD2:EMA(ZD1,25),COLORMAGENTA,LINETHICK3; ZD2:EMA(ZD1,25),COLORMAGENTA,LINETHICK1,DOT; FILLRGN1(ZD1>ZD2,ZD1,ZD2),COLOR660000; FILLRGN1(ZD1<ZD2,ZD1,ZD2),COLOR003300; BS:=3.2*XXMA60H-2.2*XXMA60L,DOT,COLORRED; BD:=3.8*XXMA60L-2.8*XXMA60H,DOT,COLORGREEN; SS:=2.5*XXMA25L-1.5*XXMA25H,DOT,COLORGREEN; ZZ:=(ZK1+ZD1)/2,DOT,COLORYELLOW; D90H1:=D90H,DOT,COLORGRAY; D90L1:=D90L,DOT,COLORGRAY; DEA3:=EMA((EMA(CLOSE,3)-EMA(CLOSE,6)),9),COLORGREEN,LINETHICK2; DEA3B:=REF(DEA3,1),COLORWHITE; DEA33B:=EMA((EMA(EMA(CLOSE,3)-EMA(CLOSE,9),3)-EMA(EMA(CLOSE,3)-EMA(CLOSE,9),9)),9),COLORWHITE; DEA333B:=REF(DEA33B,1),COLORWHITE; DRAWKLINE1(H,O,L,C); //下轨下的K线部分显示黄色 STICKLINE1(ZD1>LOW AND ZD1<HIGH,ZD1,MIN(MIN(OPEN,CLOSE),ZD1),3,0),COLORYELLOW; STICKLINE1(ZD1>MIN(C,O) AND ZD1<MAX(C,O),ZD1,MIN(OPEN,CLOSE),3,0),COLORYELLOW; STICKLINE1(ZD1>HIGH,OPEN,CLOSE,3,0),COLORYELLOW; STICKLINE1(ZD1>HIGH,HIGH,LOW,0,0),COLORYELLOW; 短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1; 短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1; B:=(短高H+短低L)/2; D :=MA(B,10); D14:=MA(B,14),COLORRED,LINETHICK7; D21:=MA(B,21),COLORRED,LINETHICK7; A1:=MA((3*C+L+ O +H)/6,28); B1:=(20*A1+19*REF(A1,1)+18*REF(A1,2)+17*REF(A1,3)+16*REF(A1,4)+15*REF(A1,5)+14*REF(A1,6)+13*REF(A1,7)+12*REF(A1,8)+11*REF(A1,9)+10*REF(A1,10)+9*REF(A1,11)+8*REF(A1,12)+7*REF(A1,13)+6*REF(A1,14)+5*REF(A1,15)+4*REF(A1,16)+3*REF(A1,17)+2*REF(A1,18)+REF(A1,12))/210,COLORGREEN,LINETHICK2; D1:=MA(B1,14),COLORGREEN,LINETHICK2; D90H11:=EMA(短高H,90),COLORRED,LINETHICK1; D90L11:=EMA(短低L,90),COLORRED,LINETHICK1; D90差:=D90H11-D90L11; D90顶:=D90H11+D90差*2,COLORRED,LINETHICK1; D90底:=D90L11-D90差*2,COLORRED,LINETHICK1; D90HH:=D90H11-D90差*0.1,COLORRED,LINETHICK1; D90LL:=D90L11+D90差*0.1,COLORRED,LINETHICK1; TOPH:=REFX1(MA(H,30),30/2); BOTL:=REFX1(MA(L,30),30/2); TOPHH:=REFX1(MA(TOPH,30),30/2); BOTLL:=REFX1(MA(BOTL,30),30/2); 高0:=(TOPHH-BOTLL)*1+TOPHH; 低0:=BOTLL-(TOPHH-BOTLL)*1; 多头定位:=低0>=D90底 && 高0>=D90顶; 空头定位:=高0<=D90顶 && 低0<=D90底; 震荡定位:=低0>=D90底 && 高0<=D90顶; HXMA:=REFX1(MA(H,60),60/2); LXMA:=REFX1(MA(L,60),60/2); HHXMA:=REFX1(MA(HXMA,60),60/2); LLXMA:=REFX1(MA(LXMA,60),60/2); 波段顶00:=(HHXMA-LLXMA)*2.6+HHXMA; 波段底00:=LLXMA-(HHXMA-LLXMA)*2.6; AXMA:=REFX1(MA(H,30),30/2); BXMA:=REFX1(MA(L,30),30/2); HAXMA:=REFX1(MA(AXMA,30),30/2); LBXMA:=REFX1(MA(BXMA,30),30/2); 做空:=(HAXMA-LBXMA)*1+HAXMA,LINETHICK2,COLORWHITE; 做多:=LBXMA-(HAXMA-LBXMA)*1,LINETHICK2,COLORWHITE; HBD:=REFX1(MA(H,60),60/2); LBD:=REFX1(MA(L,60),60/2); HHBD:=REFX1(MA(HBD,60),60/2); LLBD:=REFX1(MA(LBD,60),60/2); 波段顶:=(HHBD-LLBD)*2.6+HHBD,LINETHICK2,COLORYELLOW; 波段底:=LLBD-(HHBD-LLBD)*2.6,LINETHICK2,COLORYELLOW; B0:=(短高H+短低L)/2; D01:=MA(B0,10); 多空中线:=(B0+D01)/2,COLORYELLOW,LINETHICK2; 布林线顶:=EMA(多空中线,10)+5*STD(EMA(多空中线,10),10),DOT,COLORWHITE; 布林线底:=EMA(多空中线,10)-5*STD(EMA(多空中线,10),10),DOT,COLORWHITE; MACD价格:=EMA(CLOSE,3)-EMA(CLOSE,9); DEA33:=EMA((EMA(MACD价格,3)-EMA(MACD价格,9)),9),COLORWHITE,LINETHICK1; DEA333:=REF(DEA33,1),COLORWHITE,LINETHICK1; CCI3:=((H+L+C)/3-MA((H+L+C)/3,3))/(0.015*AVEDEV((H+L+C)/3,3)); 多头趋势:=多头定位=1 || 震荡定位=1; 空头趋势:=震荡定位=1 || 空头定位=1; 多:=多头趋势=1 && L<做多 && CROSS(CCI3,-50) && REF(CCI3,1)<0; 空:=空头趋势=1 && H>做空 && CROSS(50,CCI3) && REF(CCI3,1)>0; DRAWTEXT(多=1,L,\'多\'),COLORRED,VALIGN0,FONTSIZE16; DRAWTEXT(空=1,H,\'空\'),COLORGREEN,VALIGN2,FONTSIZE16;
|