波段操盘主图(选股公式),个股MACD,多周期MACD
多头操盘线(红色,上涨均线)——多头起始线。看到此线翻红时,即可以考虑买股进场,尔后,持股待涨。
空头操盘线(绿色,下跌均线)——空头起始线。看到此线翻绿时,即当从速止盈、止损,尔后,持币观望。
多头操盘线13:MA(CLOSE,13)COLORRED;
空头操盘线:IF(多头操盘线13<REF(多头操盘线13,1),多头操盘线13,DRAWNULL)COLORGREEN,{淡蓝色};
平均成本线:COST(50)DOTLINE,COLORLICYAN;
持仓:IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORRED,{COLOR0099FF};
空仓:IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORGREEN,{COLORDDFF00};
标识:STICKLINE(C/REF(C,1)>1.095,O,C,1.5,0),COLORYELLOW;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORGREEN;
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
标柱1:STICKLINE(MACD>REF(MACD,1) AND MACD>0,0.001,MACD,1,0),COLORRED;
标柱2:STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0.001,MACD,1,0),COLORYELLOW;
标柱3:STICKLINE(MACD<REF(MACD,1) AND MACD<0,-0.001,MACD,1,0),COLORGREEN;
标柱4:STICKLINE(MACD>=REF(MACD,1) AND MACD<0,-0.001,MACD,1,0),COLORLICYAN;
标柱5:=STICKLINE(C>0,0,0,50,1),COLORBLUE;
标柱6:STICKLINE(MACD>0,0.01,-0.001,8,0),COLORRED;
标柱7:STICKLINE(MACD<0,0.01,-0.001,8,0),COLORGREEN;
DIF颜色:=DIF,COLORGREEN;
DEA颜色:=DEA,COLORYELLOW;
强:IF(DIF>MA(DIF,2),DIF,DRAWNULL),COLORRED;
弱:IF(DEA>MA(DEA,2),DEA,DRAWNULL),COLORMAGENTA;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
底背离符号1:DRAWTEXT(底背离,DEA*0.9-0.1,'▲'),COLORMAGENTA;
底背离符号2:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORFF00FF,DOTLINE;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背离符号:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,DOTLINE;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
二次金叉符号:DRAWICON(二次金叉,DEA*0.9,15) ;
多头共振符号:DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,DEA-0.3,'共振'),COLOR0000FF;
{主力进场}
RSV30:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
K30:=SMA(RSV30,5,1);
D30:=SMA(K30,3,1);
J30:=3*K30-2*D30;
趋势线:=EMA(J30,6),COLORYELLOW,LINETHICK1;
散户线:=100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60)),LINETHICK1,COLORGREEN;
RSV21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
K21:=SMA(RSV21,13,8);
主力线:=CEILING(SMA(K21,13,8)),COLORRED,LINETHICK1;
低位预警线:=0,COLORRED;
强弱分界线_虚线:=50,DOTLINE,COLORMAGENTA;
高位预警线:=100,DOTLINE,COLORLICYAN;
VAR1:=IF(YEAR>=2038 AND MONTH>=1,0,1);
VAR2:=REF(LOW,1)*VAR1;
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100*VAR1;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3)*VAR1;
VAR5:=LLV(LOW,30)*VAR1;
VAR6:=HHV(VAR4,30)*VAR1;
VAR7:=IF(MA(CLOSE,58),1,0)*VAR1;
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7*VAR1;
吸筹:=IF(VAR8>100,100,VAR8)*VAR1,COLORRED;
庄家吸筹:=STICKLINE(吸筹>-150,0,吸筹,2,-1),COLORRED;
庄:=EMA(吸筹,1)NODRAW;
庄影:=CROSS(REF(庄,4),REF(庄,0));
庄影动态:=DRAWTEXT(庄影,0,'●')COLORMAGENTA;
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);
标识01:=DRAWICON(CROSS(85,RSI),85,2),COLORGREEN;
标识02:DRAWICON(CROSS(REF(主力线,0),REF(强弱分界线_虚线,1)),-0.1,1);
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
二峰缩头是顶:=(EMA(CS,26)-50)*0.03,COLORRED,NODRAW;
二谷缩脚是底:=(EMA(CS,26)-50)*0.03,COLORGREEN,NODRAW;
中轴:=0,COLORLICYAN;
顶卖底买:=二峰缩头是顶,COLORSTICK;
D1:=1;
AA1:=DRAWGBK(' MACD八字诀:“买小、卖小;缩头缩脚。”','.','.','.','.','.');
AA1图标:=DRAWTEXT_FIX(D1=1,0,0.2000.18,0,AA1),COLORRED;
D2:=1;
AA2:=DRAWGBK(' 买,要买在变小了的“阴线能量柱柱堆”之“缩脚”处。','.','.','.','.','.');
AA2图标:=DRAWTEXT_FIX(D2=1,0,0.6000.18,0,AA2),COLORLIBLUE;
D3:=1;
AA3:=DRAWGBK(' 卖,要卖在变小了的“阳线能量柱柱堆”之“缩头”处。','.','.','.','.','.');
AA3图标:=DRAWTEXT_FIX(D3=1,0,0.4000.18,0,AA3),COLORYELLOW;
D4:=1;
AA4:=DRAWGBK(' 该指标请使用周K线看盘。如此,胜算率较高。','.','.','.','.','.');
AA4图标:=DRAWTEXT_FIX(D4=1,0,0.800.18,0,AA4),COLORWHITE;
{多周期MACD}
背景色:DRAWGBK(C>0, RGB(0,0,0),RGB(0,0,10'该数值可以调整'),0,0,0);{浅色背景};
{周线MACD}
DIF周:(EMA(CLOSE,30)-EMA(CLOSE,90))*0.55,NODRAW,COLOR00FFFF;
DEA周:(EMA(DIF周,26))NODRAW,COLORGREEN;
MACD周:=(DIF周-DEA周)*2, COLORSTICK;
周线MACD走势:DRAWBAND(DEA周,RGB(135,255,35),DIF周,RGB(240,160,0));
周线MACD:DRAWTEXT(CURRBARSCOUNT=1,DIF周,'--周MACD'),COLORRED;
{日线MACD}
DIF日:EMA(CLOSE,12)-EMA(CLOSE,26)NODRAW,COLORRED;
DEA日:EMA(DIF日,9)NODRAW,COLORLIBLUE;
日线MACD走势:DRAWBAND(DIF日,RGB(255,80,120),DEA日,RGB(21,138,255));
日线MACD:DRAWTEXT(CURRBARSCOUNT=1,DIF日,'--日MACD'),COLOR00FFFF;
{60分钟MACD}
DIF60:EMA(CLOSE,12/2)-EMA(CLOSE,26/2)NODRAW,COLORMAGENTA;
DEA60:EMA(DIF60,9/2)NODRAW,COLORGREEN;
MACD60分钟走势:DRAWBAND(DIF60,RGB(120,20,255),DEA60,RGB(80,255,20));
MACD60分钟:DRAWTEXT(CURRBARSCOUNT=1,DIF60,'--60分钟MACD'),COLORFF00FF;
{30分钟MACD}
DIF30:(EMA(CLOSE,12/4)-EMA(CLOSE,26/4))NODRAW,COLORRED;
DEA30:(EMA(DIF30,9/4))NODRAW,COLORGREEN;
MACD30分钟走势:DRAWBAND(DIF30,RGB(220,50,50),DEA30,RGB(50,120,50));
MACD30分钟:DRAWTEXT(CURRBARSCOUNT=1,DIF30,'--30分钟MACD'),COLORGREEN;
{日MACD柱}
零轴:0,COLOR555555;
MACD:(DIF日-DEA日)*2,COLORRED,COLORSTICK; {COLORSTICK}
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORRED,;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,1),COLOR4080FF,;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORYELLOW,;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORLIGREEN,;
选股公式
平均成本线:=COST(50);
操盘线13:=MA(C,13);
平均成本:=COST(50);
操盘线:=LONGCROSS(CLOSE,操盘线13,5)AND CLOSE>=(平均成本);
RSV30:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
K30:=SMA(RSV30,5,1);
D30:=SMA(K30,3,1);
J30:=3*K30-2*D30;
RSV21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
K21:=SMA(RSV21,13,8);
主力线:=CEILING(SMA(K21,13,8));
趋势线:=EMA(J30,6);
趋势线金叉:=CROSS(REF(趋势线,0),REF(趋势线,1));
强弱分界线:=50;
XG:操盘线 AND C>=(平均成本线)AND 趋势线金叉;