您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

任意区间黄金分割线[其他软件公式]

相关标签:

 

任意区间黄金分割线
INPUT:高(0,0,255),XS(0,0,3),调(0,0,2),F(0,0,255),F1(0,0,255),F2(0,0,255),角(0,0,1),角2(0,0,1);
TTt:=ISLASTBAR=1;
A1:=((H-L)/L)*100;
A2:=H-L;
DRAWTEXTEX(TTt,0,176,1,'【振幅:'+NUMTOSTR(A1[SYSPARAM(1)],2)+'% '+NUMTOSTR(A2[SYSPARAM(1)],2)+'元 】'+''),Colordddd00;
DRAWTEXTEX(TTT,0,1,1,'【代码:'+STKLABEL+' 名称:'+STKNAME+'】'),Color00FFFF;
as:=(o+h+l+c)/4;
BL: eMA(as,F),linethick1,Color208FFF;
BL1: MA(C,F1),linethick1,ColorFFFFFF;
BL2: MA(C,F2),linethick1,Color00FFFF;
PARTLINE(BL<REF(BL,1),BL),colorff0000,linethick2;
PARTLINE(BL1<REF(BL1,1),BL1),color00ff00,linethick1;
PARTLINE(BL2<REF(BL2,1),BL2),color00ff00,linethick1;
TT1:=ISLASTBAR=1 AND 角=1;TT2:=ISLASTBAR=1 AND 角2=1;
QMC:=REF(BL1,1);QMC1:=REF(BL1,2);
QMC2:=REF(BL2,1);QMC3:=REF(BL2,2);
CMC:=BL1-QMC;CMC1:=QMC-QMC1;CPJ:=(CMC+CMC1)/2;
CMD:=BL2-QMC2;CMD1:=QMC2-QMC3;DPJ:=(CMD+CMD1)/2;
Q1:=ATAN((BL1/REF(BL1,1)-1)*100)*180/3.1416;
Q2:=ATAN((QMC/REF(QMC,1)-1)*100)*180/3.1416;
Q3:=ATAN((QMC1/REF(QMC1,1)-1)*100)*180/3.1416;
AQ1:=ATAN((BL2/REF(BL2,1)-1)*100)*180/3.1416;
AQ2:=ATAN((QMC2/REF(QMC2,1)-1)*100)*180/3.1416;
AQ3:=ATAN((QMC3/REF(QMC3,1)-1)*100)*180/3.1416;
DRAWTEXTEX(TT1,0,75,16,'【任意均线角度】'+' '),COLORFFFFFF;
DRAWTEXTEX(TT1,0,2,30,' '+NUMTOSTR(F1,0)+''+'日=; ∠'+NUMTOSTR(Q1,2)+' 度'+'/前日=;∠'+NUMTOSTR(Q2,2)+' 度'+'/前2日=;∠'+NUMTOSTR(Q3,2)+' 度'+''),ColorFFffff;
DRAWTEXTEX(TT1,0,2,44,' '+NUMTOSTR(F1,0)+''+'日均值:'+NUMTOSTR(BL1,2)+' 元'+''+'/前日=:'+NUMTOSTR(QMC,2)+' 元'+'/前2日=:'+NUMTOSTR(QMC1,2)+' 元'),ColorFFffff;
DRAWTEXTEX(TT1,0,2,58,' '+NUMTOSTR(F1,0)+''+'日均线近三日的平均增(减)速;'+NUMTOSTR(CPJ,2)+' 元'+''),ColorFFffff;
DRAWTEXTEX(TT2,0,2,88,' '+NUMTOSTR(F2,0)+''+'日=; ∠'+NUMTOSTR(AQ1,2)+' 度'+'/前日=;∠'+NUMTOSTR(AQ2,2)+' 度'+'/前2日=;∠'+NUMTOSTR(AQ3,2)+' 度'+''),Color00ffff;
DRAWTEXTEX(TT2,0,2,102,' '+NUMTOSTR(F2,0)+''+'日均值:'+NUMTOSTR(BL2,2)+' 元'+''+'/前日=:'+NUMTOSTR(QMC2,2)+' 元'+'/前2日=:'+NUMTOSTR(QMC3,2)+' 元'),Color00ffff;
DRAWTEXTEX(TT2,0,2,116,' '+NUMTOSTR(F2,0)+''+'日均线近三日的平均增(减)速;'+NUMTOSTR(DPJ,2)+' 元'+''),Color00ffff;
BLT:=BARSTATUS=2;
DRAWTEXT(BLT AND BL>REF(BL,1),BL,'↑'+NUMTOSTR(f,0)+':'+NUMTOSTR(BL,2)),COLOR208fff;
DRAWTEXT(BLT AND BL<REF(BL,1),BL,'↓'+NUMTOSTR(f,0)+':'+NUMTOSTR(BL,2)),Color208FFF;
DRAWTEXT(BLT AND BL1>REF(BL1,1),BL1,'↑'+NUMTOSTR(f1,0)+':'+NUMTOSTR(BL1,2)),COLORFFffff;
DRAWTEXT(BLT AND BL1<REF(BL1,1),BL1,'↓'+NUMTOSTR(f1,0)+':'+NUMTOSTR(BL1,2)),ColorFFFDED;
DRAWTEXT(BLT AND BL2>REF(BL2,1),BL2,'↑'+NUMTOSTR(f2,0)+':'+NUMTOSTR(BL2,2)),COLOR00CCCC;
DRAWTEXT(BLT AND BL2<REF(BL2,1),BL2,'↓'+NUMTOSTR(f2,0)+':'+NUMTOSTR(BL2,2)),Color00CCCC;
TA1:=BARPOS=SYSPARAM(1);
TA2:=BARPOS=SYSPARAM(3);
T1:=datacount-barpos+0;
T2:=DATEDIFF(date,CURRENTDATE);
X:=SYSPARAM(2);//最初
X1:=SYSPARAM(3);//最后
X2:=SYSPARAM(4);//最高
X3:=SYSPARAM(5);//最低
X4:=SYSPARAM(1);
YG:=REF(H,BARSLAST(TA1));YD:=REF(L,BARSLAST(TA1));
N:=((X1 - X) + 1);
ZG:=ref(H,高);
HH:=HHV(zg,1);
LL:=LLV(L,N);
GG:HH[X1],colorFF00FF;
DD1:=LL[X1],colorff0000;
DD:=YD[X1],color005555,LINEDOT;
PARTLINE(YD,YD),LINETHICK1,COLOR00FF00;
DRAWTEXT(TA2,YD,'K线低--'+NUMTOSTR(YD,2)),COLORFFFFFF,ALIGN2,PXDN5;
//DRAWTEXT(TA2,YG,'K线高--'+NUMTOSTR(YG,2)),COLORFFFFFF,ALIGN2,PXDN5;
//DRAWTEXT(TTT ,DD1,'最低'+NUMTOSTR(DD1,2)),ALIGN1,colorFFEE00,,pxup25;
DRAWTEXT(TTT ,GG,' 最高'+NUMTOSTR(GG,2)),ALIGN1,colorffaaaa,,pxDN5;
Q:=(DD + ((GG - DD) * 0.191));
Q2:=(DD + ((GG - DD) * 0.382));
Q3:=(DD + ((GG - DD) * 0.50));
Q4:=(DD + ((GG - DD) * 0.618));
Q5:=(DD + ((GG - DD) * 0.809));
Y_1:=REF(Q,BARSLAST(TA1));
Y_2:=REF(Q2,BARSLAST(TA1));
Y_3:=REF(Q3,BARSLAST(TA1));
Y_4:=REF(Q4,BARSLAST(TA1));
Y_5:=REF(Q5,BARSLAST(TA1));
PARTLINE(Y_1,Y_1),LINEDOT,Color005555;
PARTLINE(Y_2,Y_2),LINEDOT,Color005555;
PARTLINE(Y_3,Y_3),LINEDOT,Colordddddd;
PARTLINE(Y_4,Y_4),LINEDOT,Color005555;
PARTLINE(Y_5,Y_5),LINEDOT,Color005555;
DRAWTEXT(TA2,Q,NUMTOSTR(Q,2)+' :--0.191'),COLOR00bbbb,ALIGN2,PXDN5;
DRAWTEXT(TA2,Q2,NUMTOSTR(Q2,2)+' :--0.382'),COLOR00bbbb,ALIGN2,PXUP22;
DRAWTEXT(TA2,Q3,':('+NUMTOSTR(Q3,2)+') ←*1/2'),COLORFFFFFF,ALIGN2,PXDN5;
DRAWTEXT(TA2,Q4,NUMTOSTR(Q4,2)+' :--0.618'),COLOR00bbbb,ALIGN2,PXDN5;
DRAWTEXT(TA2,Q5,NUMTOSTR(Q5,2)+' :--0.809'),COLOR00bbbb,ALIGN2,PXDN5;
JN1:=dd+(HH-dd)*0.875;JN7:=dd+(HH-dd)*0.85;JN9:=dd+(HH-dd)*0.72;JN12:=dd+(HH-dd)*0.28;
JN14:=dd+(HH-dd)*0.75;JN8:=dd+(HH-dd)*0.78;JN2:=dd+(HH-dd)*0.667;
JN6:=dd+(HH-dd)*0.125;JN10:=dd+(HH-dd)*0.25; JN13:=dd+(HH-dd)*0.15;
JN3:=dd+(HH-dd)*0.333;HJ6:=dd+(HH-dd)*0.55;HJ7:=dd+(HH-dd)*0.45;
HJ13:=dd+(HH-dd)*0.98;HJ14:=dd+(HH-dd)*0.93; JN11:=dd+(HH-dd)*0.22;
TT6:=ISLASTBAR=1 AND XS=1;
TT7:=ISLASTBAR=1 AND XS=2;
TT8:=ISLASTBAR=1 AND XS=3;
DRAWTEXT(TT7,JN1,''+'7/8﹡→('+NUMTOSTR(JN1,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT7,JN14,''+'6/8﹡→('+NUMTOSTR(JN14,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT8,JN7,''+'85%﹡→('+NUMTOSTR(JN7,2)+''+'-----'),ALIGN2,Color208bbb,pxUP8;
DRAWTEXT(TT8,JN8,''+'78%﹡→('+NUMTOSTR(JN8,2)+''+'← '),ALIGN2,Color9bbb00,pxUP8;
DRAWTEXT(TT8,JN9,''+'72%﹡→('+NUMTOSTR(JN9,2)+''+'← '),ALIGN2,Color9bbb00,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,JN2,''+'2/3﹡→('+NUMTOSTR(JN2,2)+' '+'←-- *'),ALIGN2,Color00FF00,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,JN3,''+'1/3﹡→('+NUMTOSTR(JN3,2)+' '+'←-- *'),ALIGN2,Color00FF00,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,HJ6,''+'55%﹡→('+NUMTOSTR(HJ6,2)+''+'←'),ALIGN2,ColorAAAAAA,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,HJ7,''+'45%﹡→('+NUMTOSTR(HJ7,2)+''+'←'),ALIGN2,ColorAAAAAA,pxUP8;
DRAWTEXT(TT7,JN10,''+'2/8﹡→('+NUMTOSTR(JN10,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT7,JN6,''+'1/8﹡→('+NUMTOSTR(JN6,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,HJ13,''+'98%﹡→('+NUMTOSTR(HJ13,2)+''+'← '),ALIGN2,Colorcccc00,pxUP8;
//DRAWTEXT(TT6,HJ9,''+'95%('+NUMTOSTR(HJ9,2)+''+'←'),ALIGN2,ColorFFFF00,pxDN2;
DRAWTEXT(TT6 or tt7 or tt8,HJ14,''+'93%﹡→('+NUMTOSTR(HJ14,2)+''+'← '),ALIGN2,Colorcccc00,pxUP8;
DRAWTEXT(TT8,JN13,''+'15%﹡→('+NUMTOSTR(JN13,2)+''+'-----'),ALIGN2,Color208EEE,pxUP8;
DRAWTEXT(TT8,JN12,''+'28%﹡→('+NUMTOSTR(JN12,2)+''+'← '),ALIGN2,Color9FFF00,pxUP8;
DRAWTEXT(TT8,JN11,''+'22%﹡→('+NUMTOSTR(JN11,2)+''+'← '),ALIGN2,Color9FFF00,pxUP8;
//DRAWTEXT(TT6,HJ10,''+'10%﹡→('+NUMTOSTR(HJ10,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
//DRAWTEXT(TT6,HJ12,''+'8%﹡→('+NUMTOSTR(HJ12,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
//DRAWTEXT(TT6,HJ15,''+'3%﹡→('+NUMTOSTR(

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容