杨凯自动黄金分割线 {YK黄金分割线}
{参数1: M1, 最小: 0, 最大: 1000, 缺省: 5
参数2: M2, 最小: 0, 最大: 1000, 缺省: 10
参数3: M3, 最小: 0, 最大: 1000, 缺省: 20
参数4: M4, 最小: 0, 最大: 1000, 缺省: 60
参数5: M, 最小: 1, 最大: 250, 缺省: 10
公式类型: 技术指标公式-均线型
画线方法: 主图叠加}
VAR1:=MA(CLOSE,M1);
VAR2:=MA(CLOSE,M2);
VAR3:=MA(CLOSE,M3);
VAR4:=MA(CLOSE,M4);
VAR5:=VOL/REF(VOL,1)>=1.9;
VAR6:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<OPEN AND CLOSE>REF(HIGH,1) AND VAR5;
STICKLINE(VAR6,OPEN,CLOSE,1,0),COLORGREEN;
DRAWTEXT(VAR6,LOW,1),COLORYELLOW;
VAR7:=9;
VAR8:=1.5;
VAR9:=CLOSE;
VAR10:=OPEN;
VAR11:=VAR9>=REF(CLOSE,1)*(1+VAR7/100) AND VOL>REF(VOL,1)*VAR8;
DRAWTEXT(CURRBARSCOUNT<100 AND VAR11,LOW*0.98,2),COLORYELLOW;
VAR12:=REF(CLOSE,BARSLAST(VAR11));
VAR13:=REF(LOW,BARSLAST(VAR11));
VAR14:=CURRBARSCOUNT<100 AND BARSLAST(VAR11)<11 AND (LLV(LOW,BARSLAST(VAR11))>VAR13 OR LLV(LOW,BARSLAST(VAR11))=VAR13);
STICKLINE(VAR14,VAR13-VAR13*0.0005,VAR13,4,0),COLORGREEN;
STICKLINE(VAR14,VAR12,VAR12,4,0),COLORRED;
STICKLINE(VAR11,VAR10,VAR9,2,0),COLORYELLOW;
DRAWTEXT(BARSLAST(VAR11)=1 AND VAR14,VAR13*0.98,3),COLORGREEN;
DRAWTEXT(BARSLAST(VAR11)=3 AND VAR14,VAR13*0.98,5),COLORGREEN;
DRAWTEXT(BARSLAST(VAR11)=7 AND VAR14,VAR13*0.98,9),COLORGREEN;
DRAWTEXT(BARSLAST(VAR11)=9 AND VAR14,VAR13*0.98,11),COLORGREEN;
DRAWTEXT(BARSLAST(VAR11)=10 AND VAR14,VAR13*0.98,12),COLORGREEN;
VAR15:=REF(CLOSE,BARSLAST(CLOSE/REF(CLOSE,1)>1.095));
IF(REFX(VAR15,1)=VAR15 AND BARSLAST(CLOSE/REF(CLOSE,1)>1.095)<14,VAR15*0.955,DRAWNULL);
IF(REFX(VAR15,1)=VAR15 AND BARSLAST(CLOSE/REF(CLOSE,1)>1.095)<14,VAR15,DRAWNULL);
VAR16:=IF(REF(CLOSE,1)*1.1-CLOSE<0.01,1,0);
STICKLINE(VAR16,OPEN,CLOSE,2,0),COLORRED;
STICKLINE(VAR16,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(VAR16,HIGH,LOW,0,0),COLORYELLOW;
VAR17:=DMA((CLOSE+OPEN)/2,VOL/EMA(VOL*5,5));
VAR18:=DMA((CLOSE+OPEN)/2,VOL/EMA(VOL*13,13));
VAR19:=DMA((CLOSE+OPEN)/2,VOL/EMA(VOL*34,34));
VAR20:=DMA((CLOSE+OPEN)/2,VOL*100/FINANCE(7));
VAR21:=INTPART(REF(VAR17,1)*100)/100;
VAR22:=INTPART(REF(VAR17,1)*0.96*100)/100;
VAR23:=INTPART(REF(VAR20,1)*130)/100;
VAR24:=BARSLAST(CLOSE>VAR21);
VAR25:=BARSLAST(CLOSE<MIN(VAR22,VAR23));
{分析家公式网www.fxjgsw.com}
VAR26:=VAR25>VAR24;
VAR27:=VAR24>VAR25;
STICKLINE(VAR26>0,CLOSE,OPEN,3,1),COLOR4646FF;
STICKLINE(VAR26>0,HIGH,MAX(CLOSE,OPEN),0,0),COLOR4646FF;
STICKLINE(VAR26>0,LOW,MIN(CLOSE,OPEN),0,0),COLOR4646FF;
STICKLINE(VAR26>0 AND CLOSE<OPEN,CLOSE,OPEN,2,0),COLORCYAN;
STICKLINE(VAR27>0 AND CLOSE<OPEN,CLOSE,OPEN,3,0),COLORCYAN;
STICKLINE(VAR27>0,HIGH,MAX(CLOSE,OPEN),0,0),COLORCYAN;
STICKLINE(VAR27>0,LOW,MIN(CLOSE,OPEN),0,0),COLORCYAN;
STICKLINE(VAR27>0 AND CLOSE>=OPEN,CLOSE,OPEN,3,1),COLORCYAN;
VAR28:=VAR17;
VAR29:=VAR18;
VAR30:=VAR19;
VAR31:=VAR20;
DRAWICON(CROSS(VAR26,0.5),LOW*0.98,7);
DRAWICON(CROSS(VAR27,0.5),HIGH*1.02,8);
MA20:MA(CLOSE,20);
STICKLINE(CLOSE>REF(CLOSE,1)*1.095,CLOSE,OPEN,2,0),COLORYELLOW;
VAR32:=FILTER(CLOSE>=MA20,4) AND REF(CLOSE,3)>=REF(OPEN,3) AND REF(CLOSE,3)>REF(MA20,3);
VAR33:=FILTER(CLOSE<=MA20,4) AND REF(CLOSE,3)<REF(MA20,3);
VAR34:=BARSLAST(VAR32);
VAR35:=BARSLAST(VAR33);
VAR36:=REF(VAR34,1)>=VAR35 AND VAR34=0;
VAR37:=REF(VAR35,1)>=VAR34 AND VAR35=0;
VAR38:=BARSLAST(VAR36);
VAR39:=BARSLAST(VAR37);
VAR40:=REF(VAR38,VAR38+1)+VAR38+1;
VAR41:=REF(VAR39,VAR39+1)+VAR39+1;
VAR42:=REF(HHVBARS(HIGH,VAR38+1),VAR39+1)+VAR39+1;
VAR43:=REF(LLVBARS(LOW,VAR39+1),VAR38+1)+VAR38+1;
VAR44:=HHVBARS(HIGH,VAR43);
VAR45:=LLVBARS(LOW,VAR42);
VAR46:=HHV(HIGH,VAR43);
VAR47:=LLV(LOW,VAR42);
{分析家公式网www.fxjgsw.com}
VAR48:=REF(VAR46,VAR39+1);
VAR49:=REF(VAR47,IF(VAR38<VAR39,VAR40+1,VAR38+1));
VAR50:=VAR48-(VAR48-VAR49)*0.382;
VAR51:=VAR48-(VAR48-VAR49)*0.5;
VAR52:=VAR48-(VAR48-VAR49)*0.618;
VAR53:=VAR49+(VAR48-VAR49)*1.618;
VAR54:=VAR49+(VAR48-VAR49)*2.618;
VAR55:=VAR49+(VAR48-VAR49)*3.618;
VAR56:=VAR49+(VAR48-VAR49)*4.618;
VAR57:=VAR48-(VAR48-VAR49)*1.618;
VAR58:=VAR48-(VAR48-VAR49)*2.618;
VAR59:=VAR48-(VAR48-VAR49)*3.618;
VAR60:=VAR48-(VAR48-VAR49)*4.618;
顶点:REFDATE(VAR48,DATE),DOTLINE,COLORWHITE;
H61.8%:REFDATE(VAR50,DATE),DOTLINE,COLORMAGENTA;
H38.2%:REFDATE(VAR52,DATE),DOTLINE,COLORMAGENTA;
H1.618:REFDATE(VAR53,DATE),DOTLINE,COLORMAGENTA;
H2.618:REFDATE(VAR54,DATE),DOTLINE,COLORMAGENTA;
H3.618:REFDATE(VAR55,DATE),DOTLINE,COLORMAGENTA;
H4.618:REFDATE(VAR56,DATE),DOTLINE,COLORMAGENTA;
低点:REFDATE(VAR49,DATE),DOTLINE,COLORWHITE;
DRAWTEXT(ISLASTBAR,顶点,13),COLORWHITE;
DRAWTEXT(ISLASTBAR,H38.2%,14),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,H61.8%,16),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,H1.618,17),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,H2.618,18),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,H3.618,19),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,H4.618,20),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,低点,21),COLORWHITE;
VAR61:=BARSLASTCOUNT(CLOSE<MA20);
VAR62:=BACKSET((VAR61>3)*VAR61,VAR61);
VAR63:=BARSLASTCOUNT(CLOSE>MA20);
VAR64:=BACKSET((VAR63>3)*VAR63,VAR63);
VAR65:=BARSLASTCOUNT(NOT(VAR62 OR VAR64));
VAR66:=BARSLASTCOUNT(REF(VAR62>0,VAR65));
VAR67:=BARSLASTCOUNT(REF(VAR64>0,VAR65));
VAR68:=FILTERX(LLV(LOW,VAR66)=LOW,VAR66);
VAR69:=FILTERX(HHV(HIGH,VAR67)=HIGH,VAR67);
DRAWLINE(VAR68,LOW,VAR69,HIGH,0),DOTLINE,COLORYELLOW;
DRAWLINE(VAR69,HIGH,VAR68,LOW,0),DOTLINE,COLORYELLOW;
VAR70:=CLOSE=HHV(CLOSE,60);
VAR71:=BARSLAST(VAR70);
VAR72:=IF(VAR71>0,REF(CLOSE,VAR71),REF(CLOSE,VAR71));
VAR73:=CROSS(CLOSE,REF(VAR72,1));
VAR74:=VAR73 AND COUNT(VAR73,5)=1;
STICKLINE(VAR74,OPEN,CLOSE,3,0),COLORRED;
|
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!