選股公式問題 [金字塔]
-
咨詢內容:
老師,麻煩把下面的改成選股公式。謝謝
?
//策略名:MACD背離模型
//類型:股票t+0
//適用:后臺程序化
//使用市場:個股DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),COLORSTICK;N:=BARSLAST(CROSS(DIFF,DEA))+1;
N1:=BARSLAST(CROSS(DEA,DIFF))+1;
DIFF1:=REF(REF(DIFF,N-1),1);
DIFF2:=REF(REF(DIFF,N1-1),1);
C1:=REF(REF(C,N-1),1);
C2:=REF(REF(C,N1-1),1);
DBL1:=DIFF > DIFF1 AND CROSS(DIFF,DEA) AND C >C1; //底背離
DBL:=DIFF<DIFF2 AND? CROSS(DEA,DIFF) AND C < C2; //頂背離
TBUY(DBL1 AND TNUMLOSSTRADE < 2,100,MKT);
TSELL(DBL AND TBUYHOLDINGEX('','',2) > 0,100,MKT);
TSELL(EVERY(C <= REF(C,1),5),0,MKT);?
-
金字塔客服:
?你這沒啥好改的啊。只需要去掉后臺交易語句把交易的條件作為選股條件就行了。
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),COLORSTICK;
N:=BARSLAST(CROSS(DIFF,DEA))+1;
N1:=BARSLAST(CROSS(DEA,DIFF))+1;
DIFF1:=REF(REF(DIFF,N-1),1);
DIFF2:=REF(REF(DIFF,N1-1),1);
C1:=REF(REF(C,N-1),1);
C2:=REF(REF(C,N1-1),1);
DBL1:DIFF and? DIFF1 AND CROSS(DIFF,DEA) AND C and C1; //底背離
DBL:DIFF and DIFF2 AND? CROSS(DEA,DIFF) AND C and?? C2; //頂背離
按照交易語句的思路是底背離買入,那你選股時候選擇 DBL1作為選股條件即可。 [此貼子已經被作者于2020/9/1 14:44:29編輯過]
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信號:cxh99cxh99 進行 有償收費 編寫!
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容