个人优化的红买蓝卖指标主图公式
个人将之作为常设主图,结合别的附图指标,感觉还是有一定指导作用,就是有大部分指标的通病,卖点出的有点延迟,但波段获利还是不错的,用法很简单和布林线类似,但有买卖点波段提示:1、中间波段指导线相当于布林中轨,红买绿卖 2、支撑压力,相当于布林上下轨,特别是当支撑线走平,出买点,红线向上时,是个相对安全的买点,无法冲过压力线压制,压力线走平,注意回调可能 3、上升下降通道中的反弹或者持股待涨,具体操作看个人的理解,结合macd,kdj等比较好用 由于权限不够,没法发附件和图片,喜欢的朋友可自行复制源码到通达信建立指标
源码:
JRH:=HHV(C,2);
JRL:=LLV(C,2);
YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
VAR1:=(CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2));
VAR2:=(REF(VAR1,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR3:=(REF(VAR2,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR4:=(REF(VAR3,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR5:=(REF(VAR4,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR6:=(REF(VAR5,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR7:=(REF(VAR6,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR8:=(REF(VAR7,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR9:=(REF(VAR8,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VARA:=(REF(VAR9,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VARB:=(REF(VARA,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VARC:=(REF(VARB,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VARD:=(CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2));
VARE:=(REF(VARD,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VARF:=(REF(VARE,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR10:=(REF(VARF,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR11:=(REF(VAR10,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR12:=(REF(VAR11,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR13:=(REF(VAR12,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR14:=(REF(VAR13,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR15:=(REF(VAR14,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR16:=(REF(VAR15,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR17:=(REF(VAR16,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR18:=(REF(VAR17,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
VAR19:=((REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1)) AND VAR1);
VAR1A1:=((REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1)) AND VARD);
红色持股:VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;
离场:=IF(红色持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:REF(离场,1)COLOR0000FF,NODRAW;
青色观望:VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,COLORFFFF00,NODRAW;
进:=IF(青色观望,JRH,DRAWNULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:REF(明进场价,1),COLORFF0000,NODRAW;
短买:VAR19,COLOR33AACC,NODRAW;
品红离场:VAR1A1,COLORFF99FF,NODRAW;
急速超跌:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100 -14,COLORFFFFFF,NODRAW;
STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,60,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,60,1),COLOR00FF00;
A:=AMOUNT/V/100;
VARAA:=EMA((((A-EMA(A,13))/EMA(A,13))*(0-100)),5);
操盘线:=EMA(((VARAA/10)+EMA(A,10)),3);
行情线:=EMA(A,3);
重心:=(C+0.618*REF(C,1)+0.382*REF(C,2)+0.236*REF(C,3)+0.146*REF(C,4))/2.382;
趋势线:EMA(((SLOPE(C,22)*20)+C),55),COLORYELLOW,LINETHICK2;
红升:IF(重心 =趋势线,趋势线,DRAWNULL),COLORRED,LINETHICK2;
蓝降:IF(重心 趋势线,趋势线,DRAWNULL),COLORBLUE,LINETHICK2;
STICKLINE(行情线 操盘线,H,L,0,1),COLORGREEN;
STICKLINE(行情线 操盘线,C,O,2,1),COLORGREEN;
STICKLINE(行情线 =操盘线,H,L,0,1),COLORRED;
STICKLINE(行情线 =操盘线,C,O,2,1),COLORRED;
{压力支撑线}
压力:MA(REF(HHV(C,30),1),2),COLORWHITE;
支撑:MA(REF(LLV(C,30),1),2),COLORGRAY;
JH:=SMA(MAX(C-REF(C,1),0),5,1)/SMA(ABS(C-REF(C,1)),5,1)*100;
DRAWICON(CROSS(行情线,操盘线),(LOW - (LOW*0.02)),7);
DRAWICON(CROSS(84,JH),(HIGH+(HIGH*0.02)),8);