同花順多頭建倉主圖公式公式、代碼源碼[同花順公式]
相關標簽:
?
?
原理解析:
源碼:
?
?
?
生命線:MA(CLOSE,26),colorred,LINETHICK2,PRECIS2;
多頭線:EMA(C,1.5),coloryellow,PRECIS2;
空頭線:EMA(C,5),COLOR00FF00,PRECIS2;
均衡線:EMA(空頭線,5),colorwhite,PRECIS2;
VAR1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2:=(100 - MA(((100 * (HHV(HIGH,12) - CLOSE)) / (HHV(HIGH,12) - LLV(LOW,12))),12));
DRAWTEXT(CROSS(VAR1,MA(VAR2,12)),(LOW * 0.94),'↑買 '),color4440FF,ALIGN1;
DRAWTEXT(CROSS(MA(VAR2,12),VAR1),(HIGH * 1.05),'賣 '),colorFFFF34,ALIGN1;
Var3:=EMA(C,5);
Var4:=EMA(C,10);
Var5:=EMA(C,20);
Var6:=EMA(C,30);
Var7:=(Var3+Var4+Var5+Var6)/4;
Var8:=(Var7-REF(Var7,15))/REF(Var7,15)*100;
Var9:=EMA(Var8,8);
STICKLINE(C>=生命線 AND C>=O,C,O,10,0),COLOR0000ff,LAYER1;
STICKLINE(C>=生命線 AND C>=O,C,O,8,0),COLOR0000ff,LAYER1;
STICKLINE(C>=生命線 AND C>=O,C,O,4,0),COLOR0000ff,LAYER1;
STICKLINE(C>=生命線 AND C>=O,H,L,0.5,0),COLOR0000ff,LAYER1;//紅強勢
STICKLINE(Var8<1*REF(Var8,1),O,C,10,0),COLORffff00;
STICKLINE(Var8<1*REF(Var8,1),O,C,8,0),COLORffff00;
STICKLINE(Var8<1*REF(Var8,1),O,C,4,0),COLORffff00;
STICKLINE(Var8<1*REF(Var8,1),H,L,0.5,0),COLORffff00;//藍下跌
STICKLINE(Var8>1*REF(Var8,1),O,C,10,0),COLORc8009f;
STICKLINE(Var8>1*REF(Var8,1),O,C,8,0),COLORc8009f;
STICKLINE(Var8>1*REF(Var8,1),O,C,4,0),COLORc8009f;
STICKLINE(Var8>1*REF(Var8,1),H,L,0.5,0),COLORc8009f;//紫調整
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),O,C,10,0),COLOR00ff00;
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),O,C,8,0),COLOR00ff00;
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),O,C,4,0),COLOR00ff00;
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),H,L,0.5,0),COLOR00ff00;//綠見頂
買進價:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.004;
買進條件:=CROSS(C,買進價) AND 買進價>REF(買進價,1);
STICKLINE(買進條件,O,C,10,0),colorffffff,LAYER1;
STICKLINE(買進條件,O,C,8,0),colorffffff,LAYER1;
STICKLINE(買進條件,O,C,4,0),colorffffff,LAYER1;
STICKLINE(買進條件,H,L,0.5,0),colorffffff,LAYER1;//白買進
加碼價:=((C-REF(MA(C,18),1))/18+MA(C,18))*1.004;
加碼條件:=CROSS(C,加碼價) AND 加碼價>REF(加碼價,1);
STICKLINE(加碼條件,O,C,10,0),color00ffff,LAYER1;
STICKLINE(加碼條件,O,C,8,0),color00ffff,LAYER1;
STICKLINE(加碼條件,O,C,4,0),color00ffff,LAYER1;
STICKLINE(加碼條件,H,L,0.5,0),color00ffff,LAYER1;//黃加倉
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,10,1),COLOR0000ff,LAYER1;
STICKLINE(ZDF>9.8,O,C,8,1),COLOR0000ff,LAYER1;
STICKLINE(ZDF>9.8,O,C,4,1),COLOR0000ff,LAYER1;
STICKLINE(ZDF<-9.8,O,C,10,1),COLOR00ff00,LAYER1;
STICKLINE(ZDF<-9.8,O,C,8,1),COLOR00ff00,LAYER1;
STICKLINE(ZDF<-9.8,O,C,4,1),COLOR00ff00,LAYER1;{來源:www.kzuj.com.cn 程序化交易}
?
公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程】
?
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容