斜率问题请老师帮忙修改下 [文华财经]
-
咨询内容:
NN:=60;N:=1;T:=144;T1:=10;HDAY:=10;LDAY:=10;调点:=3; {黄金分割}HH:=REF(HHV(H,T),T1);LL:=REF(LLV(L,T),T1);H1:=HH-(HH-LL)*0.191;H2:=HH-(HH-LL)*0.382;H3:=HH-(HH-LL)*0.5;H4:=HH-(HH-LL)*0.618;H5:=HH-(HH-LL)*0.764;H6:=HH-(HH-LL)*0.809;H7:=HH-(HH-LL)*0.236;顶1:=HH+(HH-LL)*0.191;顶2:=HH+(HH-LL)*0.382;顶3:=HH+(HH-LL)*0.618;底1:=IF((HH-LL)<LL,LL-(HH-LL)*0.191,LL-LL*0.191);底2:=IF((HH-LL)<LL,LL-(HH-LL)*0.382,LL-LL*0.382);底3:=IF((HH-LL)<LL,LL-(HH-LL)*0.618,LL-LL*0.618);CURRBARSCOUNT:=REFX1(BARPOS,9999)-BARPOS+1;
高:=IF(CURRBARSCOUNT<=T+T1 AND CURRBARSCOUNT>T1,REFX1(HH,9999),NULL);一:=IF(CURRBARSCOUNT<=T+T1,REFX1(H1,9999),NULL);二:=IF(CURRBARSCOUNT<=T+T1,REFX1(H2,9999),NULL);三:=IF(CURRBARSCOUNT<=T+T1,REFX1(H3,9999),NULL);四:=IF(CURRBARSCOUNT<=T+T1,REFX1(H4,9999),NULL);五:=IF(CURRBARSCOUNT<=T+T1,REFX1(H5,9999),NULL);六:=IF(CURRBARSCOUNT<=T+T1,REFX1(H6,9999),NULL);七:=IF(CURRBARSCOUNT<=T+T1,REFX1(H7,9999),NULL);低:=IF(CURRBARSCOUNT<=T+T1 AND CURRBARSCOUNT>T1,REFX1(LL,9999),NULL);NOTEXT1:高,COLOR007799;
上角度:= 90;// 70下角度:= 90;角度:=180;CURR:=CURRBARSCOUNT;TCH:=REFX1(HHV(H,HDAY*10),9999);GTT:=REFX1(BARSLAST(TCH=H),9999)+1;SX跌H:=REFX1(IF(GTT=1,H,REF(H,GTT-1)),9999);BCL:=REFX1(LLV(L,LDAY*10),9999);DTT:=REFX1(BARSLAST(BCL=L),9999)+1;SX涨L:=REFX1(IF(DTT=1,L,REF(L,DTT-1)),9999);涨点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L=SX涨L)+1));跌点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H=SX跌H)+1));最低:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,涨点,跌点)));L斜率:=下角度/IF(C<360,1000,10);最高:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,跌点,涨点)));H斜率:=上角度/IF(C<3600,1000,10);天线:=SX跌H; 地线:=SX涨L;K:=(天线-地线)/(IF(跌点>=涨点,跌点,涨点)-IF(跌点>=涨点,涨点,跌点));
上斜线:=IF(地线+REFX1(L斜率*4.00,9999)*最低>=地线,地线+REFX1(L斜率*4.00,9999)*最低,NULL);上斜线0:=IF(地线+REFX1(L斜率*2.00,9999)*最低>=地线,地线+REFX1(L斜率*2.00,9999)*最低,NULL);上斜线1:=IF(地线+REFX1(L斜率*1.5,9999)*最低>=地线,地线+REFX1(L斜率*1.5,9999)*最低,NULL);上斜线2:=IF(地线+REFX1(L斜率*1.00,9999)*最低>=地线,地线+REFX1(L斜率*1.000,9999)*最低,NULL);上斜线3:=IF(地线+REFX1(L斜率*0.70,9999)*最低>=地线,地线+REFX1(L斜率*0.70,9999)*最低,NULL);上斜线4:=IF(地线+REFX1(L斜率*0.50,9999)*最低>=地线,地线+REFX1(L斜率*0.50,9999)*最低,NULL);上斜线5:=IF(地线+REFX1(L斜率*0.365,9999)*最低>=地线,地线+REFX1(L斜率*0.365,9999)*最低,NULL);上斜线6:=IF(地线+REFX1(L斜率*0.250,9999)*最低>=地线,地线+REFX1(L斜率*0.250,9999)*最低,NULL);上斜线7:=IF(地线+REFX1(L斜率*0.165,9999)*最低>=地线,地线+REFX1(L斜率*0.165,9999)*最低,NULL);上斜线8:=IF(地线+REFX1(L斜率*0.123,9999)*最低>=地线,地线+REFX1(L斜率*0.123,9999)*最低,NULL);上斜线9:=IF(地线+REFX1(L斜率*0.06,9999)*最低>=地线,地线+REFX1(L斜率*0.06,9999)*最低,NULL);
下斜线:=IF(天线-REFX1(H斜率*4.00,9999)*最高<=天线,天线-REFX1(H斜率*4.00,9999)*最高,NULL);下斜线0:=IF(天线-REFX1(H斜率*2.00,9999)*最高<=天线,天线-REFX1(H斜率*2.00,9999)*最高,NULL);下斜线1:=IF(天线-REFX1(H斜率*1.500,9999)*最高<=天线,天线-REFX1(H斜率*1.500,9999)*最高,NULL);下斜线2:=IF(天线-REFX1(H斜率*1.000,9999)*最高<=天线,天线-REFX1(H斜率*1.000,9999)*最高,NULL);下斜线3:=IF(天线-REFX1(H斜率*0.70,9999)*最高<=天线,天线-REFX1(H斜率*0.70,9999)*最高,NULL);
下斜线4:=IF(天线-REFX1(H斜率*0.50,9999)*最高<=天线,天线-REFX1(H斜率*0.50,9999)*最高,NULL);下斜线5:=IF(天线-REFX1(H斜率*0.382,9999)*最高<=天线,天线-REFX1(H斜率*0.365,9999)*最高,NULL);下斜线6:=IF(天线-REFX1(H斜率*0.250,9999)*最高<=天线,天线-REFX1(H斜率*0.250,9999)*最高,NULL);下斜线7:=IF(天线-REFX1(H斜率*0.165,9999)*最高<=天线,天线-REFX1(H斜率*0.165,9999)*最高,NULL);下斜线8:=IF(天线-REFX1(H斜率*0.123,9999)*最高<=天线,天线-REFX1(H斜率*0.123,9999)*最高,NULL);下斜线9:=IF(天线-REFX1(H斜率*0.06,9999)*最高<=天线,天线-REFX1(H斜率*0.06,9999)*最高,NULL);/////////A:=BACKSET(ISLASTBAR,BARSLAST(REFX(CROSS(上斜线9<>上斜线1,0.5),1)||REFX(CROSS(下斜线9<>下斜线1,0.5),1))+NN);X1:=REFX1(BARSLASTCOUNT(上斜线9<>上斜线1)<BARSLASTCOUNT(下斜线9<>下斜线1),9999);///////
上9:IF(上斜线9<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线9,NULL),NULL),COLORAA00AA,COLORWHITE;上8:IF(上斜线8<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线8,NULL),NULL),COLORAA00AA,COLORWHITE;上7:IF(上斜线7<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线7,NULL),NULL),COLORAA00AA,COLORWHITE;上6:IF(上斜线6<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线6,NULL),NULL),COLORAA00AA,COLORWHITE;上5:IF(上斜线5<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线5,NULL),NULL),COLORAA00AA,COLORWHITE;上4:IF(上斜线4<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线4,NULL),NULL),COLOR0000FF,COLORYELLOW;
上3:IF(上斜线3<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线3,NULL),NULL),COLORAA00AA,COLORRED;上2:IF(上斜线2<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线2,NULL),NULL),COLORAA00AA,COLORRED;上1:IF(上斜线1<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线1,NULL),NULL),COLORAA00AA,COLORRED;上0:IF(上斜线0<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线0,NULL),NULL),COLORAA00AA,COLORRED;上:IF(上斜线<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线,NULL),NULL),COLORAA00AA,COLORRED;
下9:IF(下斜线9>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线9,NULL),NULL),COLORAAAAAA,COLORGREEN;下8:IF(下斜线8>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线8,NULL),NULL),COLORAAAAAA,COLORGREEN;下7:IF(下斜线7>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线7,NULL),NULL),COLORAAAAAA,COLORGREEN;下6:IF(下斜线6>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线6,NULL),NULL),COLORAAAAAA,COLORGREEN;下5:IF(下斜线5>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线5,NULL),NULL),COLORAAAAAA,COLORGREEN;下4:IF(下斜线4>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线4,NULL),NULL),COLOR0000FF,COLORYELLOW;下3:IF(下斜线3>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线3,NULL),NULL),COLORAAAAAA,COLORGREEN;下2:IF(下斜线2>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线2,NULL),NULL),COLORAAAAAA,COLORGREEN;下1:IF(下斜线1>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线1,NULL),NULL),COLORAAAAAA,COLORGREEN;下0:IF(下斜线0>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线0,NULL),NULL),COLORAAAAAA,COLORGREEN;下:IF(下斜线>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线,NULL),NULL),COLORAAAAAA,COLORGREEN; DRAWTEXT(REFX(CROSS(涨点,0.5),1),L-N*MINPRICE,' 多'),COLORRED,VALIGN0;DRAWTEXT(REFX(CROSS(跌点,0.5),1),H+N*MINPRICE,' 跌'),COLORGREEN;
来源:程序化99
-
文华技术人员:
斜率周期能不能大一倍,按照甘氏线的角度修改下
来源: WWW.CXH99.COM
-
文华客服:
文件名:微信截图_20210727191650.png -
网友回复:
甘氏线没法自编的,角度增加一倍参考;
NN:=60; N:=1; T:=144; T1:=10; HDAY:=10; LDAY:=10; 调点:=3; {黄金分割} HH:=REF(HHV(H,T),T1); LL:=REF(LLV(L,T),T1); H1:=HH-(HH-LL)*0.191; H2:=HH-(HH-LL)*0.382; H3:=HH-(HH-LL)*0.5; H4:=HH-(HH-LL)*0.618; H5:=HH-(HH-LL)*0.764; H6:=HH-(HH-LL)*0.809; H7:=HH-(HH-LL)*0.236; 顶1:=HH+(HH-LL)*0.191; 顶2:=HH+(HH-LL)*0.382; 顶3:=HH+(HH-LL)*0.618; 底1:=IF((HH-LL)<LL,LL-(HH-LL)*0.191,LL-LL*0.191); 底2:=IF((HH-LL)<LL,LL-(HH-LL)*0.382,LL-LL*0.382); 底3:=IF((HH-LL)<LL,LL-(HH-LL)*0.618,LL-LL*0.618); CURRBARSCOUNT:=REFX1(BARPOS,9999)-BARPOS+1;
高:=IF(CURRBARSCOUNT<=T+T1 AND CURRBARSCOUNT>T1,REFX1(HH,9999),NULL); 一:=IF(CURRBARSCOUNT<=T+T1,REFX1(H1,9999),NULL); 二:=IF(CURRBARSCOUNT<=T+T1,REFX1(H2,9999),NULL); 三:=IF(CURRBARSCOUNT<=T+T1,REFX1(H3,9999),NULL); 四:=IF(CURRBARSCOUNT<=T+T1,REFX1(H4,9999),NULL); 五:=IF(CURRBARSCOUNT<=T+T1,REFX1(H5,9999),NULL); 六:=IF(CURRBARSCOUNT<=T+T1,REFX1(H6,9999),NULL); 七:=IF(CURRBARSCOUNT<=T+T1,REFX1(H7,9999),NULL); 低:=IF(CURRBARSCOUNT<=T+T1 AND CURRBARSCOUNT>T1,REFX1(LL,9999),NULL); NOTEXT1:高,COLOR007799;
上角度:= 90;// 70 下角度:= 90; 角度:=180; CURR:=CURRBARSCOUNT; TCH:=REFX1(HHV(H,HDAY*10),9999); GTT:=REFX1(BARSLAST(TCH=H),9999)+1; SX跌H:=REFX1(IF(GTT=1,H,REF(H,GTT-1)),9999); BCL:=REFX1(LLV(L,LDAY*10),9999); DTT:=REFX1(BARSLAST(BCL=L),9999)+1; SX涨L:=REFX1(IF(DTT=1,L,REF(L,DTT-1)),9999); 涨点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L=SX涨L)+1)); 跌点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H=SX跌H)+1)); 最低:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,涨点,跌点))); L斜率:=下角度/IF(C<360,1000,10); 最高:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,跌点,涨点))); H斜率:=上角度/IF(C<3600,1000,10); 天线:=SX跌H; 地线:=SX涨L; K:=(天线-地线)/(IF(跌点>=涨点,跌点,涨点)-IF(跌点>=涨点,涨点,跌点));
上斜线:=IF(地线+REFX1(L斜率*4.00,9999)*最低>=地线,地线+REFX1(L斜率*4.00*2,9999)*最低,NULL); 上斜线0:=IF(地线+REFX1(L斜率*2.00,9999)*最低>=地线,地线+REFX1(L斜率*2.00*2,9999)*最低,NULL); 上斜线1:=IF(地线+REFX1(L斜率*1.5,9999)*最低>=地线,地线+REFX1(L斜率*1.5*2,9999)*最低,NULL); 上斜线2:=IF(地线+REFX1(L斜率*1.00,9999)*最低>=地线,地线+REFX1(L斜率*1.000*2,9999)*最低,NULL); 上斜线3:=IF(地线+REFX1(L斜率*0.70,9999)*最低>=地线,地线+REFX1(L斜率*0.70*2,9999)*最低,NULL); 上斜线4:=IF(地线+REFX1(L斜率*0.50,9999)*最低>=地线,地线+REFX1(L斜率*0.50*2,9999)*最低,NULL); 上斜线5:=IF(地线+REFX1(L斜率*0.365,9999)*最低>=地线,地线+REFX1(L斜率*0.365*2,9999)*最低,NULL); 上斜线6:=IF(地线+REFX1(L斜率*0.250,9999)*最低>=地线,地线+REFX1(L斜率*0.250*2,9999)*最低,NULL); 上斜线7:=IF(地线+REFX1(L斜率*0.165,9999)*最低>=地线,地线+REFX1(L斜率*0.165*2,9999)*最低,NULL); 上斜线8:=IF(地线+REFX1(L斜率*0.123,9999)*最低>=地线,地线+REFX1(L斜率*0.123*2,9999)*最低,NULL); 上斜线9:=IF(地线+REFX1(L斜率*0.06,9999)*最低>=地线,地线+REFX1(L斜率*0.06*2,9999)*最低,NULL);
下斜线:=IF(天线-REFX1(H斜率*4.00,9999)*最高<=天线,天线-REFX1(H斜率*4.00*2,9999)*最高,NULL); 下斜线0:=IF(天线-REFX1(H斜率*2.00,9999)*最高<=天线,天线-REFX1(H斜率*2.00*2,9999)*最高,NULL); 下斜线1:=IF(天线-REFX1(H斜率*1.500,9999)*最高<=天线,天线-REFX1(H斜率*1.500*2,9999)*最高,NULL); 下斜线2:=IF(天线-REFX1(H斜率*1.000,9999)*最高<=天线,天线-REFX1(H斜率*1.000*2,9999)*最高,NULL); 下斜线3:=IF(天线-REFX1(H斜率*0.70,9999)*最高<=天线,天线-REFX1(H斜率*0.70*2,9999)*最高,NULL);
下斜线4:=IF(天线-REFX1(H斜率*0.50,9999)*最高<=天线,天线-REFX1(H斜率*0.50*2,9999)*最高,NULL); 下斜线5:=IF(天线-REFX1(H斜率*0.382,9999)*最高<=天线,天线-REFX1(H斜率*0.365*2,9999)*最高,NULL); 下斜线6:=IF(天线-REFX1(H斜率*0.250,9999)*最高<=天线,天线-REFX1(H斜率*0.250*2,9999)*最高,NULL); 下斜线7:=IF(天线-REFX1(H斜率*0.165,9999)*最高<=天线,天线-REFX1(H斜率*0.165*2,9999)*最高,NULL); 下斜线8:=IF(天线-REFX1(H斜率*0.123,9999)*最高<=天线,天线-REFX1(H斜率*0.123*2,9999)*最高,NULL); 下斜线9:=IF(天线-REFX1(H斜率*0.06,9999)*最高<=天线,天线-REFX1(H斜率*0.06*2,9999)*最高,NULL); ///////// A:=BACKSET(ISLASTBAR,BARSLAST(REFX(CROSS(上斜线9<>上斜线1,0.5),1)||REFX(CROSS(下斜线9<>下斜线1,0.5),1))+NN); X1:=REFX1(BARSLASTCOUNT(上斜线9<>上斜线1)<BARSLASTCOUNT(下斜线9<>下斜线1),9999); ///////
上9:IF(上斜线9<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线9,NULL),NULL),COLORAA00AA,COLORWHITE; 上8:IF(上斜线8<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线8,NULL),NULL),COLORAA00AA,COLORWHITE; 上7:IF(上斜线7<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线7,NULL),NULL),COLORAA00AA,COLORWHITE; 上6:IF(上斜线6<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线6,NULL),NULL),COLORAA00AA,COLORWHITE; 上5:IF(上斜线5<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线5,NULL),NULL),COLORAA00AA,COLORWHITE; 上4:IF(上斜线4<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线4,NULL),NULL),COLOR0000FF,COLORYELLOW;
上3:IF(上斜线3<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线3,NULL),NULL),COLORAA00AA,COLORRED; 上2:IF(上斜线2<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线2,NULL),NULL),COLORAA00AA,COLORRED; 上1:IF(上斜线1<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线1,NULL),NULL),COLORAA00AA,COLORRED; 上0:IF(上斜线0<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线0,NULL),NULL),COLORAA00AA,COLORRED; 上:IF(上斜线<=天线*1.05,IF(X1||X1=0&&NOT(A),上斜线,NULL),NULL),COLORAA00AA,COLORRED;
下9:IF(下斜线9>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线9,NULL),NULL),COLORAAAAAA,COLORGREEN; 下8:IF(下斜线8>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线8,NULL),NULL),COLORAAAAAA,COLORGREEN; 下7:IF(下斜线7>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线7,NULL),NULL),COLORAAAAAA,COLORGREEN; 下6:IF(下斜线6>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线6,NULL),NULL),COLORAAAAAA,COLORGREEN; 下5:IF(下斜线5>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线5,NULL),NULL),COLORAAAAAA,COLORGREEN; 下4:IF(下斜线4>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线4,NULL),NULL),COLOR0000FF,COLORYELLOW; 下3:IF(下斜线3>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线3,NULL),NULL),COLORAAAAAA,COLORGREEN; 下2:IF(下斜线2>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线2,NULL),NULL),COLORAAAAAA,COLORGREEN; 下1:IF(下斜线1>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线1,NULL),NULL),COLORAAAAAA,COLORGREEN; 下0:IF(下斜线0>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线0,NULL),NULL),COLORAAAAAA,COLORGREEN; 下:IF(下斜线>=地线*0.95,IF(X1=0||X1&&NOT(A),下斜线,NULL),NULL),COLORAAAAAA,COLORGREEN; DRAWTEXT(REFX(CROSS(涨点,0.5),1),L-N*MINPRICE,'nbsp; 多',COLORRED,VALIGN0; DRAWTEXT(REFX(CROSS(跌点,0.5),1),H+N*MINPRICE,'nbsp; 跌',COLORGREEN; -
网友回复:
更改成这个斜率
文件名:微信截图_20210727192034.png
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容