通达信多头排列公式,要求改成“可以随机允许其中一条均线低于前一条均线”(如MA30<MA20,但其他不变)

原公式:MA(C,5)>=MA(C,10)ANDMA(C,10)>=MA(C,20)ANDMA(C,20)>=MA(C,30)ANDMA(C,30)>=MA(C,60)A... 原公式:MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250); 展开
 我来答
sinner_dg
2013-03-07 · TA获得超过3.4万个赞
知道大有可为答主
回答量:1.2万
采纳率:8%
帮助的人:4868万
展开全部
{低前线}
TD5:=MA(C,5)<MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250);
TD10:=MA(C,5)>=MA(C,10) AND MA(C,10)<MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250);
TD20:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)<MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250);
TD60:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)<MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250);
TD90:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)<MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250);
TD120:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)<MA(C,120) AND MA(C,120)>=MA(C,250);
TD250:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)<MA(C,250);
XG:TD5 OR TD10 OR TD20 OR TD60 OR TD90 OR TD120 OR TD250;
更多追问追答
追问
兄弟,可否作小改善一下。

您公式中筛选出来的个股,基本符合要求,但有这样的情况,如其他均线均多头排列,只有MA250除外,但MA250有可能不仅在MA120以上,还在MA90\MA60\MA30等之上。

我想看您能否将公式改善一下,使例外的那条均线,仅仅只高于最相邻的那条均线,如刚刚那种情况,MA250只高于MA120,而不会再高于其他均线。其他均线仍为多头排列。

谢谢!改善后,会加分。
追答
对,再加一条线试试;哈,看到眼花缭乱:
{低前线}
TD5:=MA(C,5)=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250); TD10:=MA(C,5)>=MA(C,10) AND MA(C,10)=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250); TD20:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250); TD60:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)>=MA(C,250); TD90:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)=MA(C,120) AND MA(C,120)>=MA(C,250); TD120:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)=MA(C,250); TD250:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND MA(C,30)>=MA(C,60) AND MA(C,60)>=MA(C,90) AND MA(C,90)>=MA(C,120) AND MA(C,120)=MA(C,10) AND MA(C,10)>=MA(C,20) AND MA(C,20)>=MA(C,30) AND (MA(C,250)>MA(C,30) OR MA(C,250)>MA(C,60) OR MA(C,250)>MA(C,90) OR MA(C,250)>MA(C,120));
XG:TD5 OR TD10 OR TD20 OR TD60 OR TD90 OR TD120 OR TD250 OR TD250A;
dingqinke
2013-03-07 · TA获得超过446个赞
知道小有建树答主
回答量:758
采纳率:0%
帮助的人:213万
展开全部
(MA(C,5)>=MA(C,10) + MA(C,10)>=MA(C,20) + MA(C,20)>=MA(C,30) + MA(C,30)>=MA(C,60) + MA(C,60)>=MA(C,90) + MA(C,90)>=MA(C,120) + MA(C,120)>=MA(C,250)) >=9;
这个没试过,手边没电脑。

或者,下面这个应该行。
TT1=if(ma(c,5)>=ma(c,10),1,0);
.
.
.
TT7=if(ma(c,120)>=ma(c,250),1,0);
(tt1+tt2+tt3+tt4+tt5+tt6+tt7)>=9;
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
8206GD
2013-03-06 · TA获得超过1.2万个赞
知道大有可为答主
回答量:5520
采纳率:65%
帮助的人:4562万
展开全部
可以做,不过要10多组代码的老兄!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式