股民大家庭

 找回密码
 立即注册

扫一扫,访问微社区

搜索
查看: 11856|回复: 0
打印 上一主题 下一主题

[飞狐] 飞狐不错的周月K线源码公式

[复制链接]
跳转到指定楼层
1
发表于 2009-09-23 21:17:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
飞狐不错的周月K线源码公式:
TBS:=POW(10,ABS(LOG(MINDIFF)));
//周线
BZ:=WEEKDAY;ZB:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;
ZW:=BARSLAST(ZB),LINETHICK;
Zdg:=ZW=0 or ISLASTBAR;
Zwx:=0*c;
for i=datacount-1 downto lbound(Zdg) do
  if Zdg then
    Zwx:=0;
  else
    Zwx:=Zwx[i+1]+1;
Zr:=BACKSET(ISLASTBAR,Zw+1)-ISLASTBAR;
Zwx:=refx(Zwx,1)+Zr,LINETHICK;
zq:=BARSLAST(ref(Zwx,1)=0 or BARPOS=1)+1;

Zo:=ref(o,Zw);
Zh:=hhv(h,Zw+1);
ZL:=LLv(L,Zw+1);
周开:ROUND(ZO*TBS)/TBS,LINETHICK;
周高:ROUND(refx(Zh,Zwx)*TBS)/TBS,,COLORFF,LINETHICK;
周低:ROUND(refx(ZL,Zwx)*TBS)/TBS,COLORFF00,LINETHICK;
周收:ROUND(refx(c,Zwx)*TBS)/TBS,,COLORFF00FF,LINETHICK;
ZF:=周收>周开 or (周收=周开 and 周收>ref(周收,Zw+1));
Zj:=cross(Zw,Zwx);// OR ISLASTBAR;
yt:=if(zq=1 and refx(zq,2)=1,13,if(refx(zq,1)=1 or zq=1,7,14));
//影线
STICKLINE(Zw>0 and ZF and Zj,周低,周高,1,0)COLORAAAAEE;
STICKLINE(周开<周收,周开,周收,YT,0),COLORAAAAEE;
STICKLINE(Zw>0 and not(ZF) and Zj,周低,周高,1,0)COLOREEAAAA;
STICKLINE(周开>周收,周开,周收,YT,0),COLOREEAAAA;
//日线
TJ:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
STICKLINE(TJ,LOW,HIGH,1,0),ColorE9;
STICKLINE(TJ,LOW,CLOSE,8,0),Color80;
STICKLINE(TJ,LOW,CLOSE,6,0),ColorA5;
STICKLINE(TJ,LOW,CLOSE,4,0),ColorC0;
STICKLINE(TJ,LOW,CLOSE,2,0),ColorE6;

STICKLINE(NOT(TJ),HIGH,LOW,1,0),ColorAA00;
STICKLINE(NOT(TJ),CLOSE,OPEN,8,0),Color5000;
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),Color6600;
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),Color8000;
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),ColorA000;

//月线
BY:=MONTH;YB:=BY-REF(BY,1)<>0 OR BARPOS=1;
w:=BARSLAST(YB),LINETHICK;
dg:=w=0 or ISLASTBAR;
wx:=0*C;
for i=datacount-1 downto lbound(dg) do
  if dg then
    wx:=0;
  else
    wx:=wx[i+1]+1;
r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;
wx:=refx(wx,1)+r,LINETHICK;

