短線主圖指標(biāo) 公式 源碼[其他軟件公式]
指標(biāo)公式代碼分享及使用參考說(shuō)明:
根據(jù)給定的指標(biāo)公式,我們可以對(duì)該指標(biāo)進(jìn)行如下分析和總結(jié):
1. GAO表示高位移動(dòng)平均線,DI表示低位移動(dòng)平均線,MAR2表示60周期的收盤價(jià)移動(dòng)平均線。當(dāng)GAO上穿DI且(GAO+DI)/2超過(guò)前一周期時(shí),將填充區(qū)域顏色設(shè)置為淺紅色;當(dāng)GAO下穿DI且DI跌破前一周期時(shí),將填充區(qū)域顏色設(shè)置為紅色。
2. 多空區(qū)間指標(biāo)是根據(jù)最低價(jià)與最高價(jià)之間的波動(dòng)幅度計(jì)算得出的。當(dāng)多空區(qū)間指標(biāo)在前兩個(gè)周期內(nèi)上升并且當(dāng)前周期小于三個(gè)周期的均值時(shí),認(rèn)為是多頭行情;當(dāng)多空區(qū)間指標(biāo)在前兩個(gè)周期內(nèi)下降并且當(dāng)前周期大于三個(gè)周期的均值時(shí),認(rèn)為是空頭行情。
基于以上分析,可以給出以下操作建議:
- 當(dāng)高位移動(dòng)平均線上穿低位移動(dòng)平均線,并且(GAO+DI)/2超過(guò)前一周期,可以考慮做多。
- 當(dāng)高位移動(dòng)平均線下穿低位移動(dòng)平均線,并且DI跌破前一周期,可以考慮做空。
- 在多頭行情中,可以考慮在多空區(qū)間指標(biāo)上升的時(shí)候做多;在空頭行情中,可以考慮在多空區(qū)間指標(biāo)下降的時(shí)候做空。
- 可以關(guān)注多空區(qū)間指標(biāo)與收盤價(jià)的交叉點(diǎn),當(dāng)多空區(qū)間指標(biāo)上穿收盤價(jià)時(shí),可以考慮做多;當(dāng)多空區(qū)間指標(biāo)下穿收盤價(jià)時(shí),可以考慮做空。
- RSI指標(biāo)可以用來(lái)判斷超買和超賣情況,當(dāng)RSI高于83時(shí),表示超買;當(dāng)RSI低于20時(shí),表示超賣。
需要注意的是,以上建議僅供參考,投資決策還需要綜合考慮其他因素,并根據(jù)市場(chǎng)實(shí)際情況進(jìn)行判斷。
?
?
源碼:
input:P1(20,0,300),P2(65,0,300),P3(98,0,300),A1(2,0,100),A2(3,0,100),A3(4,0,100),A4(5,0,100),B1(5,0,100),B2(6,0,100),B3(7,0,100),B4(8,0,100);
GAO:MA(HIGH,12),LINETHICK2,color111111;
DI:MA(LOW,12),LINETHICK2,color111111;
MAR2:MA(CLOSE,60),LINETHICK5,color6600;
PARTLINE(CLOSE>MAR2,MAR2),POINTDOT,LINETHICK5,color6600CC;
FILLRGN(GAO>REF(GAO,1) AND (GAO+DI)/2>REF((GAO+DI)/2,1),GAO,DI),color6600CC;
FILLRGN(GAO<REF(GAO,1) AND DI<REF(DI,1),GAO,DI),color6600;
多空區(qū)間:IF(REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),2)>REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),2) AND REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),1)>REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),1) AND SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1)<SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),HIGH,IF(REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),2)<REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),2) AND REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),1)<REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),1) AND SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1)>SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),LOW,IF((BARSLAST(REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),2)>REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),2) AND REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),1)>REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),1) AND SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1)<SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1)))<(BARSLAST(REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),2)<REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),2) AND REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),1)<REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),1) AND SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1)>SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1))),REF(HIGH,BARSLAST(REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),2)>REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),2) AND REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),1)>REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),1) AND SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1)<SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1))),REF(LOW,BARSLAST(REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),2)<REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),2) AND REF(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),1)<REF(SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1),1) AND SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1)>SMA(SMA((CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100,5,1),3,1)))))),LINETHICK2,color111111;
PARTLINE(多空區(qū)間<=CLOSE,多空區(qū)間),LINETHICK2,colorFF;
PARTLINE(多空區(qū)間>CLOSE,多空區(qū)間),LINETHICK2,color339900;
關(guān)鍵點(diǎn):=多空區(qū)間;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,LOW,0,0),colorFFFF33;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,8,0),colorAA;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,7,0),color11AA;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,6,0),colorBB;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,5,0),colorCC;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,4,0),color11DD;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,3,0),color22EE;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,2,0),color33FF;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,CLOSE,1,0),color33FF;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),HIGH,CLOSE,1,0),color11FF;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),HIGH,CLOSE,0,0),colorFFFF;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,LOW,1,0),color11FF;
STICKLINE(CLOSE>關(guān)鍵點(diǎn),OPEN,LOW,0,0),colorFFFF;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,8,0),color8800;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,7,0),color9900;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,6,0),colorAA11;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,5,0),colorBB11;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,4,0),colorCC22;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,3,0),colorDD22;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,2,0),colorEE33;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,CLOSE,1,0),colorFF33;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),HIGH,CLOSE,1,0),colorFF0000;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),HIGH,CLOSE,0,0),colorFFFF33;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,LOW,1,0),colorFF0000;
STICKLINE(CLOSE<=關(guān)鍵點(diǎn),OPEN,LOW,0,0),colorFFFF33;
AA:=REF(HIGH,5)=HHV(HIGH,2*5+1);
BB:=BACKSET(AA,5+1);
CC:=FILTER(BB,5) AND HIGH=HHV(HIGH,5+1);
DRAWICON(CC AND ISLASTBAR=1,HIGH*1.01,10);
AA2:=REF(LOW,5)=LLV(LOW,2*5+1);
BB2:=BACKSET(AA2,5+1);
CC2:=FILTER(BB2,5) AND LOW=LLV(LOW,5+1);
DRAWICON(CC2 AND ISLASTBAR=1,LOW*0.998,11);
GG:=ISLASTBAR=1 AND REF(CC,BARSLAST(CC));
HH:=BACKSET(GG,BARSLAST(CC)+1);
II:=HH>REF(HH,1);
JJ:=REF(BARSLAST(CC),1);
KK:=BACKSET(II,JJ+2);
LL:=KK>REF(KK,1);
DRAWLINE(LL,HIGH,II,HIGH,1),LINETHICK1,color6600CC;
GG2:=ISLASTBAR=1 AND REF(CC2,BARSLAST(CC2));
HH2:=BACKSET(GG2,BARSLAST(CC2)+1);
II2:=HH2>REF(HH2,1);
JJ2:=REF(BARSLAST(CC2),1);
KK2:=BACKSET(II2,JJ2+2);
LL2:=KK2>REF(KK2,1);
DRAWLINE(LL2,LOW,II2,LOW,1),LINETHICK1,color6600;
DRAWICON(CROSS(CLOSE,多空區(qū)間+10),LOW*0.999,1);
DRAWICON(CROSS(多空區(qū)間-10,CLOSE),HIGH*1.0015,2);
開(kāi)盤:DYNAINFO(4),LINETHICK1,color99FF;
YY:(MA(CLOSE,A1)+MA(CLOSE,A2)+MA(CLOSE,A3)+MA(CLOSE,A4))/4,colorFF00;
VV:(MA(CLOSE,B1)+MA(CLOSE,B2)+MA(CLOSE,B3)+MA(CLOSE,B4))/4,LINETHICK2,colorFF00;
WW:=(MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16)+MA(CLOSE,32))/4;
PARTLINE(YY>REF(YY,1),YY),color11FF;
PARTLINE(VV>REF(VV,1),VV),LINETHICK2,color11FF;
MA1:=MA(CLOSE,P1);
MA2:=MA(CLOSE,P2);
MA3:=MA(CLOSE,P3);
A:=SMA(SMA((CLOSE-LLV(LOW,243))/(HHV(HIGH,243)-LLV(LOW,243))*100,7,1),5,1);
B:=SMA((CLOSE-LLV(LOW,243))/(HHV(HIGH,243)-LLV(LOW,243))*100,7,1)*16.18-A*12;
D:=CROSS(B,A);
LC:=REF(CLOSE,1);
RSI:=(SMA(MAX(CLOSE-LC,0),6,1))/(SMA(ABS(CLOSE-LC),6,1))*100;
E:=CROSS(83,RSI);
{程序化交易 www.kzuj.com.cn }
?
公式導(dǎo)入教程: 【通達(dá)信公式源碼導(dǎo)入方法教程】 【同花順公式源碼導(dǎo)入方法教程】 【大智慧新一代公式源碼導(dǎo)入方法教程】
?
有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 或微信:cxhjy888 進(jìn)行 有償收費(fèi) 編寫!(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無(wú)法通過(guò)。謝謝您!)
(怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊查閱!)
(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無(wú)法通過(guò)。謝謝您!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容