1.
MACS:="MACD.MACD#WEEK"; 起点0:=BARSLAST(MACS<0); 起点:IF(MACS<0,REF(起点0,BARSLAST(MACS>0)),起点0),NODRAW;{天数} STICKLINE((起点=1),HHV(H,60),LLV(L,60),0,0)COLORLIMAGENTA; 起点价:REF(C,起点),COLORF880F8,LINETHICK2; 累计量:=SUM(IF(MACS>0,V,0),起点+1); 时段换手:累计量/CAPITAL*100,NODRAW; 控盘度:时段换手*13.3/100,,NODRAW; 成本区:(HHV(C,起点)+LLV(C,起点))/2,NODRAW; 平均成本:MA((HHV(C,起点)+LLV(C,起点))/2,CONST(起点)),NODRAW; 第一目标:平均成本*1.5,COLOR00FFCC,NODRAW; 第二目标:成本区*1.5,NODRAW; IF(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3,CONST(成本区),DRAWNULL),COLORGREEN; IF(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3,CONST(平均成本),DRAWNULL),COLOR00FFCC; IF(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3,CONST(第一目标),DRAWNULL),NODRAW; IF(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3,CONST(第二目标),DRAWNULL),NODRAW; DRAWTEXT(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3 AND 起点=1,C,'起点价'),COLORF880F8;
DRAWTEXT(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3 AND 起点=1,CONST(成本区),'庄家成本区'),COLORGREEN; DRAWTEXT(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3 AND 起点=1,CONST(平均成本),'庄家平均成本'),COLOR00FFCC; DRAWTEXT(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3 AND 起点=1,CONST(第一目标),'庄家第一目标'),NODRAW; DRAWTEXT(CURRBARSCOUNT<CONST(BARSLAST(起点=1))+3 AND 起点=1,CONST(第二目标),'庄家第二目标'),NODRAW; {原文链接:HTTP://WWW.55188.COM/THREAD-4396465-1-1.HTML}; DRAWNUMBER(ISLASTBAR,起点价,起点价),COLORF880F8; DRAWNUMBER(ISLASTBAR,成本区,成本区),COLORGREEN; DRAWNUMBER(ISLASTBAR,平均成本,平均成本),COLOR00FFCC; N2:=15;UR:=6;LR:=6; TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL); TC2:=CONST(BARSLAST(TC1=H))+1; UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1))); BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL); BC2:=CONST(BARSLAST(BC1=L))+1; LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1))); LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位} HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位} STICKLINE(IF(BC2>TC2,HP,LP),LOWER,UPPER,0,0),COLORFF00AA,LINETHICK2; STICKLINE(IF(BC2>TC2,LP,HP),LOWER,UPPER,0,0),COLORGREEN; 2.
A:=SUMBARS(V,CAPITAL*1);{累计换手=100%的周期} A1:=SUM(COST(10),A)/A;{在A周期里获利10%的平均价} A2:=SUM(COST(20),A)/A;{在A周期里获利20%的平均价} A3:=SUM(COST(30),A)/A;{在A周期里获利30%的平均价} A4:=SUM(COST(40),A)/A;{在A周期里获利40%的平均价} A5:=SUM(COST(50),A)/A;{在A周期里获利50%的平均价} 庄家成本:(5*A1+4*A2+3*A3+2*A4+A5)/15,COLOR00FFFF;{求出庄家成本}; DRAWTEXT(ISLASTBAR,庄家成本,'庄家成本'),COLOR00FFFF,NODRAW; 3.
|
|