oo:=ref(o,w);
hh:=hhv(h,w+1);
LL:=LLv(L,w+1);
月开:ROUND(OO*TBS)/TBS,LINETHICK;
月高:ROUND(refx(hh,wx)*TBS)/TBS,LINETHICK;
月低:ROUND(refx(LL,wx)*TBS)/TBS,LINETHICK;
月收:ROUND(refx(c,wx)*TBS)/TBS,LINETHICK;
f:=月收>月开 or (月收=月开 and 月收>ref(月收,w+1));
j:=cross(w,wx);// OR ISLASTBAR;
//画横线
PARTLINE(w>0 and f,月收)COLORMAGENTA;
PARTLINE(w>0 and f,月开)COLORMAGENTA;
//影线
STICKLINE(w>0 and f and j,月收,月高,1,0),COLORMAGENTA;
STICKLINE(w>0 and f and j,月开,月低,1,0),COLORMAGENTA;
STICKLINE(w=0 and f ,月收,月开,1,0),COLORMAGENTA;
STICKLINE((refx(w=0,1) or ISLASTBAR) and f,月开,月收,1,0),COLORMAGENTA;
PARTLINE(w>0 and not(f),月收),COLORFFDD00;
PARTLINE(w>0 and not(f),月开),COLORFFDD00;
STICKLINE(w>0 and not(f) and j,月开,月高,1,0)COLORFFDD00;
STICKLINE(w>0 and not(f) and j,月收,月低,1,0)COLORFFDD00;
STICKLINE(w=0 and not(f),月开,月收,1,0)COLORFFDD00;
STICKLINE((refx(w=0,1) or ISLASTBAR) and not(f),月收,月开,1,0)COLORFFDD00;
//TBS:=POW(10,ABS(LOG(MINDIFF)));
//周线
BZ:=WEEKDAY;ZB:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;
ZW:=BARSLAST(ZB),LINETHICK;
Zdg:=ZW=0 or ISLASTBAR;
Zwx:=0*c;
for i=datacount-1 downto lbound(Zdg) do
  if Zdg then
    Zwx:=0;
  else
    Zwx:=Zwx[i+1]+1;
Zr:=BACKSET(ISLASTBAR,Zw+1)-ISLASTBAR;
Zwx:=refx(Zwx,1)+Zr,LINETHICK;
zq:=BARSLAST(ref(Zwx,1)=0 or BARPOS=1)+1;

Zo:=ref(o,Zw);
Zh:=hhv(h,Zw+1);
ZL:=LLv(L,Zw+1);
周开:ROUND(ZO*TBS)/TBS,LINETHICK;
周高:ROUND(refx(Zh,Zwx)*TBS)/TBS,,COLORFF,LINETHICK;
周低:ROUND(refx(ZL,Zwx)*TBS)/TBS,COLORFF00,LINETHICK;
周收:ROUND(refx(c,Zwx)*TBS)/TBS,,COLORFF00FF,LINETHICK;
ZF:=周收>周开 or (周收=周开 and 周收>ref(周收,Zw+1));
Zj:=cross(Zw,Zwx);// OR ISLASTBAR;
yt:=if(zq=1 and refx(zq,2)=1,13,if(refx(zq,1)=1 or zq=1,7,14));
//影线
STICKLINE(Zw>0 and ZF and Zj,周低,周高,1,0)COLORAAAAEE;
STICKLINE(周开<周收,周开,周收,YT,0),COLORAAAAEE;
STICKLINE(Zw>0 and not(ZF) and Zj,周低,周高,1,0)COLOREEAAAA;
STICKLINE(周开>周收,周开,周收,YT,0),COLOREEAAAA;
//日线
TJ:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
STICKLINE(TJ,LOW,HIGH,1,0),ColorE9;
STICKLINE(TJ,LOW,CLOSE,8,0),Color80;
STICKLINE(TJ,LOW,CLOSE,6,0),ColorA5;
STICKLINE(TJ,LOW,CLOSE,4,0),ColorC0;
STICKLINE(TJ,LOW,CLOSE,2,0),ColorE6;

STICKLINE(NOT(TJ),HIGH,LOW,1,0),ColorAA00;
STICKLINE(NOT(TJ),CLOSE,OPEN,8,0),Color5000;
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),Color6600;
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),Color8000;
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),ColorA000;

//月线
BY:=MONTH;YB:=BY-REF(BY,1)<>0 OR BARPOS=1;
w:=BARSLAST(YB),LINETHICK;
dg:=w=0 or ISLASTBAR;
wx:=0*C;
for i=datacount-1 downto lbound(dg) do
  if dg then
    wx:=0;
  else
    wx:=wx[i+1]+1;
r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;
wx:=refx(wx,1)+r,LINETHICK;

