程序化交易

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

程序化交易VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),13,1)/SMA(MAX(LOW-VAR2,0),13,1)*100;VAR4:=EMA(IF(CLOSE*1.2,VAR3*13,VAR3/13),13);VAR5:=LLV(LOW,34);VAR6:=HHV(VAR4,34);VAR7:=IF(LLV(LOW,55),1,0);VAR8:=EMA(IF(LOW=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;VAR9:=EMA(CLOSE,5);VAR10:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(-10);VAR11:=EMA(IF(LOW=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7*(-1);VAR12:=EMA(CLOSE,5)*(-1);STICKLINE(VAR8REF(VAR8,1),0,VAR8,6,1),COLOR10FFFF,LINETHICK3;备钱:IF(VAR8REF(VAR8,1),0,VAR8),COLOR0FFFFF;STICKLINE(VAR11REF(VAR11,1),0,VAR11,6,1),COLORFFF810;界:0,COLORFFFFFF,LINETHICK1;XL1:=MA(LOW,2)*0.96;XL2:=MA(LOW,26)*0.85;XL3:=REF(XL1,1)XL2ANDREF(XL1,1)XL1ANDREF(XL1,1)REF(XL1,2);STICKLINE(XL3,0,VAR8*3,8,0),COLORRED;启动:IF(XL3,0,VAR8*3),COLORRED;VA:=(2*C+H+L)/4;VB:=LLV(L,5);VC:=HHV(H,5);红线上穿买:EMA((VA-VB)/(VC-VB)*27,5),COLORRED;红线下穿卖:EMA(红线上穿买,3),COLORFFFF00;散户:=EMA(((2*CLOSE+HIGH+LOW)/4-LLV(LOW,5))/(HHV(HIGH,4)-LLV(LOW,5))*100,4);庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2);DRAWTEXT(CROSS(散户,庄家)AND散户30,5,'低进'),COLOR00FF00;DRAWTEXT(CROSS(散户,庄家)AND散户30,7,'●'),COLORFFFFFF;DRAWTEXT(CROSS(庄家,散户)AND散户70,25,'高出'),COLOR00FF00;DRAWTEXT(CROSS(庄家,散户)AND散户70,22,'●'),COLOR00FF00;极品底:IF((MA(C,5)-C)/C0.04AND(MA(C,10)-MA(C,5))/MA(C,5)0.04,23,0),LINETHICK2,COLORFF00FF;DRAWICON(极品底=23,23,1),LINETHICK2,COLORFFFFFF;RSV:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100);K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;X:=LLV(J,2)=LLV(J,8);DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDXANDJ19,3,'低进'),COLORFFFF00;DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDXANDJ19,7,'▲'),COLORRED;DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDXANDJ19,6,'▲'),COLORRED;DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDXANDJ19,5,'↑'),COLORRED;QVAR1A:=((HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21)))*(100)-10;QVAR1B:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*(100);QVAR1C:=SMA(QVAR1B,13,8);QVAR1D:=SMA(QVAR1A,21,8);机会来临:=SMA(QVAR1C,13,8),COLORRED;AAS:=FILTER((COUNT((机会来临-QVAR1D(-65)),3)=3),34);波段买点:IF(AAS,15,0),COLORFFFFFF,STICK,LINETHICK6;DRAWTEXT(波段买点,17,'波段买'),COLORFFFFFF;DRAWTEXT_FIX(CO,0.01,0.9,0,'),COLORRED;DRAWTEXT_FIX(CO,1,1,0,'SPANSTYLE=DISPLAY:NONE;ADATA-CKE-SAVED-HREF==程序化交易模型/A/SPAN'),COLORRED;泽熙操盘趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW;DRAWBAND(趋势,RGB(155,50,50),50,RGB(0,100,50));{STICKLINE(趋势50,趋势,50,6,0),COLORFF00FF;STICKLINE(趋势50,趋势,50,6,0),COLORGREEN;}转强:IF(趋势50,趋势,DRAWNULL),COLOR0000FF;转弱:IF(趋势50,趋势,DRAWNULL),COLORGREEN;RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);DEA:=EMA(DIFF,6);MACD:=2*(DIFF-DEA);转点:=IF(KDANDCCI0ANDDIFFDEAANDMACD0,1,0);STICKLINE(转点=1,50,50,2,0),COLORYELLOW;STICKLINE(转点=0,50,50,2,0),COLORCYAN;STICKLINE(C,90,90,1,0),COLORYELLOW;STICKLINE(C,10,10,1,0),COLORCYAN;判断:SMA(趋势,3,1),COLORYELLOW;IF(判断50AND趋势判断,判断,DRAWNULL),COLORYELLOW,LINETHICK2;IF(判断50AND趋势判断,判断,DRAWNULL),COLORFF00FF;IF(判断50AND趋势判断,判断,DRAWNULL),COLORGREEN,LINETHICK2;风险区:80,COLORFF85FF,POINTDOT;安全区:20,COLORYELLOW,POINTDOT;顶部:90,COLORFFFF00;强弱线:50,COLORGREEN,POINTDOT;DRAWICON(CROSS(趋势,判断)AND趋势80,判断,1);DRAWICON(CROSS(趋势,顶部),顶部,2);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;VAR2:=SMA(VAR1,9,1)+100;VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR4:=SMA(VAR3,3,1);VAR5:=SMA(VAR4,3,1)+100;VAR6:=VAR5-VAR2;趋势1:IF(VAR645,VAR6-45,0),COLOR00FFFF;VAR2Q:=REF(LOW,1);VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3);VAR5Q:=LLV(LOW,30);VAR6Q:=HHV(VAR4Q,30);VAR7Q:=IF(MA(CLOSE,58),1,0);VAR8Q:=EMA(IF(LOW=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;火焰山:=IF(VAR8Q100,100,VAR8Q);STICKLINE(火焰山0,0,火焰山*1.2,3,0),COLOR4444FF;STICKLINE(火焰山0,0,火焰山*1.2,2,0),COLOR7777FF;STICKLINE(火焰山0,0,火焰山*1.2,1,0),COLOR9999FF;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),3,0),COLOR000033;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),2,0),COLOR000077;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),1.5,0),COLOR0000BB;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),1,0),COLOR0000DD;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),3,0),COLOR003300;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),2,0),COLOR007700;STICKLINE(REF(趋势1,1)趋势1,趋势1,REF(趋势1,1),1,0),COLOR00DD00;逃顶:=CROSS(82,RSI);STICKLINE(逃顶,逃顶,20,3,0),COLORFF5500;STICKLINE(逃顶,逃顶,30,2,0),COLORFF8800;STICKLINE(逃顶,逃顶,30,1,0),COLORFFAA00;STICKLINE(逃顶,逃顶,30,0.5,0),COLORFFCC00;D1:=(C+L+H)/3;D2:=EMA(D1,6);D3:=EMA(D2,5);BBUY:=CROSS(D2,D3);DRAWICON(BBUY,10,1);VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;DRAWICON(CROSS(82,VARR1),10,2);DRAWTEXT(CROSS(82,VARR1),35,'清仓'),COLORYELLOW;神奇线选股:(CROSS(趋势,判断)AND趋势80),LINETHICK0;波段选股:(BBUY),LINETHICK0;强者恒强DIF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA1:=EMA(DIF1,9);{柱状线}AAA1:=(DIF1-DEA1)*2*60;AAA上:IF(AAA1REF(AAA1,1),AAA1,DRAWNULL),STICK,COLORRED,LINETHICK8;AAA下:IF(AAA1REF(AAA1,1),AAA1,DRAW

1 / 9
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功