RAY_L黄金买卖
DRAWGBK(CLOSE>0,COLORRGB(0,188,38888),COLORRGB(0,33,333),1);
STICKLINE(CLOSE>0,HIGH,LOW,0,0),colorFF;
STICKLINE(CLOSE>0,CLOSE,OPEN,8,2),colorFF;
STICKLINE(CLOSE<OPEN,HIGH,LOW,0,0),colorFF00;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,8,0),colorFF00;
TT:=IF(DATE>1341221,0,1);
VAR1:=TT*LLV(LOW,N);
VAR2:=TT*HHV(HIGH,N);
VAR3:=VAR2-VAR1;
L价:VAR1,LINETHICK0,colorFF0000;
PARTLINE(HJX,L价),colorFF0000;
H191:VAR3*0.191+VAR1,LINETHICK0,colorFFFF;
PARTLINE(HJX,H191),colorFFFF;
H382:VAR3*0.382+VAR1,LINETHICK0,colorFF00FF;
PARTLINE(HJX,H382),colorFF00FF;
H5:VAR3*0.5+VAR1,LINETHICK0,color80FF00;
PARTLINE(HJX,H5),color80FF00;
H618:VAR3*0.618+VAR1,LINETHICK0,color80FF;
PARTLINE(HJX,H618),color80FF;
H809:VAR3*0.809+VAR1,LINETHICK0,colorFF;
PARTLINE(HJX,H809),colorFF;
H价:VAR2,LINETHICK0,colorFFFF80;
PARTLINE(HJX,H价),colorFFFF80;
RZC:=IF(CB=0 AND MR=0 AND SC>0,SC,IF(SC=0 AND CB=0 AND MR>0,MR*(1+FL),IF(SC=0 AND MR=0 AND CB>0,CB*(1-FL),0)));
R:=TT*(IF(RZC=0,CLOSE,RZC));
EXPLAIN(CLOSE>0,'阻力位'),colorFF0000;
EXPLAINEX(CLOSE>0,'1.809: ',REF(R,1)*1.809,2,0),colorFFFF00;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<7,0,1),R*1.809,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.809,1),colorFFFF00;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<7,0,1),R*1.809,R*1.809,2),SHIFT4,colorFFFF00;
EXPLAINEX(CLOSE>0,'1.750: ',R*1.75,2,0),colorFF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<6,0,1),R*1.75,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.75,1),colorFF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<6,0,1),R*1.75,R*1.75,2),SHIFT4,colorFF;
EXPLAINEX(CLOSE>0,'1.618: ',R*1.618,2,0),color80FF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<5,0,1),R*1.618,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.618,1),color80FF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<5,0,1),R*1.618,R*1.618,2),SHIFT4,color80FF;
EXPLAINEX(CLOSE>0,'1.500: ',R*1.5,2,0),colorFF80;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<4,0,1),R*1.5,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.5,1),colorFF80;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<4,0,1),R*1.5,R*1.5,2),SHIFT4,colorFF80;
EXPLAINEX(CLOSE>0,'1.382: ',R*1.382,2,0),colorFF00FF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<3,0,1),R*1.382,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.382,1),colorFF00FF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<3,0,1),R*1.382,R*1.382,2),SHIFT4,colorFF00FF;
EXPLAINEX(CLOSE>0,'1.250: ',R*1.25,2,0),colorFFFF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<2,0,1),R*1.25,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.25,1),colorFFFF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX AND IF(XS<2,0,1),R*1.25,R*1.25,2),SHIFT4,colorFFFF;
EXPLAINEX(CLOSE>0,'1.191: ',R*1.191,2,0),colorFF0000;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZCX,R*1.191,BARPOS=SYSPARAM(1)+1,REF(R,1)*1.191,1),colorFF0000;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZCX,R*1.191,R*1.191,2),SHIFT4,colorFF0000;
EXPLAIN(CLOSE>0,'支撑位'),colorFF;
EXPLAINEX(CLOSE>0,'0.809: ',R*0.809,2,0),colorFFFF80;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX,R*0.809,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.809,1),colorFFFF80;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX,R*0.809,R*0.809,2),SHIFT4,colorFFFF80;
EXPLAINEX(CLOSE>0,'0.750: ',R*0.75,2,0),colorFF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<2,0,1),R*0.75,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.75,1),colorFF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<2,0,1),R*0.75,R*0.75,2),SHIFT4,colorFF;
EXPLAINEX(CLOSE>0,'0.618: ',R*0.618,2,0),color80FF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<3,0,1),R*0.618,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.618,1),color80FF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<3,0,1),R*0.618,R*0.618,2),SHIFT4,color80FF;
EXPLAINEX(CLOSE>0,'0.500: ',R*0.5,2,0),colorFF00;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<4,0,1),R*0.5,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.5,1),colorFF00;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<4,0,1),R*0.5,R*0.5,2),SHIFT4,colorFF00;
EXPLAINEX(CLOSE>0,'0.382: ',R*0.382,2,0),colorFF00FF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<5,0,1),R*0.382,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.382,1),colorFF00FF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<5,0,1),R*0.382,R*0.382,2),SHIFT4,colorFF00FF;
EXPLAINEX(CLOSE>0,'0.250: ',R*0.25,2,0),colorFFFF;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<6,0,1),R*0.25,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.25,1),colorFFFF;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<6,0,1),R*0.25,R*0.25,2),SHIFT4,colorFFFF;
EXPLAINEX(CLOSE>0,'0.191: ',R*0.191,2,1),colorFF0000;
DRAWLINE(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<7,0,1),R*0.191,BARPOS=SYSPARAM(1)+1,REF(R,1)*0.191,1),colorFF0000;
DRAWNUMBER(BARPOS=SYSPARAM(1) AND ZLX AND IF(XS<7,0,1),R*0.191,R*0.191,2),SHIFT4,colorFF0000;
EXPLAINEX(CLOSE>0,'+10%: ',R*1.1,2,0),colorFF;
EXPLAINEX(CLOSE>0,'+5%: ',R*1.05,2,1),color8080FF;
EXPLAINEX(CLOSE>0,'交易费率:',FL,3,0),color80FFFF;
EXPLAINEX(CLOSE>0,'成本价:',R*(1+FL),2,0),color4080FF;
EXPLAINEX(CLOSE>0,'市场价:',R,2,0),colorFFFF80;
EXPLAINEX(CLOSE>0,'买入价:',R*(1-FL),2,1),color80FF80;
EXPLAINEX(CLOSE>0,'-5%: ',R*0.95,2,0),color808000;
EXPLAINEX(CLOSE>0,'-10%: ',R*0.9,2,0),colorFF8080;
|