老师帮忙改下,谢谢 [博易POBO]
咨询内容:
R1:REFX1(2*PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS),10000);
S1:REFX1(2*PIVOT-REF(HHV(H,DAYBARPOS),DAYBARPOS),10000);
R2:REFX1(PIVOT+ (R1-S1),10000);
S2:REFX1(PIVOT-(R1-S1),10000);
R3:REFX1(REF(HHV(H,DAYBARPOS),DAYBARPOS)+ 2*(PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS)),10000);
S3:REFX1(REF(LLV(L,DAYBARPOS),DAYBARPOS)-2*(REF(HHV(H,DAYBARPOS),DAYBARPOS)-PIVOT),10000);
SM1:REFX1((PIVOT+ S1)/2,10000);
SM2:REFX1((S1 +S2)/2,10000);
SM3:REFX1((S2+ S3)/2,10000);
RM1:REFX1((PIVOT+ R1)/2,10000);
RM2:REFX1((R1 +R2)/2,10000);
RM3:REFX1((R2 +R3)/2,10000);
DRAWTEXT(ISLASTBAR,PIVOT,'PIVOT'),ALIGN0;
DRAWNUMBER(ISLASTBAR,PIVOT,PIVOT,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,R1,'R1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R1,R1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,S1,'S1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S1,S1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,R2,'R2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R2,R2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,S2,'S2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S2,S2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,R3,'R3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R3,R3,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,S3,'S3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S3,S3,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,SM1,'SM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM1,SM1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,SM2,'SM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM2,SM2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,SM3,'SM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM3,SM3,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,RM1,'RM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM1,RM1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,RM2,'RM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM2,RM2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,RM3,'RM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM3,RM3,0,COLORRED),ALIGN2;
PIVOT:REFX(REF(HHV(H,DAYBARPOS)+ LLV(L,DAYBARPOS)+ CLOSE,1)/3,DATACOUNT-BARPOS-1);
R1:REFX(2*PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS),DATACOUNT-BARPOS-1);
S1:REFX(2*PIVOT-REF(HHV(H,DAYBARPOS),DAYBARPOS),DATACOUNT-BARPOS-1);
R2:REFX(PIVOT+ (R1-S1),DATACOUNT-BARPOS-1);
S2:REFX(PIVOT-(R1-S1),DATACOUNT-BARPOS-1);
R3:REFX(REF(HHV(H,DAYBARPOS),DAYBARPOS)+ 2*(PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS)),DATACOUNT-BARPOS-1);
S3:REFX(REF(LLV(L,DAYBARPOS),DAYBARPOS)-2*(REF(HHV(H,DAYBARPOS),DAYBARPOS)-PIVOT),DATACOUNT-BARPOS-1);
SM1:REFX((PIVOT+ S1)/2,DATACOUNT-BARPOS-1);
SM2:REFX((S1 +S2)/2,DATACOUNT-BARPOS-1);
SM3:REFX((S2+ S3)/2,DATACOUNT-BARPOS-1);
RM1:REFX((PIVOT+ R1)/2,DATACOUNT-BARPOS-1);
RM2:REFX((R1 +R2)/2,DATACOUNT-BARPOS-1);
RM3:REFX((R2 +R3)/2,DATACOUNT-BARPOS-1);
DRAWTEXT(ISLASTBAR,PIVOT,'PIVOT'),ALIGN0;
DRAWNUMBER(ISLASTBAR,PIVOT,PIVOT,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,R1,'R1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R1,R1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,S1,'S1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S1,S1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,R2,'R2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R2,R2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,S2,'S2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S2,S2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,R3,'R3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R3,R3,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,S3,'S3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S3,S3,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,SM1,'SM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM1,SM1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,SM2,'SM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM2,SM2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,SM3,'SM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM3,SM3,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,RM1,'RM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM1,RM1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,RM2,'RM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM2,RM2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,RM3,'RM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM3,RM3,0),COLORRED,ALIGN2; 来源 程序化久久网
老师帮忙改下,谢谢
PIVOT:REFX1(REF(HHV(H,DAYBARPOS)+ LLV(L,DAYBARPOS)+ CLOSE,1)/3,10000);R1:REFX1(2*PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS),10000);
S1:REFX1(2*PIVOT-REF(HHV(H,DAYBARPOS),DAYBARPOS),10000);
R2:REFX1(PIVOT+ (R1-S1),10000);
S2:REFX1(PIVOT-(R1-S1),10000);
R3:REFX1(REF(HHV(H,DAYBARPOS),DAYBARPOS)+ 2*(PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS)),10000);
S3:REFX1(REF(LLV(L,DAYBARPOS),DAYBARPOS)-2*(REF(HHV(H,DAYBARPOS),DAYBARPOS)-PIVOT),10000);
SM1:REFX1((PIVOT+ S1)/2,10000);
SM2:REFX1((S1 +S2)/2,10000);
SM3:REFX1((S2+ S3)/2,10000);
RM1:REFX1((PIVOT+ R1)/2,10000);
RM2:REFX1((R1 +R2)/2,10000);
RM3:REFX1((R2 +R3)/2,10000);
DRAWTEXT(ISLASTBAR,PIVOT,'PIVOT'),ALIGN0;
DRAWNUMBER(ISLASTBAR,PIVOT,PIVOT,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,R1,'R1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R1,R1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,S1,'S1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S1,S1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,R2,'R2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R2,R2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,S2,'S2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S2,S2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,R3,'R3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R3,R3,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,S3,'S3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S3,S3,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,SM1,'SM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM1,SM1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,SM2,'SM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM2,SM2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,SM3,'SM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM3,SM3,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,RM1,'RM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM1,RM1,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,RM2,'RM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM2,RM2,0,COLORRED),ALIGN2;
DRAWTEXT(ISLASTBAR,RM3,'RM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM3,RM3,0,COLORRED),ALIGN2;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: DAYBARPOS:=BARSLAST(REF(HOUR,1)=15 AND HOUR<>15);PIVOT:REFX(REF(HHV(H,DAYBARPOS)+ LLV(L,DAYBARPOS)+ CLOSE,1)/3,DATACOUNT-BARPOS-1);
R1:REFX(2*PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS),DATACOUNT-BARPOS-1);
S1:REFX(2*PIVOT-REF(HHV(H,DAYBARPOS),DAYBARPOS),DATACOUNT-BARPOS-1);
R2:REFX(PIVOT+ (R1-S1),DATACOUNT-BARPOS-1);
S2:REFX(PIVOT-(R1-S1),DATACOUNT-BARPOS-1);
R3:REFX(REF(HHV(H,DAYBARPOS),DAYBARPOS)+ 2*(PIVOT-REF(LLV(L,DAYBARPOS),DAYBARPOS)),DATACOUNT-BARPOS-1);
S3:REFX(REF(LLV(L,DAYBARPOS),DAYBARPOS)-2*(REF(HHV(H,DAYBARPOS),DAYBARPOS)-PIVOT),DATACOUNT-BARPOS-1);
SM1:REFX((PIVOT+ S1)/2,DATACOUNT-BARPOS-1);
SM2:REFX((S1 +S2)/2,DATACOUNT-BARPOS-1);
SM3:REFX((S2+ S3)/2,DATACOUNT-BARPOS-1);
RM1:REFX((PIVOT+ R1)/2,DATACOUNT-BARPOS-1);
RM2:REFX((R1 +R2)/2,DATACOUNT-BARPOS-1);
RM3:REFX((R2 +R3)/2,DATACOUNT-BARPOS-1);
DRAWTEXT(ISLASTBAR,PIVOT,'PIVOT'),ALIGN0;
DRAWNUMBER(ISLASTBAR,PIVOT,PIVOT,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,R1,'R1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R1,R1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,S1,'S1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S1,S1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,R2,'R2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R2,R2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,S2,'S2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S2,S2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,R3,'R3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,R3,R3,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,S3,'S3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,S3,S3,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,SM1,'SM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM1,SM1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,SM2,'SM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM2,SM2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,SM3,'SM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,SM3,SM3,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,RM1,'RM1'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM1,RM1,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,RM2,'RM2'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM2,RM2,0),COLORRED,ALIGN2;
DRAWTEXT(ISLASTBAR,RM3,'RM3'),ALIGN0;
DRAWNUMBER(ISLASTBAR,RM3,RM3,0),COLORRED,ALIGN2; 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容