oo:=ref(o,w);
hh:=hhv(h,w+1);
LL:=LLv(L,w+1);
月开:ROUND(OO*TBS)/TBS,LINETHICK;
月高:ROUND(refx(hh,wx)*TBS)/TBS,LINETHICK;
月低:ROUND(refx(LL,wx)*TBS)/TBS,LINETHICK;
月收:ROUND(refx(c,wx)*TBS)/TBS,LINETHICK;
f:=月收>月开 or (月收=月开 and 月收>ref(月收,w+1));
j:=cross(w,wx);// OR ISLASTBAR;
//画横线
PARTLINE(w>0 and f,月收)COLORMAGENTA;
PARTLINE(w>0 and f,月开)COLORMAGENTA;
//影线
STICKLINE(w>0 and f and j,月收,月高,1,0),COLORMAGENTA;
STICKLINE(w>0 and f and j,月开,月低,1,0),COLORMAGENTA;
STICKLINE(w=0 and f ,月收,月开,1,0),COLORMAGENTA;
STICKLINE((refx(w=0,1) or ISLASTBAR) and f,月开,月收,1,0),COLORMAGENTA;
PARTLINE(w>0 and not(f),月收),COLORFFDD00;
PARTLINE(w>0 and not(f),月开),COLORFFDD00;
STICKLINE(w>0 and not(f) and j,月开,月高,1,0)COLORFFDD00;
STICKLINE(w>0 and not(f) and j,月收,月低,1,0)COLORFFDD00;
STICKLINE(w=0 and not(f),月开,月收,1,0)COLORFFDD00;
STICKLINE((refx(w=0,1) or ISLASTBAR) and not(f),月收,月开,1,0)COLORFFDD00;
/:G input:ZQ(60,5,300);
DRAWGBK(1,COLORRGB(50,50,50),COLORRGB(0,0,0),1);
{筹码中心部分}
W00:=COST(1);W10:=COST(10);W20:=COST(20);W30:=COST(30);W40:=COST(40);W50:=COST(50);W60:=COST(60);W70:=COST(70);W80:=COST(80);W90:=COST(90);
W100:=COST(99);W5:=COST(5);W15:=COST(15);W25:=COST(25);W35:=COST(35);W45:=COST(45);W55:=COST(55);W65:=COST(65);W75:=COST(75);W85:=COST(85);
W95:=COST(95);
C5:=(W5 - W00);C10:=(W10 - W5);C15:=(W15 - W10);C20:=(W20 - W15);C25:=(W25 - W20);C30:=(W30 - W25);C35:=(W35 - W30);C40:=(W40 - W35);C45:=(W45 - W40);
C50:=(W50 - W45);C55:=(W55 - W50);C60:=(W60 - W55);C65:=(W65 - W60);C70:=(W70 - W65);C75:=(W75 - W70);C80:=(W80 - W75);C85:=(W85 - W80);C90:=(W90 - W85);
C95:=(W95 - W90);C100:=(W100 - W95);
ZX:=MIN(C5,MIN(C10,MIN(C15,MIN(C20,MIN(C25,MIN(C30,MIN(C35,MIN(C40,MIN(C45,MIN(C50,MIN(C55,MIN(C60,MIN(C65,MIN(C70,MIN(C75,MIN(C80,MIN(C85,MIN(C90,MIN(C95,C100)))))))))))))))))));
FILLRGN((ZX = C5),W00,W5),color808080;
FILLRGN((ZX = C10),W10,W5),color808080;
FILLRGN((ZX = C15),W15,W10),color808080;
FILLRGN((ZX = C20),W20,W15),color808080;
FILLRGN((ZX = C25),W25,W20),color808080;
FILLRGN((ZX = C30),W30,W25),color808080;
FILLRGN((ZX = C35),W35,W30),color808080;
FILLRGN((ZX = C40),W40,W35),color808080;
FILLRGN((ZX = C45),W45,W40),color808080;
FILLRGN((ZX = C50),W50,W45),color808080;
FILLRGN((ZX = C55),W55,W50),color808080;
FILLRGN((ZX = C60),W60,W55),color808080;
FILLRGN((ZX = C65),W65,W60),color808080;
FILLRGN((ZX = C70),W70,W65),color808080;
FILLRGN((ZX = C75),W75,W70),color808080;
FILLRGN((ZX = C80),W80,W75),color808080;
FILLRGN((ZX = C85),W85,W70),color808080;
FILLRGN((ZX = C90),W90,W85),color808080;
FILLRGN((ZX = C95),W95,W90),color808080;
FILLRGN((ZX = C100),W100,W95),color808080;

