标签:
股票公式交流分类:
指标公式指标解读
1.波段买卖指标解读
源码:
获利了结:EMA(EMA(EMA(HIGH,5),5),5)*1.15,COLORFFFFFF,LINETHICK1;
风险: EMA(EMA(EMA(HIGH,5),5),5)*1.1,COLORYELLOW;
回档: EMA(EMA(EMA(HIGH,5),5),5)*1.05,COLOR00FF00;
平衡: EMA(EMA(EMA(HIGH,5),5),5),COLORFF00FF,LINETHICK1;
反弹: EMA(EMA(EMA(HIGH,5),5),5)*0.95,COLORGRAY,LINETHICK1;
超跌: EMA(EMA(EMA(HIGH,5),5),5)*0.9,COLORBLUE,LINETHICK1;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
{利多方舟}
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3;
解读:这个指标的未来是弄不去了。粗略看了一下,他使用未来数据ZLG描述了一系列形态。如果不使用ZLG函数,怕描述不出来这种形态特点。
前六句的核心语句是:平衡: EMA(EMA(EMA(HIGH,5),5),5),COLORFF00FF,LINETHICK1;
它是一个基本线,用最高价格的5日指数移动平均做了一个三嵌套循环。这么一循环均线就平滑了,因为他实际上已经不是平均了5日的价格了。而是间接的平均了15天的价格。作者认为,或者在实际统计中,认为这条均线在一定程度上代表了股票价格运行的基准线。当然了这肯定是主观认定。基准线的意思就是价格围绕他上下波动。所以这部分是一个通道类交易思想的指标,同类还有布林呀,以及东方不败呀,薛斯通道呀等等。
其他五句中有四句是给通道画了一个振幅宽带。认为大多数情况下价格会在此振幅宽内行进。另外一句
获利了结:EMA(EMA(EMA(HIGH,5),5),5)*1.15,COLORFFFFFF,LINETHICK1;
是作者认为在通道宽带顶端设的警示线,认为大多数时候价格不会过此线,过此警戒线位,就有见顶危险,所以用了一个获利了结的语句名来命名了。实际当中,强票往往会突破这个警戒线。这个警戒线距离基准线15%的距离,假设在基准线上持股,到达警戒线获利基本就是15%。但这是短线的,因为如果是中期上涨,一般不会碰触警戒线,会形成慢坡通道。价格在基准线附近盘绕,但基准线不断抬升,这样多是中期小牛股。只有短线喷发才有可能碰触此线。作者可能考虑这点,认为应该获利了结了。
VAR3--VAR6是特别常用的语句类型:这类型的语句都是一个中心思想,就是描述一个周期内的振幅箱体宽,然后把现在价格在这个振幅箱体宽中位置比例关系进行描述,通过信号系统进行表达。来判断未来预期的。不同的地方是周期参数不同。取多少天的都有。
昨天谈到VAR3--VAR6箱体振幅宽语句,今天接着叙。
VAR3给出了一个240日最高价格最高值到0值的箱体。
VAR4给出了现在价格到这个箱体顶端的距离与箱体高的比例关系值。
VAR5VAR6给出了现在价格在一个528天-530天的箱体中的位置比例关系值。
但语句到这里就结束了,后面一直没有用到,是后面的语句被删除了,还是这个指
标本身就是多指标优化的一个结果,优化的过程中没有删除干净?不得而知了。反
正到这里这些语句就都没用了。
从VAR3--VAR9在这里都是无用语句。
VAR10我已经讲过他的大概意思是:
AR10赋值:如果收盘价16%之字转向的前1个波谷位置=0ANDHIGH>最低价+0.04,返回4,
否则返回0
{通俗理解应该是这个意思:如果收盘价格16%的之字转向的前一个波谷位置到现在
的天数是0天,并且最高价格比最低价格至少高4分钱,就把4这个值给VAR10,否则
就把不成立信号给VAR10}{16%的之字转向的前一个波谷位置到现在的天数为0,那就
是现在就是这个位置。在超过了16%的幅度的下跌中,应该是一个阶段低点转折的位
置。最高价格比最低价格高4分钱以上,这应该是描述日振幅宽的,不能是跌停的意
思吧。就是下跌了很多,现在该转折了,但不是在一字跌停板的状态下下跌}
VAR11--VAR18:用ZLG转向语句描述了一系列波的形态,分成正反两种描述,正态的
后面给出的是买如选择,负态的后面给出的是卖出选择。
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND
REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
这句描述的有一个按收盘价格计算6%转向波的谷底价格,这个价格是前轮下跌中的
最低位置,因为她比前天的转向数据小,同时又比今天的转向数据小,说明这是一
个V形角的底部描写。这里今天的转向波数据是ZIG(3,6)。昨天的是REF(ZIG
(3,6),1),前天的是REF(ZIG(3,6),2),大前天的是REF(ZIG(3,6),3)。描述了一个
完整的V形转向角形态。下面的7句话就是参数变化了,并且有4句是使用相反的形态
描述就是描述了4个参数类型的顶部△转角波形态。通过这八句话描述了4个参数级
别的转向波顶底形态位置,为后面的买卖给出点位条件。
从语句使用的角度来看,这里确实使用了未来函数。但在实际交易中也确实可以使用,参考其他条件,还是不错的分析股票方法呢,怕在也没有其他函数能这样形象的描述形态了。--这里之所以说是未来函数,就是说,他发出信号的时候因为给定参数内的转向幅度还可能没有达到,一旦中途价格反转,没有达到幅度的转向信号就会消失。也就是说给出信号的买卖点,一旦遇到中途没有达到给定参数幅度的转向距离时,当初给定的买卖信号全部消失。
B和S是两个逻辑条件语句买点卖点。是要求把符合条件的输出给定信号的。这里给定的信号标准是一个变量组,但在画面上为什么不显示连续线段呢?这是因为给定条件限制的。前面的买卖给定条件仔细看就会发现,都是一个一个点,如果不是因为用了转向语句,怕就要使用过滤语句过滤了,然后使用图标语句标注了。
最后{利多方舟}给定的语句同前面给定的VAR3--VAR9语句性质是相同的,只不过形式和参数有所不同了。
也许是这个原因,前面的语句作者就没有理会了。
全部解释基本如此,最后我在来一个总结。
这个指标我分析,是综合了几个指标的特点编辑的,应该属于多指标优化的一个类型。
她的第一部分优化进来了通道理念。第二部分优化进来的是波浪理念,把转向波分析放在一个重要位置。第三部分使用的是箱体比例关系理念。
同一指标使用三种交易中常见的理念进行综合分析。
{通道分析}
基线:=EMA(EMA(EMA(HIGH,5),5),5);
平衡:基线,COLORFF00FF,LINETHICK1;
风险:基线*1.1,COLORYELLOW;
回档:基线*1.05,COLOR00FF00;反弹:基线*0.95,COLORGRAY,LINETHICK1;
超跌:基线*0.9,COLORBLUE,LINETHICK1;
获利了结:基线*1.15,COLORFFFFFF,LINETHICK1;
{ZLG三角转向分析}
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
买1:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
{利多方舟箱体分析}
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3;
附录:转向指标部分取用操盘手线指标。
趋势线:MA(CLOSE,5),COLORWHITE;
M10:MA(CLOSE,10),COLORYELLOW;
M20:MA(CLOSE,20),COLORRED;
M60:MA(CLOSE,60),COLORBLUE;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)
*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)
*100;
VARA:=BARSCOUNT(CLOSE);
VARB:=VAR8<20 AND VAR9<23 AND VARA>35;
VARC:=VARB AND COUNT(VARB,1)=1;
VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);
VARE:=EMA(VARD,5);
VARF:=TROUGHBARS(3,6,1)<4 AND CROSS(VARD,VARE);
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2)
AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2)
AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2)
AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2)
AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR1A:=EMA(VAR19,100);
VAR1B:=2*(VAR19-VAR1A);
VAR1C:=POW(VAR1B,3)*0.10+POW(VAR1B,1);
VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR1E:=EMA(VAR1D*0.97,3);
VAR1F:=(HIGH+LOW+CLOSE)/3;
VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));
VAR21:=CROSS(VAR1E,LOW);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
{VAR22:=买1 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND
VAR6=0 AND VAR20<(-110);}
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3A:=MA(CLOSE,30);
VAR4A:=MA(CLOSE,60);
VAR5A:=EMA(COST(85),7);
VAR6A:=EMA(COST(15),7);
VAR7A:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4);
VAR8A:=INTPART(VAR7*100)/100;VAR9A:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7);
VARA1:=INTPART(VAR9*100)/100;
VARB1:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);
VARC1:=INTPART(VARB*100)/100;
VARD1:=EMA(CLOSE,5)-EMA(CLOSE,10);
VARE1:=EMA(VARD,9);
VARF1:=(-100)*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5))+100;
VAR10A:=(-100)*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10))+100;
VAR11A:=(-100)*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20))+100;
VAR12A:=(-100)*(HHV(CLOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30))+100;
VAR13A:=REF(VARE,1);
VAR14A:=VARE;
VAR15A:=VAR14-VAR13;
VAR16A:=REF(VARD,1);
VAR17A:=VARD;
VAR18A:=VAR17-VAR16;
VAR19A:=OPEN;VAR1AA:=CLOSE;
买3:=IF(VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC AND VAR15>0 AND VAR18>0,0.50,0);
DRAWICON(买3>0,LOW-0.01,4);
买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
B1买:IF(买1>0 OR 买2>0,LOW-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORLIRED;
B2买:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORLIRED;
S1卖:IF(卖1>0,HIGH+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S2卖:IF(CROSS(卖线,买线),H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
2.操盘手指标解读
{操盘手线解释}
输出主图自动划趋势线公式:收盘价的5日简单移动平均,画白色
输出M10:收盘价的10日简单移动平均,画黄色
输出M20:收盘价的20日简单移动平均,画红色
输出M60:收盘价的60日简单移动平均,画蓝色
{上面为画出四条均线的语句,四条均线设定不同的颜色}
VAR3赋值:240日内最高价的最低值
{给定基本材料,下面要用到的条件}
VAR4赋值:100*(收盘价-VAR3)/VAR3
VAR5赋值:(收盘价-528日内最低价的最低值)/(528日内最高价的最高值-528日内最低价的最低值)*100
VAR6赋值:(收盘价-530日内收盘价的最低值)/(530日内收盘价的最高值-530日内收盘价的最低值)*100
{上面后三句是常用方式。用来定位收盘在在一个给定期限内箱体中的比例位置关系}
VAR7赋值:0
VAR8赋值:收盘价-昨收和0的较大值的34日[1日权重]移动平均/收盘价-昨收的绝对值的7日[1日权重]移动平均*100
VAR9赋值:收盘价-昨收和0的较大值的13日[1日权重]移动平均/收盘价-昨收的绝对值的13日[1日权重]移动平均*100
{取用收盘价比昨天收盘价上涨的收盘价,如果是下跌,就取0值。这样的条件下收盘价格与昨日收盘价格差的34日平均与收盘价与昨日收盘价格差7日的平均值的商的100倍}
VARA赋值:收盘价的有效数据周期数{上市以来的总交易天数}
VARB赋值:VAR8<20 AND VAR9<23 AND VARA>35
{VAR8的商要小于20,VAR9的商要小于23,同时至少是上市35天以上的股票}
VARC赋值:VARB AND 统计1日中满足VARB的天数=1
{满足条件VARB同时满足满足这个条件的天数至少是一天}
VARD赋值:收盘价的21日指数移动平均-收盘价的8日指数移动平均
VARE赋值:VARD的5日指数移动平均
{给定的两个下面要用的条件}
VARF赋值:收盘价6%之字转向的前1个波谷位置<4 AND VARD上穿VARE
{这句是说按收盘价6%之字转向,前面的一个波谷的位置距离今天要小于4天,也就是上一个6%以上的之字转向形波谷距离今天至多不能超过4天。并且前面给定条件的两个均线值还要上穿}
VAR10赋值:如果收盘价16%之字转向的前1个波谷位置=0 AND HIGH>最低价+0.04,返回4,否则返回0
{通俗理解应该是这个意思:如果收盘价格16%的之字转向的前一个波谷位置到现在的天数是0天,就把4这个值给VAR10,否则就把不成立信号给VAR10}
VAR11赋值:收盘价6%的之字转向>昨日收盘价6%的之字转向 AND 昨日收盘价6%的之字转向<=2日前的收盘价6%的之字转向 AND 2日前的收盘价6%的之字转向<=3日前的收盘价6%的之字转向
VAR12赋值:收盘价6%的之字转向=2日前的收盘价6%的之字转向 AND 2日前的收盘价6%的之字转向>=3日前的收盘价6%的之字转向
VAR13赋值:收盘价22%的之字转向>昨日收盘价22%的之字转向 AND 昨日收盘价22%的之字转向<=2日前的收盘价22%的之字转向 AND 2日前的收盘价22%的之字转向<=3日前的收盘价22%的之字转向
VAR14赋值:收盘价22%的之字转向=2日前的收盘价22%的之字转向 AND 2日前的收盘价22%的之字转向>=3日前的收盘价22%的之字转向
VAR15赋值:收盘价51%的之字转向>昨日收盘价51%的之字转向 AND 昨日收盘价51%的之字转向<=2日前的收盘价51%的之字转向 AND 2日前的收盘价51%的之字转向<=3日前的收盘价51%的之字转向
VAR16赋值:收盘价51%的之字转向=2日前的收盘价51%的之字转向 AND 2日前的收盘价51%的之字转向>=3日前的收盘价51%的之字转向
VAR17赋值:收盘价72%的之字转向>昨日收盘价72%的之字转向 AND 昨日收盘价72%的之字转向<=2日前的收盘价72%的之字转向 AND 2日前的收盘价72%的之字转向<=3日前的收盘价72%的之字转向
VAR18赋值:收盘价72%的之字转向=2日前的收盘价72%的之字转向 AND 2日前的收盘价72%的之字转向>=3日前的收盘价72%的之字转向
VAR19赋值:收盘价的2日指数移动平均-收盘价的150日指数移动平均
VAR1A赋值:VAR19的100日指数移动平均
VAR1B赋值:2*(VAR19-VAR1A)
VAR1C赋值:VAR1B的3乘幂*0.10+VAR1B的1乘幂
VAR1D赋值:最低价*最高价*开盘价*收盘价的开方的开方
VAR1E赋值:VAR1D*0.97的3日指数移动平均
VAR1F赋值:(最高价+最低价+收盘价)/3
VAR20赋值:(VAR1F-VAR1F的14日简单移动平均)/(0.015*VAR1F的14日平均绝对偏差)
VAR21赋值:VAR1E上穿最低价
买1赋值:VAR10
买2赋值:(VAR11+VAR13+VAR15+VAR17)
卖1赋值:(VAR12+VAR14+VAR16+VAR18)
VAR22赋值:买1 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110)
{在本指标中是无用语句}
VAR1赋值:收盘价的5日简单移动平均
VAR2赋值:收盘价的10日简单移动平均
VAR3A赋值:收盘价的30日简单移动平均
VAR4A赋值:收盘价的60日简单移动平均
VAR5A赋值:获利盘为85%的成本分布的7日指数移动平均
VAR6A赋值:获利盘为15%的成本分布的7日指数移动平均
VAR7A赋值:收盘价*成交量(手)*100的4日累和/成交量(手)*100的4日累和
VAR8A赋值:VAR7*100的?整数部分/100
VAR9A赋值:收盘价*成交量(手)*100的7日累和/成交量(手)*100的7日累和
VARA1赋值:VAR9*100的?整数部分/100
VARB1赋值:收盘价*成交量(手)*100的28日累和/成交量(手)*100的28日累和
VARC1赋值:VARB*100的?整数部分/100
VARD1赋值:收盘价的5日指数移动平均-收盘价的10日指数移动平均
VARE1赋值:VARD的9日指数移动平均
VARF1赋值:(-100)*(5日内收盘价的最高值-收盘价)/(5日内收盘价的最高值-5日内最低价的最低值)+100
VAR10A赋值:(-100)*(10日内收盘价的最高值-收盘价)/(10日内收盘价的最高值-10日内最低价的最低值)+100
VAR11A赋值:(-100)*(20日内收盘价的最高值-收盘价)/(20日内收盘价的最高值-20日内最低价的最低值)+100
VAR12A赋值:(-100)*(30日内收盘价的最高值-收盘价)/(30日内收盘价的最高值-30日内最低价的最低值)+100
VAR13A赋值:昨日VARE
VAR14A赋值:VARE
VAR15A赋值:VAR14-VAR13
VAR16A赋值:昨日VARD
VAR17A赋值:VARD
VAR18A赋值:VAR17-VAR16
VAR19A赋值:开盘价
VAR1AA赋值:收盘价
买3赋值:如果VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC AND VAR15>0 AND VAR18>0,返回0.50,否则返回0
当满足条件买3>0时,在最低价-0.01位置画4号图标
买线赋值:收盘价的2日指数移动平均
卖线赋值:收盘价的21日线性回归斜率*20+收盘价的42日指数移动平均
输出 B1买:如果买1>0 OR 买2>0,返回最低价-0.02,否则返回无效数,CROSSDOT,LINETHICK3,画淡红色
输出B2买:如果买线上穿卖线,返回最低价-0.02,否则返回无效数,CROSSDOT,LINETHICK3,画淡红色
输出S1卖:如果卖1>0,返回最高价+0.02,否则返回无效数,CROSSDOT,LINETHICK3,画黄色
输出 S2卖:如果卖线上穿买线,返回最高价+0.02,否则返回无效数,CROSSDOT,LINETHICK3,画绿色
3.买卖点指标解释:(疑难函数指标)
买卖点指标
N1:=7;
LC:=REF(CLOSE,1);
X:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORYELLOW,LINETHICK1;
魔鬼:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1),COLOR00FF00;
魔王:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X),COLOR00FF00;
TJ0:=X=魔王;
TJ1:=X=魔鬼;
TJ2:=X
TJ3:=X>REF(1,X);
JRS1:=DRAWICON(TJ1 AND TJ2,X,1);
JRS2:=DRAWICON(TJ0 AND TJ3,X,2);
DRAWICON(FILTER(JRS1>0,1),L*0.97,1);
DRAWICON(FILTER(JRS2>0,1),H*1.02,2);
N1赋值:7
LC赋值:昨收
X赋值:收盘价-LC和0的较大值的N1日[1日权重]移动平均/收盘价-LC的绝对值的N1日[1日权重]移动平均*100,画黄色,LINETHICK1
输出魔鬼:当满足条件X>=N1日内X的最高值时,在X位置画直线起点,当满足条件X<=N1日内X的最低值时,在X位置画直线终点,1表示是否延长.,COLOR00FF00
魔王赋值:当满足条件X>=N1日内X的最高值时,在X位置画直线起点,当满足条件X<=N1日内X的最低值时,在1位置画直线终点,X表示是否延长.,COLOR00FF00
TJ0赋值:X=魔王
TJ1赋值:X=魔鬼
TJ2赋值:X<昨日X
TJ3赋值:X>X日前的1
JRS1赋值:当满足条件TJ1ANDTJ2时,在X位置画1号图标
JRS2赋值:当满足条件TJ0ANDTJ3时,在X位置画2号图标
当满足条件JRS1>0时,在最低价*0.97位置画1号图标
当满足条件JRS2>0时,在最高价*1.02位置画2号图标
{买卖点指标}
N1:=7;{设参数}
LC:=REF(CLOSE,1);{昨天的收盘价格}
TS:CLOSE-LC,NODRAW;{收盘价格与昨天收盘价格差}
TD1:MAX(TS,0),NODRAW;
{TS和0比较,取其中较大的数值。变相过滤掉负数值,为下面的X语句做铺垫}
TD2:ABS(TS),NODRAW;
{求TS的绝对值,这句也是为后面的核心语句X做铺垫的}
{冷丁看这两句另人迷惑不解。前一个是求TS和0之间的较大值,只要TS为正,那就提出TS;后一个是求TS的绝对值。按道理说,在TD1中TS为正值时,应该与TD2中的TS相等}
TDS1:SMA(TD1,N1,1),NODRAW;
TDS2:SMA(TD2,N1,1),NODRAW;
{这四句挺有意思的呢。前一个是求TS和0之间的较大值,只要TS为正,那就提出TS;后一个是求TS的绝对值。按道理说,在TD1中TS为正值时,应该与TD2中的TS相等,但相等的TD1和TD2在TDS1和TDS2中却得出不同的结果!为什么呢???
是因为SMA这个函数计算方法的原因呀!
SMA(X,N,M):X的N日移动平均,M为权重,如Y=(X*M+Y'*(N-M))/N,这里的Y'是以前连续的SMA值,MAX(TS,0)中因为有负数的时候,这时的Y'是不计入计算的,所以他的TS值不是连续的,要过滤掉很多小于0值时的TS值,所以他的Y'就小的很多,这样才有前后句子中的差别}
X:TDS1/TDS2*100,COLORYELLOW,LINETHICK1;
{上面的所有铺垫都是为了这个核心语句的。所以这句话的意思就变成了,用上涨时期的SMA值与总SMA值的百分比做一条曲线,这条曲线就是X}
魔鬼:DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1),COLOR00FF00;
{如果X的值比N1天内最高的X值大或相等,那么就在这个X值处做起点,这里就涉及到信号漂移问题了,因为这个做起点处的X值有很多个,(这个可参考我给出的图表,看其中的白钻石标记)但DRAWLINE函数画线有个特色,就是只画出最后一个符合条件的线段,这样在实际看盘中就会发现这根延伸线不断的变化只有到最后一个符合条件的X值给出后,才确定在不漂移了。下半句是说如果X的值比N1天内最低的X值小或相等,那么就在这个X值处做终点。画出延伸线。意思跟前半句一样,也是不断漂移,直到最后一个条件给定的X值处才停止飘动。可参考给定图表中的绿色线段}
魔王:DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X),COLOR00FF00;
{这句很奇特,其实看明白了没有什么,就是DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,1),COLOR0000FF;的意思,这里我把线变成红色,便于图表中显示。DRAWLINE函数中大于1的数都认为是1,所以这里的X=1。其实跟上一个句子一样,只是后半句的意思是如果符合条件,就以1{指标中写的是X}做终点画延伸线}{可以说DRAWLINE函数具有未来函数的表现性质,在特定条件下可以表现出来。未来函数的判定,同一时间坐标下可以画出两条或两条以上的曲线。DRAWLINE函数在这里画出了两条以上的曲线}
TJ0:=X=魔王;{X等于最后一个N1日内最高的X值}
TJ1:=X=魔鬼;{X等于最后一个N1日内最高的X值}
{以上两句语意相同,所以在画面上就总显示红绿两线始终有一个起点}
TJ2:=X
TJ3:=X>REF(1,X);{大于昨天的}
JRS1:DRAWICON(TJ1 AND TJ2,X,1);
{符合条件在X的位置给个红箭头,因TJ1的原因,所以不用过滤也只有一个箭头,X等于魔鬼线就那一个时候}
JRS2:DRAWICON(TJ0 AND TJ3,X,2);
{符合条件在X的位置给个绿箭头,跟上面意思一样}
{实际表达中这两句做中间语句了,并没有做图面显示}
DRAWICON(FILTER(JRS1>0,1),L*0.97,1);
DRAWICON(FILTER(JRS2>0,1),H*1.02,2);
{不知道作者如何思考的,这两句根据前面的意思,根本不用过滤语句,也一样表达,比如改成下面的表达式。但作者在这里使用了过滤语句}
改成:
DRAWICON(TJ1 AND TJ2,L*0.97,1);
DRAWICON(TJ0 AND TJ3,H*1.02,2);
所以全篇也可以这样表达:
N1:=7;
LC:=REF(CLOSE,1);
TS:=CLOSE-LC;
TD1:=MAX(TS,0);
TD2:=ABS(TS);
TDS1:=SMA(TD1,N1,1);
TDS2:=SMA(TD2,N1,1);
X:=TDS1/TDS2*100;
魔鬼:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1);
魔王:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X);
DRAWICON(X=魔鬼,L*0.97,1);
DRAWICON(X=魔王,H*1.02,2);{条件转移显示}
4.无敌操盘线指标解释
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
STICKLINE(VAR2 < MA(VAR3,6),LOW,HIGH,0,1),COLORLIBLUE;
STICKLINE(VAR2 > MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN>CLOSE)AND(VAR2
COLORLIBLUE;
STICKLINE(((OPEN
COLORLIBLUE;
STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),2,0),COLORRED;
STICKLINE(((OPENMA(VAR3,6))),OPEN,CLOSE,2,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.02)),8);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORBLUE;
M:=IF(AL
撑:IF(NL
底:IF(AL
该指标的核心是VAR2和VAR3两条线的变化,根据两线之间的关系,决定波段买卖操作。也属于均线类原理指标。
短线操盘指标解释
N:=IF(BARSCOUNT(C)>=10,10,BARSCOUNT(C));
N赋值:如果收盘价的有效数据周期数>=10,返回10,否则返回收盘价的有效数据周期数
{限制语句,如果上市时间不足10天就用上市时间做N值,否则采用10}
STICKLINE(C>=MA(C,N),MA(C,N),MA(C,N*0.7),4,0),COLORYELLOW;
当满足条件收盘价>=收盘价的N日简单移动平均时,在收盘价的N日简单移动平均和收盘价的N*0.7日简单移动平均位置之间画柱状线,宽度为4,0不为0则画空心柱.,画黄色
{如果收盘价格大于等于N日的平均价格,就在N日的平均价格与0.7个N日时的平均价格之间画黄色柱线}
STICKLINE(C
当满足条件收盘价<收盘价的N日简单移动平均时,在收盘价的N日简单移动平均和收盘价的N*0.7日简单移动平均位置之间画柱状线,宽度为4,0不为0则画空心柱.,画蓝色
{如果收盘价格小于N日的平均价格,就在N日的平均价格与0.7个N日时的平均价格之间画蓝色柱线}
DRAWKLINE(H,O,L,C);
{画K线}
这个指标是使用了7日和10日均线金死叉的方式表达市场短线波变化规律的。
书写源码类指标{通达信}
研究类指标:
公开发布68000元智慧王私募版指标之二 黑马图(源码)
{黑马图--副图}
个股:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLOR1010FF;
大盘:EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV
(INDEXL,34)),3),COLORE67010,LINETHICK2;
STICKLINE(个股>=大盘,个股,大盘,1,0),COLORRED;
STICKLINE(个股<大盘,个股,大盘,1,0),COLORBLUE;
STICKLINE(个股>=大盘,0,大盘,6,0),COLORYELLOW;
STICKLINE(个股<大盘,0,个股,6,0),COLORYELLOW;
短线反弹:IF(CROSS(个股,9),50,0),STICK,LINETHICK3,COLOR00FF00;
DRAWTEXT(CROSS(个股,9),40,'短线反弹!'),COLOR00FF00;
VAR1:=EMA(CLOSE,3);
VAR2:=EMA(CLOSE,21);
VAR3:=BARSLAST(CROSS(VAR2,VAR1))>15;
VAR4:=VOL>MA(VOL,5)*2 AND VOL
VAR5:=CROSS(VAR1,VAR2) AND VAR4 AND VAR3;
黑马:IF(VAR5,80,0),STICK,LINETHICK4,COLORF00FF0;
DRAWTEXT(VAR5,70,'黑马!'),COLORF00FF0;
{通达信主图公式------波浪买卖(原码)
波浪买卖--主图 }
均衡:=IF (YEAR<=2017,IF(YEAR<2017, EMA(EMA(CLOSE,5),5),IF(YEAR=2017 AND MONTH<10, EMA(EMA
(CLOSE,5),5),1000)),1000);
中轨:=HHV(MA(HIGH,13),13);
趋势:=LLV(MA(HIGH,13),1);
VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);
VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2:=REF(VAR1,1);
VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;
VAR4:=(IF(COUNT(VAR3<20,5)>=1 AND COUNT(VAR1=LLV(VAR1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND
VOL>MA(VOL,5)*1.2,1,0));
VAR5:=(均衡>REF(均衡,1)AND 中轨REF(CLOSE,1));
趋势向上:=IF (MA(CLOSE,1)>MA(CLOSE,2) AND MA(CLOSE,2)>MA(CLOSE,3),1,0);
出击A:=IF (VAR5 AND 趋势向上 ,100,0);
均衡A:=BARSLAST(出击A>0);
A:=REF(均衡A,1)>5 AND 出击A>0;
CALF:=EMA((C/REF(C,10)-1)*100,5);
CALF1:=EMA((C/REF(C,10)-1)*100,30);
CALF2:=EMA((C/REF(C,10)-1)*100,120);
CALF3:=CROSS(CALF,CALF1);
B1F:=IF (YEAR>2005 AND CALF3>0,1,0);
D1F:=IF(REF(CLOSE,1)
C1F:=IF((CLOSE-REF(CLOSE,1))/CLOSE*100>3.6,1,0);
AFF:=IF(B1F AND C1F AND D1F ,1,0);
FLY1:=FORCAST(CLOSE,8);
FLY2:=HHV(FLY1,18);
FLY3:=EMA(COST(5),17);
FLY4:=(CLOSE+OPEN)*0.75/2;
FLY5:=CROSS(FLY3,FLY4);
CBPZ:=IF (A OR AFF OR FLY5,1,0);
CBPYY:=BARSLAST(CBPZ>0);
ZJMR1:=REF(CBPYY,1)>5 AND CBPZ>0;
ZJMR2:=IF (CROSS(ZIG(3,7),REF(ZIG(3,7),1)),1,0);
HHH:=30;
CCVAR2:=REF(LOW,1);
CCVAR3:=SMA(ABS(LOW-CCVAR2),3,1)/SMA(MAX(LOW-CCVAR2,0),3,1)*100;
CCVAR4:=EMA(IF(CLOSE*1.2,CCVAR3*10,CCVAR3/10),3);
CCVAR5:=LLV(LOW,HHH);
CCVAR6:=HHV(CCVAR4,HHH);
CCVAR7:=IF(LLV(LOW,58),1,0);
CCVAR8:=EMA(IF(LOW<=CCVAR5,(CCVAR4+CCVAR6*2)/2,0),3)/618*CCVAR7;
DY11:=(2*CLOSE+HIGH+LOW)/4;
DY12:=LLV(LOW,34);
DY13:=HHV(HIGH,13);
A11:=MA((DY11-DY12)/(DY13-DY12)*100,13);
B11:=EMA((0.668*REF(A11,1)+0.333*A11),2);
DY1:=(2*CLOSE+HIGH+LOW)/4;
DY2:=LLV(LOW,34);
DY3:=HHV(HIGH,13);
DYA:=EMA((DY1-DY2)/(DY3-DY2)*100,30);
DYB:=EMA(DYA,7);
A1:=EMA((DY1-DY2)/(DY3-DY2)*100,9);
B1:=EMA((0.667*REF(A1,2)+0.333*A1),2);
买入:=IF(CROSS(A1,B1)AND A1<25,35,0);
关注A:=IF (YEAR<=2017,IF(YEAR<2017, IF(CROSS(A11,B11)AND A11<25,40,20),IF(YEAR=2017 AND
MONTH<10, IF(CROSS(A11,B11)AND A11<25,40,20),1000)),1000);
CCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);
CCCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);
AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF (YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 AND
MONTH<10,REF(AF,1),0)),0);
STICKLINE(AF>BF,AF,BF,6,0),COLORYELLOW;
STICKLINE(AF
{送上最实用的指标---不求人}
VAR1:=(EMA(C,12)-EMA(C,26))*100+50;
VAR2:=EMA(VAR1,9);
VAR3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;
VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR5:=SMA(VAR4,13,8);
VAR6:=SMA(VAR3,21,8);
VAR7:=MA(C,80)-MA(C,10)/7;
VAR8:=EMA(C,5);
VAR9:=MA((LLV(C,9))*1.1,14);
VAR10:=2*VAR9-VAR8-C*0.1;
VAR11:=IF(((VAR8-VAR10)*5>0),(POW((VAR8-VAR10)*5,2))/10,(-1*(POW((VAR8-VAR10)*(5),2)))/(10));
VAR12:=IF((VAR11>0),VAR11-0,12);
VAR13:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
趋势:CEILING(SMA(VAR5,13,8)),LINETHICK2,COLOR0000FF;
看底:IF((趋势-VAR6<(-65)),1,6),COLOR00FF00;
顶峰:IF((趋势-VAR6>85),95,100),COLORF0F000;
黄金区: DRAWICON(IF(VAR13<15,15,0),13,12),COLORYELLOW;
操盘线: MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK2,COLORBLUE;
STICKLINE(FILTER(趋势75 OR CROSS(趋势,操盘线)AND 趋势60,5),100,60,8,1),COLORFFFF00;
STICKLINE(FILTER(CROSS(趋势,VAR12)AND 趋势REF(C,1) OR 趋势>REF(趋势,1)AND 趋势<35 AND C>REF(C,1),5),5,50,9,2),COLOR00FF00;
{通达信主图公式------蝴蝶专用操作(源码)}
{M1 2.00 1000.00 5.00 M2 2.00 1000.00 10.00 M3 2.00 1000.00 20.00 M4 2.00 1000.00 60.00}
MA7:MA(CLOSE,M1);
MA13:MA(CLOSE,M2);
MA21:MA(CLOSE,M3);
MA49:MA(CLOSE,M4);
FLY1: MA(CLOSE,5),;
FLY2: MA(CLOSE,10),;
VAR2:=CROSS(MA(CLOSE,5),MA(CLOSE,30));
DRAWICON(VAR2,LOW-LOW*0.01,1);
DRAWTEXT(VAR2 AND CLOSE>MA(CLOSE,1),LOW-LOW*0.02,'←少量买 '),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE>=MA(CLOSE,30) AND CLOSE<=MA(CLOSE,250),LOW-LOW*0.02,'←半仓买'),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,15),5)),LOW*0.99,'↑B') , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.009,'↓S') , COLORGREEN,LINETHICK1;
最强最准的反璞归真指标:“短、中、长神奇三均线”(主图)
3日、13日、34日成本均线分别代表3日、13日、34日的市场平均建仓成本(即日,周,月线)
34日成本均线也有较好的支撑和压力作用,中等力度的回调一般都无法突破34日成本均线。
我会再加一个90日均线是市场震荡的底部,受到支撑就要反弹,若跌破就暂时休息吧
短期成本均线随价格波动比较明显,支撑和压力作用减弱,但比较起来仍比同时间的移动均线的表现好。
1、中等力度的反弹及回调均难破34日成本均线,股价上涨过程中可用该线判断主力震仓、整理或出货,如是震仓或整理,则不会跌破34日成本均线,若是出货则一定会跌破该线。
2、股价在34日成本均线上方横盘称强势横盘,有庄托盘,后市能创新高。
3、股价在34日成本均线下方横盘称弱势横盘,无庄关照,后市则久盘必跌。
4、在拉升过程中,如在股价上穿13日成本均线时买入,下破13日成本均线时卖出是较温和但绝对安全的获利方法,但此方法在盘整行情中不可使用。
5、使用成本均线做卖出止损点,要在前三条线中,选本轮行情上升以来从未被破位的那条。
6、股跌破3日成本均线,其它股跌破13日成本均线是大盘中级顶部。3日线上穿13日线买入,温和放量,二次金叉更佳
7、短期服从长期线,更易把握趋势。
具体就看图吧
可见34日成本平均线比较的关键,90就是大底了
短线主要看3日线和13日线(参考第6条)
具体就自己参悟吧
主图公式------只赢操盘手(源码)
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
AMA1:EMA(DMA(CLOSE,CQ1),2) ,COLORWHITE;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
AMA2:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;
AMA3:IF(AMA2/REF(AMA2,1)>0.997,AMA2,DRAWNULL),COLORYELLOW,LINETHICK2;
AMA4:IF(AMA2/REF(AMA2,1)>1.001,AMA2,DRAWNULL),COLORRED,LINETHICK2;
STICKLINE((VAR2 < MA(VAR3,6)),CLOSE,OPEN,3,1),COLOR008000;
STICKLINE((VAR2 > MA(VAR3,6)),OPEN,CLOSE,3,1),COLORRED;
STICKLINE(((OPEN > CLOSE) AND (VAR2 > MA(VAR3,6))),(OPEN * 0.998),(CLOSE * 1.0001),2.3,0),COLOR008000;
STICKLINE(((OPEN < CLOSE) AND (VAR2 < MA(VAR3,6))),(CLOSE * 0.998),(OPEN * 1.002),2.3,0),COLORRED;
STICKLINE(((OPEN > CLOSE) AND (VAR2 < MA(VAR3,6))),CLOSE,OPEN,2.3,0),COLOR008000;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.04)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.03)),8);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORCYAN;
M:=IF(AL
撑:IF(NL
底:IF(AL
超强版五线(源码)
超强版五线主图(无未来)简单实用
短期线:EMA(CLOSE,6);
持股线:EMA(CLOSE,14);
生命线:EMA(CLOSE,26);
双月线:EMA(CLOSE,56);
牛熊线:EMA(CLOSE,166);
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8,'∠35上升'),COLORYELLOW;
支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;
MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买=1,5),LOW-0.03,'抄底'),COLORYELLOW;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARFREF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'大资金活动'),LINETHICK1,COLORFF00FF;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
Z1:=MA(C,13);
ZX:=REF(Z1,13/2+1);
DRAWICON(CROSS(ZX,C),H*1.01,2);
DRAWTEXT(CROSS(88,RSI),HIGH * 1.02,'▼逃顶'),COLOR00FFFF;
通达信主图公式------操盘线(源码)
{M1 2.00 1000.00 5.00 M2 2.00 1000.00 10.00 M3 2.00 1000.00 20.00 M4 2.00 1000.00 30.00 M5 2.00 1000.00 60.00}
MA5:MA(CLOSE,M1);
MA10:MA(CLOSE,M2);
MA20:MA(CLOSE,M3);
MA30:MA(CLOSE,M4);
MA60:MA(CLOSE,M5);
VAR2:=CROSS(MA(CLOSE,5),MA(CLOSE,30));
DRAWICON(VAR2,LOW-LOW*0.01,1);
DRAWTEXT(VAR2 AND CLOSE>MA(CLOSE,1),LOW-LOW*0.02,'←少量买 '),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE>=MA(CLOSE,60) AND CLOSE<=MA(CLOSE,250),LOW-LOW*0.02,'←半仓买'),COLORYELLOW;
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,15),5)),LOW*0.89,'↑B') , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.009,'↓S') , COLORGREEN,LINETHICK1;
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12)>0 AND EMA(CLOSE,12)/LOW>1.15,5),
LOW,'买'),COLORFF00FF;
DRAWTEXT(FILTER(EMA(CLOSE,12)-EMA(CLOSE,60)>0 AND HIGH/EMA(CLOSE,12)>1.15,5),
HIGH,'坚决出局'),COLORYELLOW;
通达信主图公式------正的阴阳线(源码)
主图 真正的阴阳线
{至简○ 主图 真正的阴阳线}
LYA1:=IF(H>REF(HHV(H,3),1) AND C>REF(C,1),LLV(L,3),IF (L
HHV(H,3),DRAWNULL));
LYA:=IF(LYA1=DRAWNULL,REF(LYA1,1),LYA1);
SNX2:=IF(LYALYA>L,REF(LYA,1),LYA);
BB:=PLOYLINE(C>0,SNX2),COLORGREEN,LINETHICK1;
DRAWICON(CROSS(C,BB),(C+O)/2,1);
DRAWICON(CROSS(BB,C),(C+O)/2,2);
中: EMA(EMA(EMA(HIGH,7.23379625),7.23379625),1),COLORLIBLUE,LINETHICK1;
中斜:=(EMA(中,2)-REF(EMA(中,2),2))/REF(EMA(中,2),2)*100,NODRAW;
IF(中斜>=0,中,DRAWNULL),COLORRED,LINETHICK2;
下1: 中*0.9276620375,COLORYELLOW,LINETHICK1;
下2: 中*0.868055,COLORYELLOW,LINETHICK1; {0.9}
下3:中*0.8263889,COLORYELLOW,POINTDOT;
上1:中*1.0723379625,COLORYELLOW,LINETHICK1;
上2: 中*1.12170138,COLORYELLOW,LINETHICK1;
上3:中*1.1694444444,COLORYELLOW,POINTDOT;
MACD:="MACD.MACD#DAY"(12,26,9);
周MACD:="MACD.MACD#WEEK"(12,26,9);
IF(MACD>=0,下1,DRAWNULL),COLORRED,LINETHICK2;
IF(周MACD>=0,下2,DRAWNULL),COLORRED,LINETHICK2;
DRAWTEXT((C-MA(C,13))/MA(C,13)*100<-20 AND C<下3,L,'建');
DRAWTEXT(FILTER(CROSS(MACD,0)OR CROSS(周MACD,0),3),L*0.99,'小加')COLORWHITE;
DRAWTEXT(COUNT(MACD>=0 AND 周MACD>=0 AND 中斜>=0,5)=1 AND MACD>=0 AND 周MACD>=0 AND 中斜>=0,L*0.96,'大加')COLORMAGENTA;
DRAWTEXT(FILTER(CROSS(0,MACD) OR CROSS(0,周MACD) OR CROSS(0,中斜),5),H*1.05,'减')COLORGREEN;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
通达信主图公式------政策策略(源码)
平衡:EMA(C,20),CIRCLEDOT,COLORWHITE;
上轨:平衡 + 2*STD(C,20),LINETHICK2,COLORFF00FF;
下轨:平衡 - 2*STD(C,20),LINETHICK2,COLOR00FF00;
STICKLINE((CLOSE >平衡),平衡,平衡,1,0),LINETHICK6,COLOR0000FF;
STICKLINE((平衡 > CLOSE),平衡,平衡,1,0),LINETHICK6,COLORFF6600;
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORFF7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORFF9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORFFBB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORFFCC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFFDD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFFEE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORFFFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
VAR9Q:=C= HHV(C,4)AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);
红持:VAR9Q,COLOR0000FF,LINETHICK0;
STICKLINE(VAR9Q,C,(O+C)/2,7,0),COLOR000055;
STICKLINE(VAR9Q,C,(O+C)/2,6,0),COLOR000066;
STICKLINE(VAR9Q,C,(O+C)/2,5,0),COLOR000077;
STICKLINE(VAR9Q,C,(O+C)/2,4,0),COLOR000099;
STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR0000BB;
STICKLINE(VAR9Q,C,(O+C)/2,2,0),COLOR0000DD;
STICKLINE(VAR9Q,C,(O+C)/2,1,0),COLOR0000FF;
VARAQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
粉变:VARAQ,COLORFF99FF,LINETHICK0;
STICKLINE(VARAQ,C,(O+C)/2,7,0),COLORFF11FF;
STICKLINE(VARAQ,C,(O+C)/2,6,0),COLORFF33FF;
STICKLINE(VARAQ,C,(O+C)/2,5,0),COLORFF55FF;
STICKLINE(VARAQ,C,(O+C)/2,4,0),COLORFF77FF;
STICKLINE(VARAQ,C,(O+C)/2,3,0),COLORFF99FF;
STICKLINE(VARAQ,C,(O+C)/2,2,0),COLORFFBBFF;
STICKLINE(VARAQ,C,(O+C)/2,1,0),COLORFFDDFF;
Y1:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9),3),1);
DRAWTEXT(CROSS(CLOSE,Y1),LOW,'[买进]'),COLORYELLOW;
STICKLINE(CROSS(Y1,CLOSE),H*1.05,H,1,0),COLORWHITE;
DRAWTEXT(CROSS(Y1,CLOSE),HIGH*1.05,'[卖出]'),COLORWHITE;
VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW -0.6,'(买)'),COLORFF99FF;
DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH +0.9,'(卖)'),COLORCCFF13;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L,L*0.92,1,0),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)
SC:=LHHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS,2);
买:=MR AND NOT(REF(MR,1)),COLORYELLOW;
STICKLINE(买,L,L*0.95,1,0),COLORRED;
DRAWTEXT(买,L*0.95, '必涨'),COLORRED;
多方:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)
-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
,3,1),2,1);
STICKLINE(CROSS(78.89,多方),H+1.5,H,1,0),COLOR00FF00;
DRAWTEXT(CROSS(78.89,多方),H+1.5,'(逃顶)'),COLOR00FF00;
通达信主图公式------真正的阴阳线 (源码)
{至简一 主图 真正的阴阳线}
D:=EMA((C*3+H+L+O)/6,5);
买卖:D,COLORGREEN,LINETHICK2;
A线:HHV(D,13)COLORYELLOW,LINETHICK2;
B线:LLV(D,13)COLORYELLOW,LINETHICK2;日平:="MACD.MACD#DAY"(12,26,9);
周平:="MACD.MACD#WEEK"(12,26,9);
JC:=(A线-B线);
IF(日平>=0,A线,DRAWNULL),COLORRED,LINETHICK2;
IF(周平>=0,B线,DRAWNULL),COLORRED,LINETHICK2;
壹:=COUNT(JC>REF(JC,1)AND A线>REF(A线,1),5)=1 AND JC>REF(JC,1)AND A线>REF(A线,1)AND D>=REF(D,1);
G1:=FILTER(壹=1,10);
G2:=BARSLAST(G1>0);
G3:=IFF(G2>0 AND G2<=10,1,0)=1 AND ((C-REF(C,G2))/REF(C,G2))*100>=5;
概壹:(SUM(FILTER(G3,10),0)/SUM(G1>0,0))*100,NODRAW;
加1:=COUNT(日平>=0 AND 周平>=0,5)=1 AND 日平>=0 AND 周平>=0;
加2:=FILTER(D=A线 AND REF(D,1)
①:=FILTER(加1=1,10);
②:=BARSLAST(①>0);
③:=IFF(②>0 AND ②<=10,1,0)=1 AND ((C-REF(C,②))/REF(C,②))*100>=5;
概加1:(SUM(FILTER(③,10),0)/SUM(①>0,0))*100,NODRAW;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
DRAWTEXT(FILTER(D=A线 AND REF(D,1)
DRAWTEXT(COUNT(日平>=0 AND 周平>=0,5)=1 AND 日平>=0 AND 周平>=0,L*0.96,'♂两成舱位')COLORRED;
DRAWTEXT(FILTER(COUNT(D=B线,3)>=2 AND D>B线,5),L*0.95,'全仓')COLORRED;
DRAWTEXT(FILTER(CROSS(0,日平) OR CROSS(0,周平) OR (A线=REF(A线,1)AND D
DRAWICON(COUNT(JC>REF(JC,1)AND A线>REF(A线,1),5)=1 AND JC>REF(JC,1)AND A线>REF(A线,1)AND D>=REF(D,1),B线,1);
通达信主图公式------BY一鸣(源码)
{改成通达信 BY一鸣}
{改成通达信 BY一鸣}
{N(1,10,5)}
VAR1:=(CLOSE - REF(CLOSE,6));
VAR2:=(CLOSE - REF(CLOSE,7));
VAR3:=(CLOSE - REF(CLOSE,8));
VAR4:=(CLOSE - REF(CLOSE,9));
VAR5:=(CLOSE - REF(CLOSE,10));
VAR6:=((((HHV(HIGH,N) - LLV(LOW,N)) / LLV(LOW,N)) * 100) > 8);
DX:=(((((VAR1 + VAR2) + VAR3) + VAR4) + VAR5) / 5);
ZX:=MA(DX,5);
CX:=MA(DX,21);
MA5:MA(CLOSE,5),COLOR00FFFF;
MA10:MA(CLOSE,10),COLORFFFF00;
MA20:MA(CLOSE,20),LINETHICK2,COLORFF00FF;
MA60:MA(CLOSE,60),COLOR0000FF;
MA120:MA(CLOSE,120),COLORFFFFFF;
VAR11:=(((CLOSE - LLV(LOW,60)) / (HHV(HIGH,60) - LLV(LOW,60))) * 100);
VAR21:=SMA(VAR11,5,1);
VAR31:=SMA(VAR21,10,1);
VAR41:=CROSS(VAR31,VAR21);
VAR51:=((VAR31 > 80) OR (VAR21 > 80));
VAR61:=(VAR41 AND VAR51);
VAR71:=EMA(((AMOUNT / VOL) / 100),3);
VAR81:=EMA(VAR71,88);
VAR91:=(EMA(VAR71,88) * 0.85);
VARA:=(VAR91 * 0.87);
VARB:=((LOW < VARA) AND (CLOSE > (REF(CLOSE,1) * 1.02)));
DRAWTEXT(FILTER(VARB,6),(LOW - 1.2),'★买'),COLOR6600FF LINETHICK2;
仅供参考:STICKLINE(VAR61,HIGH,HIGH,18,1),COLOR00FF00;
DRAWTEXT(FILTER(CROSS(69,((SMA(MAX((CLOSE - REF(CLOSE,1)),0),8,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),8,1)) * 100)),10),(HIGH + 0.46),'★卖 '),COLORFFFF00;
DRAWTEXT(FILTER(CROSS((0 - 5),MA((((LLV(LOW,45) - CLOSE) / (HHV(HIGH,45) - LLV(LOW,45))) * 100),5)),5),(LOW - 1.0),'★买'),COLOR00FFFF;
STICKLINE((CLOSE > OPEN),H,LOW,0.1,0),COLOR0000CC;
STICKLINE((OPEN >= CLOSE),H,LOW,0.1,0),COLORFFFF00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,3,0),COLORFFFF00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,0.1,0),COLORFFFFFF;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,3,0),COLOR0033CC;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,0.1,0),COLORFF00FF;
金睛N主图(源码)
有效识破主力洗盘,牛股一骑到底!
{通达信 火眼金睛 主图 东郭改编 真正的阴阳线}
STICKLINE(C>REF(C,1),H,L,0,0),COLOR0000FF;
STICKLINE(C>REF(C,1),O,C,3.1,1),COLOR000066;
STICKLINE(C>REF(C,1),O,C,2.6,1),COLOR000099;
STICKLINE(C>REF(C,1),O,C,2,1),COLOR0000CC;
STICKLINE(C>REF(C,1),O,C,1.2,1),COLOR0000FF;
STICKLINE(C>REF(C,1),O,C,0.4,1),COLORCC66FF;
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C=REF(C,1),H,L,0,0),COLORFFFFFF;
STICKLINE(C=REF(C,1),O,C,3.1,1),COLOR777777;
STICKLINE(C=REF(C,1),O,C,2.6,1),COLOR999999;
STICKLINE(C=REF(C,1),O,C,2,1),COLORBBBBBB;
STICKLINE(C=REF(C,1),O,C,1.2,1),COLORDDDDDD;
STICKLINE(C=REF(C,1),O,C,0.4,1),COLORFFFFFF;
A0:=(L+H+C*2)/4;
工作:EMA(A0,14)COLORYELLOW,LINETHICK1;
度假:EMA(A0,25)COLORGREEN,LINETHICK2;
A1X:=(工作-REF(工作,1))/REF(工作,1)*100;
A2X:=(度假-REF(度假,1))/REF(度假,1)*100;
G:=BARSLAST(CROSS(A1X,0));
买入止损:REF(A0,G),COLORWHITE,LINETHICK1;
A2:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5);
A4:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;
A5:=EMA(CLOSE,12)-EMA(CLOSE,26);
A6:=EMA(A5,9);
A7:=(A5<-0.1 AND A5>A6);
财神:IF(A7,LLV(L,21),DRAWNULL)COLORRED,CIRCLEDOT;
DRAWICON(CROSS(A2,EMA(A2,5)) AND (A4-EMA(A2,5))>40 AND A7,LLV(L,21)*1.02,1);
STICKLINE(C>REF(C,1)*1.09,C,O,3.1,0)COLOR000055;
STICKLINE(C>REF(C,1)*1.09,C,O,2.6,0)COLOR000077;
STICKLINE(C>REF(C,1)*1.09,C,O,2.1,0)COLOR000099;
STICKLINE(C>REF(C,1)*1.09,C,O,1.5,0)COLOR0000BB;
STICKLINE(C>REF(C,1)*1.09,C,O,0.9,0)COLOR0000DD;
STICKLINE(C>REF(C,1)*1.09,C,O,0.3,0)COLOR0000FF;
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
减:IF(A2X>=0,度假,DRAWNULL),COLORMAGENTA,LINETHICK2;
少:IF(A1X>=0,工作,DRAWNULL),COLORRED,LINETHICK2;
操:IF(A1X>=0,买入止损,DRAWNULL),LINETHICK2,COLORRED;
作:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,DRAWNULL),COLORGREEN,POINTDOT;
顺:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,DRAWNULL),COLORGREEN,POINTDOT;
应:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,DRAWNULL),COLORGREEN,CIRCLEDOT;
趋:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,DRAWNULL),COLORGREEN,POINTDOT;
势:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,DRAWNULL),COLORGREEN,POINTDOT;
破:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.6,REF(A0,BARSLAST(CROSS(A1X,0)))*1.6,DRAWNULL),COLORGREEN,POINTDOT;
位:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.7,REF(A0,BARSLAST(CROSS(A1X,0)))*1.7,DRAWNULL),COLORGREEN,POINTDOT;
出:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.8,REF(A0,BARSLAST(CROSS(A1X,0)))*1.8,DRAWNULL),COLORGREEN,POINTDOT;
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,1.5,0),COLORRED;
STICKLINE(涨停,H,L,0,0),COLORRED;
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
通达信主图公式:缠论中枢
{N1:1,100,10;N2:1,100,10;DISP:=1,3,2};
N1:=10;N2:=10;DISP:=2;
K:=IF(PERIOD=5,1,{日}
IF(PERIOD=6,1,{周}
IF(PERIOD=7,1,{月}
IF(PERIOD=8,1,{多分钟}
IF(PERIOD=9,1,{多日}
IF(PERIOD=10,1,{季}
IF(PERIOD=11,2,{年}
IF(PERIOD=4,1,{60F}
IF(PERIOD=3,1,{30F}
IF(PERIOD=2,1,{15F}
IF(PERIOD=1,1{5F},1{1F})))))))))))/10;
P1:=PEAK(1,K*N1,1);
P2:=PEAK(1,K*N1,2);
WP1:=PEAKBARS(1,K*N1,1);
WP2:=PEAKBARS(1,K*N1,2);
T1:=TROUGH(2,K*N2,1);
T2:=TROUGH(2,K*N2,2);
WT1:=TROUGHBARS(2,K*N2,1);
WT2:=TROUGHBARS(2,K*N2,2);
TJ1:=P1>T1 AND P2>T2 ;
ZD:=MAX(T1,T2);
ZG:=MIN(P1,P2);
LL:=MIN(T1,T2);
HH:=MAX(P1,P2);
TJ2:=FILTER(ZG>ZD,2);
TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
TJ4:=TJ1&&TJ2&&NOT(TJ3);
TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD
TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8,ZD,DRAWNULL);
ZSG:=IF(TJ8,ZG,DRAWNULL);
ZSH:=IF(TJ8,HH,DRAWNULL);
ZSL:=IF(TJ8,LL,DRAWNULL);
STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;
STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;
DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;
中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED;
中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGREEN;
{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;
中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;}
趋势高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;
趋势低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;
局部低点预选A:=BACKSET(LLV(L,5)
局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);
局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);
局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);
局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);
缺口判断:=IF(L>REF(H,1),1,IF(H
距前高天:=BARSLAST(局部高点预选C=1);
距前低天:=BARSLAST(局部低点预选C=-1);
小值周期:=LOWRANGE(L);
大值周期:=TOPRANGE(H);
低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)
低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L
预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);
判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);
预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);
判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);
低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)
低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);
预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);
判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);
高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);
预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);
判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);
低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)
低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);
预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);
判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);
高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);
预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);
判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);
低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)
低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L
极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);
局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;
DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;
DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;
DD1:=BARSLAST(ABS(极点保留)!=1);{
DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;
DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;}
MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;
判:IF(MA5