個股自適應板塊順勢操作公式源碼[大智慧公式]
相關標簽:大智慧分時指標源碼 、 大智慧ddx指標源碼 、 大智慧bs指標源碼 、 大智慧公式源碼附圖 、 大智慧股票公式源碼 、 大智慧跨周期指標源碼 、 大智慧操盤線指標源碼 、 黑馬指標源碼大智慧版 、 大智慧主圖公式源碼 、 macd背離指標公式源碼 、 多空對比指標公式源碼 、 波動率指標源碼 、 乾坤決策眼指標源碼 、 大智慧指標公式大全 、 大智慧地量指標公式 、
{順勢操作(主圖)}
原理解析:
源碼:
input: n(5,0,999,1),n1(10,0,999,1),n2(20,0,999,1),n3(30,0,999,1);A74:=MA(CLOSE,20);A75:=(CLOSE > MA(CLOSE,5));A76:=(MA(CLOSE,5) > MA(CLOSE,10));A77:=(CLOSE > MA(CLOSE,10));A78:=(MA(CLOSE,5) > MA(CLOSE,20));A79:=(CLOSE > MA(CLOSE,20));A710:=REF(A74,1);A711:=(A74 > A710);AVX:=(((((IF(A75,10,(0 - 10)) + IF(A76,10,(0 - 10))) + IF(A77,10,(0 - 10))) + IF(A78,10,(0 - 10))) + IF(A79,10,(0 - 10))) + IF(A711,10,(0 - 10)));DSLX:=(CLOSE / INDEXC);DSLX1:=MA(DSLX,5);DSLX2:=MA(DSLX,10);V1:=MA(VOL,5);V2:=MA(VOL,10);T := BARSLAST(DISPSTATUS=1)+1;T := BARSLAST(DISPSTATUS=1)+1;HHg := HHV(H, T);ddg := LLV(L, T);{Hk := LL-HH; G12 := LL-HK*1.55; }IF BARSTATUS=2 and c<200 and ((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c<200 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) THENIF BARSTATUS=2 and c>200 and (CROSS(AVX,1) AND (V1 >= V2)) THENIF BARSTATUS=2 and c>200 and (CROSS(AVX,1) AND (V1 >= V2)) THENIF BARSTATUS=2 and c>200 and (CROSS(AVX,1) AND (V1 < V2)) THENIF BARSTATUS=2 and c>200 and (CROSS(AVX,1) AND (V1 < V2)) THENIF BARSTATUS=2 and c>200 and (CROSS(1,AVX) AND (V1 >= V2)) THENIF BARSTATUS=2 and c>200 and (CROSS(1,AVX) AND (V1 < V2)) THENIF BARSTATUS=2 and c>200 and (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) THENIF BARSTATUS=2 and c>200 and (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) THENIF BARSTATUS=2 and c>200 and (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) THENIF BARSTATUS=2 and c>200 and (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) THEN{所屬板塊}var100:='所屬板塊:';if inblock('電力')=1 then var100:=var100+' 電力';if inblock('電腦')=1 then var100:=var100+' 電腦';if inblock('電器')=1 then var100:=var100+' 電器';if inblock('電子信息')=1 then var100:=var100+' 電子信息';if inblock('房地產')=1 then var100:=var100+' 房地產';if inblock('紡織服裝')=1 then var100:=var100+' 紡織服裝';if inblock('鋼鐵')=1 then var100:=var100+' 鋼鐵';if inblock('工程建筑')=1 then var100:=var100+' 工程建筑';if inblock('供水供氣')=1 then var100:=var100+' 供水供氣';if inblock('化工')=1 then var100:=var100+' 化工';if inblock('化纖')=1 then var100:=var100+' 化纖';if inblock('機械')=1 then var100:=var100+' 機械';if inblock('建材')=1 then var100:=var100+' 建材';if inblock('交通工具')=1 then var100:=var100+' 交通工具';if inblock('交通設施')=1 then var100:=var100+' 交通設施';if inblock('教育傳媒')=1 then var100:=var100+' 教育傳媒';if inblock('金融')=1 then var100:=var100+' 金融';if inblock('旅游酒店')=1 then var100:=var100+' 旅游酒店';if inblock('煤炭石油')=1 then var100:=var100+' 煤炭石油';if inblock('釀酒食品')=1 then var100:=var100+' 釀酒食品';if inblock('農林牧漁')=1 then var100:=var100+' 農林牧漁';if inblock('其他行業')=1 then var100:=var100+' 其他行業';if inblock('汽車')=1 then var100:=var100+' 汽車';if inblock('汽配')=1 then var100:=var100+' 汽配';if inblock('商業連鎖')=1 then var100:=var100+' 商業連鎖';if inblock('石化')=1 then var100:=var100+' 石化';if inblock('通信')=1 then var100:=var100+' 通信';if inblock('外貿')=1 then var100:=var100+' 外貿';if inblock('醫藥')=1 then var100:=var100+' 醫藥';if inblock('儀電儀表')=1 then var100:=var100+' 儀電儀表';if inblock('有色金屬')=1 then var100:=var100+' 有色金屬';if inblock('運輸物流')=1 then var100:=var100+' 運輸物流';if inblock('造紙印刷')=1 then var100:=var100+' 造紙印刷';if inblock('安徽')=1 then var100:=var100+' 安徽';if inblock('北京')=1 then var100:=var100+' 北京';if inblock('福建')=1 then var100:=var100+' 福建';if inblock('甘肅')=1 then var100:=var100+' 甘肅';if inblock('廣東')=1 then var100:=var100+' 廣東';if inblock('廣西')=1 then var100:=var100+' 廣西';if inblock('貴州')=1 then var100:=var100+' 貴州';if inblock('海南')=1 then var100:=var100+' 海南';if inblock('河北')=1 then var100:=var100+' 河北';if inblock('河南')=1 then var100:=var100+' 河南';if inblock('黑龍江')=1 then var100:=var100+' 黑龍江';if inblock('湖北')=1 then var100:=var100+' 湖北';if inblock('湖南')=1 then var100:=var100+' 湖南';if inblock('吉林')=1 then var100:=var100+' 吉林';if inblock('江蘇')=1 then var100:=var100+' 江蘇';if inblock('江西')=1 then var100:=var100+' 江西';if inblock('遼寧')=1 then var100:=var100+' 遼寧';if inblock('內蒙古')=1 then var100:=var100+' 內蒙古';if inblock('寧夏')=1 then var100:=var100+' 寧夏';if inblock('青海')=1 then var100:=var100+' 青海';if inblock('山東')=1 then var100:=var100+' 山東';if inblock('山西')=1 then var100:=var100+' 山西';if inblock('陜西')=1 then var100:=var100+' 陜西';if inblock('上海')=1 then var100:=var100+' 上海';if inblock('深圳')=1 then var100:=var100+' 深圳';if inblock('四川')=1 then var100:=var100+' 四川';if inblock('天津')=1 then var100:=var100+' 天津';if inblock('***')=1 then var100:=var100+' ***';if inblock('新疆')=1 then var100:=var100+' 新疆';if inblock('云南')=1 then var100:=var100+' 云南';if inblock('浙江')=1 then var100:=var100+' 浙江';if inblock('重慶')=1 then var100:=var100+' 重慶';if inblock('3G')=1 then var100:=var100+' 3G';if inblock('H股')=1 then var100:=var100+' H股';if inblock('QFII持股')=1 then var100:=var100+' QFII持股';if inblock('ST')=1 then var100:=var100+' ST';if inblock('奧運')=1 then var100:=var100+' 奧運';if inblock('創投')=1 then var100:=var100+' 創投';if inblock('次新股')=1 then var100:=var100+' 次新股';if inblock('大盤')=1 then var100:=var100+' 大盤';if inblock('股權改革')=1 then var100:=var100+' 股權改革';if inblock('股權投資')=1 then var100:=var100+' 股權投資';DD:=FINANCE2(35);SS:=FINANCE2(37);GG:=FINANCE2(3);TH:=DYNAINFO(39);{量能飽和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);{趨勢}AA10:MA(CLOSE,8),color0000FF;AA12:MA(CLOSE,12),color0000FF;BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);FILLRGN(AA10,AA12,(((AA12 <= AA10) AND (BB12 >= 1)) AND (BB10 >= 1))),Color0098FF;FILLRGN(AA10,AA12,(((AA12 >= AA10) AND (BB10 <= 1)) AND (BB10 <= 1))),color00FF00;{45度異動}x1:=(C+L+H)/3;bb13:=atan(ema(x1,13)-ref(ema(x1,13),1))*3.1416*10;ema8:=ema(c,8);{壓力支撐}壓力:MA(REF(HHV(C,30),1),2),Color9D00FF;支撐:MA(REF(LLV(C,30),1),2),ColorABdd46;{老鼠倉}AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;{黑馬線}A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑馬線:=EMA(A51,5);A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趨勢線:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));{頂底背離}LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);{短線}VAR2:=LLV(LOW,27);VAR3:=HHV(HIGH,34);VAR4:=EMA((CLOSE-Var2)/(Var3-Var2)*4,4)*25;注意買:=IF((Var4<10),80,100);RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;超跌:=IF(J<0,10,0);BDDD:=LLV(J,2)=LLV(J,8);買入:=IF(CROSS(J,REF(J+0.01,1)) AND BDDD AND J<20,30,0);MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);買:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);{多頭買入} ENTERLONG:IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0),COLORYELLOW;
公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程】
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容