{明日价预测部分}
Vg:=MA(REF(H,1)/REF(C,2),27)*REF(C,1);
Vd:=MA(REF(L,1)/REF(C,2),27)*REF(C,1);
A5:=Vd[SYSPARAM(1)];
RA5:=Vd[SYSPARAM(1)-1];
A10:=Vg[SYSPARAM(1)];
RA10:=Vg[SYSPARAM(1)-1];
jt5:=if(A5>RA5,'↑','↓');
jt10:=if(A10>RA10,'↑','↓');
SZ1:='                        开盘测最高:'+NUMTOSTR(Vg[SYSPARAM(1)],2)+jt10;
SZ2:='                       \n                        开盘测最低:'+NUMTOSTR(Vd[SYSPARAM(1)],2)+jt5;
DRAWTEXT(BARPOS=SYSPARAM(2),c,SZ1),align4,COLORred;
DRAWTEXT(BARPOS=SYSPARAM(2),c,SZ2),align4,COLORgreen;

{解消三角画线}
SJ1:=(REF(HIGH,3) = HHV(HIGH,((2 * 3) + 1)));
SJ2:=FILTER(SJ1,3);
SJ3:=BACKSET(SJ2,(3 + 1));
SJ4:=FILTER(SJ3,3);
SJ5:=(REF(LOW,3) = LLV(LOW,((2 * 3) + 1)));
SJ6:=FILTER(SJ5,3);
SJ7:=BACKSET(SJ6,(3 + 1));
SJ8:=FILTER(SJ7,3);
SJ9:=((REF(LLV(LOW,(2 * 3)),1) + REF(HHV(HIGH,(2 * 3)),1)) / 2);
SJ10:=((HIGH + LOW) / 2);
SJ11:=(((SJ4 AND NOT((SJ8 AND (SJ9 >= SJ10)))) OR ISLASTBAR) OR (BARSCOUNT(CLOSE) = 1));
SJ12:=(SJ8 AND NOT((SJ4 AND (SJ9 < SJ10))));
SJ13:=(SJ4 AND NOT((SJ8 AND (SJ9 >= SJ10))));
SJ14:=(REF(BARSLAST(SJ11),1) + 1);
SJ15:=BACKSET((SJ11 AND (COUNT(SJ12,SJ14) > 0)),LLVBARS(IF(SJ12,LOW,10000),SJ14));
SJ16:=(SJ15 > REF(SJ15,1));
SJ17:=BACKSET(SJ16,2);
SJ18:=(SJ17 > REF(SJ17,1));
SJ19:=((SJ18 OR ISLASTBAR) OR (BARSCOUNT(CLOSE) = 1));
SJ20:=(REF(BARSLAST(SJ19),1) + 1);
SJ21:=BACKSET((SJ19 AND (COUNT(SJ13,SJ20) > 0)),HHVBARS(IF(SJ13,HIGH,0),SJ20));
SJ22:=(SJ21 > REF(SJ21,1));
SJ23:=BACKSET(SJ22,2);
SJ24:=(SJ23 > REF(SJ23,1));
SJ25:=BACKSET(ISLASTBAR,(BARSLAST(SJ18) + 1));
SJ26:=(SJ25 > REF(SJ25,1));
SJ27:=BACKSET(ISLASTBAR,(BARSLAST(SJ24) + 1));
SJ28:=(SJ27 > REF(SJ27,1));
底:=REF(LOW,BARSLAST(SJ26));
頂:=REF(HIGH,BARSLAST(SJ28));
STICKLINE(SJ26,頂,底,0,0),colorff89a9,linethick2;
DRAWLINE(SJ28,HIGH,SJ26,LOW,0),colorff89a9,linethick2;
DRAWLINE(SJ28,HIGH,SJ26,頂,0),colorff89a9,linethick2;
STICKLINE(SJ28,頂,底,0,0),colorred,linethick2;
DRAWLINE(SJ26,LOW,SJ28,HIGH,0),colorred,linethick2;
DRAWLINE(SJ26,LOW,SJ28,底,0),colorred,linethick2;
DRAWTEXT((BARPOS = SYSPARAM(2)),HIGH,' 紅色三角形画完出局;'),align4,colorff60c8;
DRAWTEXT((BARPOS = SYSPARAM(2)),HIGH,'  \n 藍色三角形画完介入;'),align4,colorff89a9;



DTR:=MAX(MAX((CLOSE - HIGH),ABS((REF(CLOSE,1) - CLOSE))),ABS((REF(CLOSE,1) - LOW)));
DTR1:=MA(DTR,13);
DTR2:=(REF(CLOSE,1) - REF(DTR1,1));
买卖:HHV(DTR2,13),LINETHICK0,PRECISION2,colorE9E9FF;
X1:=((((OPEN + (3 * CLOSE)) + LOW) + HIGH) / 6);
X2:=WMA(WMA(X1,3),5);
X3:=(REVERSE(X1) + (2 * X2));
X4:=WMA(WMA(X1,1),5);
X5:=(REVERSE(X1) + (2 * X4));
注意:((3 * X5) - (2 * SMA(X5,2,1))),linethick0,PRECISION2,color9F02;
FBARS:=(SYSPARAM(3)-1);
TJ:=(BARSSINCE(close)>(FBARS - 8));
TJ1:=(BARSSINCE(CLOSE) > (FBARS - 9));
FC:=注意;
FO:=close;
d:=DATACOUNT;
b:=2*(d-barpos)-50;
a:=refx(注意,b);
PARTLINE(barpos>d-50,2*注意[d]-a),SHIFT50,LINEDOT,colorred;
TD1:=(((7 * SMA((((CLOSE - LLV(LOW,27)) / (HHV(HIGH,27) - LLV(LOW,27))) * 30),4,1)) - (3 * SMA(SMA((((CLOSE - LLV(LOW,27)) / (HHV(HIGH,27) - LLV(LOW,27))) * 30),4,1),3,1))) - SMA(SMA(SMA((((CLOSE - LLV(LOW,27)) / (HHV(HIGH,27) - LLV(LOW,27))) * 30),4,1),3,1),2,1));
DRAWTEXT(CROSS(78.89,TD1),(HIGH * 1.036),'★')align0,colorgreen;
DRAWICON(CROSS(78.89,TD1),(HIGH * 1.017),9);



AN1:=EMA(CLOSE,13);
AN2:=EMA(CLOSE,77);
AN3:=EMA(CLOSE,99);
AN6:=(((AN1 + AN2) + AN3) / 3);
AN7:=((AN6 * (1 / 100)) + AN6);
AN8:=(AN6 - (AN6 * (1 / 100)));
SNA:=COUNT(((BETWEEN(AN1,AN7,AN8) AND BETWEEN(AN2,AN7,AN8)) AND BETWEEN(AN3,AN7,AN8)),10);
SAN1:=(SNA > 8);
STICKLINE((SNA > 8),OPEN,CLOSE,8,0)colormagenta;
STICKLINE((SNA > 8),HIGH,LOW,0.5,0)colormagenta;
DRAWTEXT(FILTER((SNA > 8),20),(LOW * 0.98),'注意!')align0,colormagenta;

A1:=EMA(CLOSE,10);
A2:=EMA(CLOSE,11);
A3:=EMA(CLOSE,13);
A4:=EMA(CLOSE,15);
A5:=EMA(CLOSE,17);
A6:=EMA(CLOSE,19);
B1:=EMA(CLOSE,20);
B2:=EMA(CLOSE,21);
B3:=EMA(CLOSE,22);
B4:=EMA(CLOSE,23);
B5:=EMA(CLOSE,24);
B6:=EMA(CLOSE,25);
C1:=EMA(CLOSE,30);
C2:=EMA(CLOSE,31);
C3:=EMA(CLOSE,32);
C4:=EMA(CLOSE,33);
C5:=EMA(CLOSE,34);
C6:=EMA(CLOSE,35);
E1:=EMA(CLOSE,40);
E2:=EMA(CLOSE,41);
E3:=EMA(CLOSE,42);
E4:=EMA(CLOSE,43);
E5:=EMA(CLOSE,44);
E6:=EMA(CLOSE,45);
F1:=EMA(CLOSE,50);
F2:=EMA(CLOSE,51);
F3:=EMA(CLOSE,52);
F4:=EMA(CLOSE,53);
F5:=EMA(CLOSE,54);
F6:=EMA(CLOSE,55);
G1:=EMA(CLOSE,60);
G2:=EMA(CLOSE,61);
G3:=EMA(CLOSE,62);
G4:=EMA(CLOSE,63);
G5:=EMA(CLOSE,64);
G6:=EMA(CLOSE,65);
H1:=EMA(CLOSE,70);
H2:=EMA(CLOSE,71);
H3:=EMA(CLOSE,72);
H4:=EMA(CLOSE,73);
H5:=EMA(CLOSE,74);
H6:=EMA(CLOSE,75);
I1:=EMA(CLOSE,80);
I2:=EMA(CLOSE,81);
I3:=EMA(CLOSE,82);
I4:=EMA(CLOSE,83);
I5:=EMA(CLOSE,84);
I6:=EMA(CLOSE,85);
J1:=EMA(CLOSE,90);
J2:=EMA(CLOSE,91);
J3:=EMA(CLOSE,92);
J4:=EMA(CLOSE,93);
J5:=EMA(CLOSE,94);
J6:=EMA(CLOSE,95);
K1:=EMA(CLOSE,100);
K2:=EMA(CLOSE,101);
K3:=EMA(CLOSE,102);
K4:=EMA(CLOSE,103);
K5:=EMA(CLOSE,104);
K6:=EMA(CLOSE,105);
PP1:=EMA(CLOSE,110);
PP2:=EMA(CLOSE,111);
PP3:=EMA(CLOSE,112);
PP4:=EMA(CLOSE,113);
PP5:=EMA(CLOSE,114);
PP6:=EMA(CLOSE,115);
Q1:=EMA(CLOSE,120);
Q2:=EMA(CLOSE,121);
Q3:=EMA(CLOSE,122);
Q4:=EMA(CLOSE,123);
Q5:=EMA(CLOSE,124);
Q6:=EMA(CLOSE,125);
R1:=EMA(CLOSE,130);
R2:=EMA(CLOSE,131);
R3:=EMA(CLOSE,132);
R4:=EMA(CLOSE,133);
R5:=EMA(CLOSE,134);
R6:=EMA(CLOSE,135);
T1:=EMA(CLOSE,140);
T2:=EMA(CLOSE,141);
T3:=EMA(CLOSE,142);
T4:=EMA(CLOSE,143);
T5:=EMA(CLOSE,144);
T6:=EMA(CLOSE,145);
J55:=DMA(CLOSE,(VOL / SUM(VOL,120)));
J13:=DMA(CLOSE,(VOL / SUM(VOL,13)));


YN1:=IF((DATATYPE > 5),ZQ,(ZQ * 2));
YDA:=BACKSET(ISLASTBAR,(LLVBARS(LOW,YN1) + 1));
YDW:=(COUNT(YDA,YN1) = 1);
YD:=BARSSINCE(YDW);
YHSL:=((VOL / CAPITAL) * 100);
YFL:=(((VOL / REF(VOL,1)) > 2) AND (YHSL > IF((DATATYPE > 4),1,0.3)));
YTC:=IF(((YDA AND YFL) AND (CLOSE > REF(HHV(CLOSE,YD),1))),CLOSE,0);
YXSW:=ABS(LOG(MINDIFF));
YNUM:=REF(YTC,BARSLAST(((YDA AND YFL) AND (CLOSE > REF(HHV(CLOSE,YD),1)))));
V1:=(MA(CLOSE,3) = HHV(MA(CLOSE,3),7));
V2:=(MA(CLOSE,3) > MA(CLOSE,5));
V3:=(MA(VOL,5) > (MA(VOL,10) * 1.01));
V4:=(COUNT((MA(CLOSE,1) > REF(CLOSE,1)),2) = 2);
V5:=EMA((((CLOSE - LLV(LOW,5)) / (HHV(HIGH,10) - LLV(LOW,5))) * 4),4);
V6:=((V5 / REF(V5,1)) < 1.005);
逃:=FILTER((REF((((V1 AND V2) AND V3) AND V4),1) AND V6),3);

STICKLINE((CLOSE = CLOSE),A1,A1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),A2,A2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),A3,A3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),A4,A4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),A5,A5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),A6,A6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),B1,B1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),B2,B2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),B3,B3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),B4,B4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),B5,B5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),B6,B6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),C1,C1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),C2,C2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),C3,C3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),C4,C4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),C5,C5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),C6,C6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),E1,E1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),E2,E2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),E3,E3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),E4,E4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),E5,E5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),E6,E6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),F1,F1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),F2,F2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),F3,F3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),F4,F4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),F5,F5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),F6,F6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),G1,G1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),G2,G2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),G3,G3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),G4,G4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),G5,G5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),G6,G6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),H1,H1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),H2,H2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),H3,H3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),H4,H4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),H5,H5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),H6,H6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),I1,I1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),I2,I2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),I3,I3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),I4,I4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),I5,I5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),I6,I6,0,1),color808080;
STICKLINE((CLOSE = CLOSE),J1,J1,0,1),color808080;
STICKLINE((CLOSE = CLOSE),J2,J2,0,1),color808080;
STICKLINE((CLOSE = CLOSE),J3,J3,0,1),color808080;
STICKLINE((CLOSE = CLOSE),J4,J4,0,1),color808080;
STICKLINE((CLOSE = CLOSE),J5,J5,0,1),color808080;
STICKLINE((CLOSE = CLOSE),J6,J6,0,1),color808080;
STICKLINE((CLOSE < K1),K1,K1,0,1)color66ff00;
STICKLINE((CLOSE < K1),K2,K2,0,1)color66ff00;
STICKLINE((CLOSE < K1),K3,K3,0,1)color66ff00;
STICKLINE((CLOSE < K1),K4,K4,0,1)color66ff00;
STICKLINE((CLOSE < K1),K5,K5,0,1)color66ff00;
STICKLINE((CLOSE < K1),K6,K6,0,1)color66ff00;
STICKLINE((CLOSE > K1),K1,K1,0,1)color00ffff;
STICKLINE((CLOSE > K1),K2,K2,0,1)color00ffff;
STICKLINE((CLOSE > K1),K3,K3,0,1)color00ffff;
STICKLINE((CLOSE > K1),K4,K4,0,1)color00ffff;
STICKLINE((CLOSE > K1),K5,K5,0,1)color00ffff;
STICKLINE((CLOSE > K1),K6,K6,0,1)color00ffff;
STICKLINE((CLOSE < PP1),PP1,PP1,0,0)color00ff00;
STICKLINE((CLOSE < PP1),PP2,PP2,0,0)color00ff00;
STICKLINE((CLOSE < PP1),PP3,PP3,0,0)color00ff00;
STICKLINE((CLOSE < PP1),PP4,PP4,0,0)color00ff00;
STICKLINE((CLOSE < PP1),PP5,PP5,0,0)color00ff00;
STICKLINE((CLOSE < PP1),PP6,PP6,0,0)color00ff00;
STICKLINE((CLOSE > PP1),PP1,PP1,0,0)color00ccff;
STICKLINE((CLOSE > PP1),PP2,PP2,0,0)color00ccff;
STICKLINE((CLOSE > PP1),PP3,PP3,0,0)color00ccff;
STICKLINE((CLOSE > PP1),PP4,PP4,0,0)color00ccff;
STICKLINE((CLOSE > PP1),PP5,PP5,0,0)color00ccff;
STICKLINE((CLOSE > PP1),PP6,PP6,0,0)color00ccff;
STICKLINE((CLOSE < Q1),Q1,Q1,0,0)color00cc00;
STICKLINE((CLOSE < Q1),Q2,Q2,0,0)color00cc00;
STICKLINE((CLOSE < Q1),Q3,Q3,0,0)color00cc00;
STICKLINE((CLOSE < Q1),Q4,Q4,0,0)color00cc00;
STICKLINE((CLOSE < Q1),Q5,Q5,0,0)color00cc00;
STICKLINE((CLOSE < Q1),Q6,Q6,0,0)color00cc00;
STICKLINE((CLOSE > Q1),Q1,Q1,0,0)color0099ff;
STICKLINE((CLOSE > Q1),Q2,Q2,0,0)color0099ff;
STICKLINE((CLOSE > Q1),Q3,Q3,0,0)color0099ff;
STICKLINE((CLOSE > Q1),Q4,Q4,0,0)color0099ff;
STICKLINE((CLOSE > Q1),Q5,Q5,0,0)color0099ff;
STICKLINE((CLOSE > Q1),Q6,Q6,0,0)color0099ff;
STICKLINE((CLOSE < R1),R1,R1,0,0)color009900;
STICKLINE((CLOSE < R1),R2,R2,0,0)color009900;
STICKLINE((CLOSE < R1),R3,R3,0,0)color009900;
STICKLINE((CLOSE < R1),R4,R4,0,0)color009900;
STICKLINE((CLOSE < R1),R5,R5,0,0)color009900;
STICKLINE((CLOSE < R1),R6,R6,0,0)color009900;
STICKLINE((CLOSE > R1),R1,R1,0,0)color0066ff;
STICKLINE((CLOSE > R1),R2,R2,0,0)color0066ff;
STICKLINE((CLOSE > R1),R3,R3,0,0)color0066ff;
STICKLINE((CLOSE > R1),R4,R4,0,0)color0066ff;
STICKLINE((CLOSE > R1),R5,R5,0,0)color0066ff;
STICKLINE((CLOSE > R1),R6,R6,0,0)color0066ff;
STICKLINE((CLOSE < T1),T1,T1,0,0)color006600;
STICKLINE((CLOSE < T1),T2,T2,0,0)color006600;
STICKLINE((CLOSE < T1),T3,T3,0,0)color006600;
STICKLINE((CLOSE < T1),T4,T4,0,0)color006600;
STICKLINE((CLOSE < T1),T5,T5,0,0)color006600;
STICKLINE((CLOSE < T1),T6,T6,0,0)color006600;
STICKLINE((CLOSE > T1),T1,T1,0,0)COLOR0000cc;
STICKLINE((CLOSE > T1),T2,T2,0,0)COLOR0000cc;
STICKLINE((CLOSE > T1),T3,T3,0,0)COLOR0000cc;
STICKLINE((CLOSE > T1),T4,T4,0,0)COLOR0000cc;
STICKLINE((CLOSE > T1),T5,T5,0,0)COLOR0000cc;
STICKLINE((CLOSE > T1),T6,T6,0,0)COLOR0000cc;
{变色k线}
STICKLINE((FO < FC),LOW,(HIGH * 1.001),0.4,0)colorffff50;
STICKLINE((FO < FC),OPEN,CLOSE,8,0)colorffee00;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 1) / 8)),8,0)colorffee00;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 2) / 8)),8,0)colorffee00;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 3) / 8)),8,0)colorffcc00;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 4) / 8)),8,0)colorffaa00;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 5) / 8)),8,0)colorff8800;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 6) / 8)),8,0)colorff6600;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 7) / 8)),8,0)colorff3300;
STICKLINE((FO < FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 8) / 8)),8,0)colorff3300;
STICKLINE((FO > FC),LOW,(HIGH * 1.001),0.4,0)colorc7c7ff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 1) / 8)),8,0)color00ffff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((((CLOSE - OPEN) * 2) / 8) * 2) / 8)),8,0)color00eeff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 3) / 8)),8,0)color00ccff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 4) / 8)),8,0)color05c7ff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 5) / 8)),8,0)COLOR0595ff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 6) / 8)),8,0)COLOR0093ee;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 7) / 8)),8,0)COLOR005cff;
STICKLINE((FO > FC),OPEN,(CLOSE - (((CLOSE - OPEN) * 8) / 8)),8,0)COLOR0000ff;
STICKLINE((SNA > 8),OPEN,CLOSE,8,0);
STICKLINE((SNA > 8),HIGH,LOW,0.5,0);


DRAWICON(CROSS(J13,J55),(J55 * 0.996),1);
PARTLINE((J55 >= REF(J55,1)),EMA(CLOSE,150)),colorred,linethick2;
PARTLINE((J55 <= REF(J55,1)),EMA(CLOSE,150)),colorblue,linethick2;

DRAWICON(逃,(HIGH * 1.026),5);

PARTLINE(CLOSE,买卖),colorwhite;
DRAWICON(YDW,(LOW * 0.996),10);
DRAWSL(YTC,YTC,0,0,3),colorgreen,LINEDOT;
DRAWNUMBER(YTC,YNUM*1.0180,YNUM,YXSW)colorgreen,;PARTLINE(CLOSE,注意),color9F02;



上一篇:[飞狐] 飞狐k线源码公式
下一篇:[同花顺] 同花顺五彩K线源码公式
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

今日股市|网站地图|股民学校|手机版|小黑屋|股民大家庭 |网站地图24小时在线客服

GMT+8, 2025-1-16 01:37 , Processed in 7.888036 second(s), 27 queries , Gzip On.

Powered by 股民大家庭

© 2007-2019 www.gupiao168.com


快速回复 返回顶部 返回列表