金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 1599|回复: 1

实际上PD2F跟PD2D完全一模一样, 为什么在PD2F为1 的时候 PD2D 不是1?

[复制链接]

45

主题

140

帖子

150

积分

Rank: 4

等级: 专业版

注册:
2022-8-5
曾用名:
发表于 2022-12-29 13:37 | 显示全部楼层 |阅读模式
//均线公式, 经过检验, 由于数量比较多, 还是使用SMA比较公正, 但是EMA55, MA225 的名字就不改了
A:=(3*C+L+H)/5;
SMA5:=SMA(A,5*15,1);//三条均线都是以15分钟均线来做衡量
MID:SMA(A,20*15,1),COLORWHITE;
SMA55:SMA(C,55*15,1),COLORYELLOW;
SMA225:SMA(CLOSE,225*15,1),COLORGREEN;
TMP2:=STD(CLOSE,20*15); //15分钟的BOLL
STDTOP:MID+1.5*TMP2,COLORCYAN;
STDBOTTOM:MID-1.5*TMP2,COLORBLUE;
//引用均线角度问题, 用来控制均线拟合和均线向下问题
XLSMA5:=ATAN(SMA5/REF(SMA5,1)*100-100)/3.142*180;
XLMID:=ATAN(MID/REF(MID,1)*100-100)/3.142*180, nodraw;
XLSMA55:=ATAN(SMA55/REF(SMA55,1)*100-100)/3.142*180, nodraw;
XLSMA225:=ATAN(SMA225/REF(SMA225,1)*100-100)/3.142*180,nodraw;
//斜率比较向下d定义为比斜率向下更加厉害一点的
斜率向下:=(REF(XLSMA55,1)<-0.05 OR REF(XLMID,1)<-0.1 OR REF(XLSMA225,1)<-0.03);
斜率比较向下:=(REF(XLSMA55,1)<-0.07 OR REF(XLMID,1)<-0.12 OR REF(XLSMA225,1)<-0.04);
//斜向下:=(REF(XLSMA55,1)<-0.05 OR REF(XLMID,1)<-0.09 OR REF(XLSMA225,1)<-0.03)AND NOT( REF(XLSMA55,1)>REF(XLSMA55,5) AND REF(XLSMA55,1)>REF(XLSMA55,2*15) AND  REF(XLSMA225,1)>REF(XLSMA225,2)  AND REF(XLSMA225,1)>REF(XLSMA225,5) AND REF(XLSMA55,1)>-0.05);
斜率比较向上:=(REF(XLSMA55,1)>0.07 OR REF(XLMID,1)>0.12 OR REF(XLSMA225,1)>0.04);
斜率向上:=(REF(XLSMA55,1)>0.05 OR REF(XLMID,1)>0.1 OR REF(XLSMA225,1)>0.03);
//斜向上:=(REF(XLSMA55,1)>0.05 OR REF(XLMID,1)>0.09 OR REF(XLSMA225,1)>0.03) AND NOT( REF(XLSMA55,1)<REF(XLSMA55,5) AND REF(XLSMA55,1)<REF(XLSMA55,2*15) AND REF(XLSMA225,1)<REF(XLSMA225,2) AND REF(XLSMA225,1)<REF(XLSMA225,5) AND REF(XLSMA55,1)<0.05);
//有点斜向下:=(REF(XLSMA55,1)<-0.03 OR REF(XLMID,1)<-0.08 OR REF(XLSMA225,1)<-0.02)AND NOT( REF(XLSMA55,1)>REF(XLSMA55,5) AND REF(XLSMA225,1)>REF(XLSMA225,2) AND REF(XLSMA225,1)>REF(XLSMA225,5) AND REF(XLSMA55,1)>-0.03);
//SMA55斜向下:REF(XLSMA55,1)<-0.07 AND NOT(REF(XLSMA55,1)>REF(XLSMA55,2) AND REF(XLSMA55,1)>REF(XLSMA55,5) AND REF(XLSMA225,1)>REF(XLSMA225,2) AND REF(XLSMA225,1)>REF(XLSMA225,5));
//斜向下跟比较斜向下比包括更加轻微的倾斜
//比较斜向下:=(REF(XLSMA55,1)<-0.07 OR(REF(XLMID,1)<-0.12 OR REF(XLSMA225,1)<-0.04) AND NOT( REF(XLSMA55,1)>REF(XLSMA55,5) AND REF(XLSMA55,1)>REF(XLSMA55,2*15) AND REF(XLSMA225,1)>REF(XLSMA225,2) AND REF(XLSMA225,1)>REF(XLSMA225,5) AND REF(XLSMA55,1)>-0.05) );
//MA225斜向下:=REF(XLSMA225,1)<-0.03;
//均线拟合是mid,SMA55未必在ma225之上, 均线拟合1是均线强势向上的一种拟合,
均线拟合:=ABS(MID-SMA225)/SMA225<0.015 AND ABS(SMA55-SMA225)/SMA225<0.01 AND (XLMID>=-0.09 AND XLSMA55>=-0.04 AND  XLSMA225>=-0.02) AND (XLMID-XLSMA55)>-0.05;
均线拟合向好A:= MID>SMA225 AND SMA55>SMA225 AND ABS(MID-SMA55)/SMA55<0.01 ;
均线拟合向好B:= MID>SMA225 AND SMA55>SMA225 AND ABS(SMA55-SMA225)/SMA225<0.01;
均线拟合向好C:= MID>SMA225 AND SMA55>SMA225 AND ABS(MID-SMA225)/SMA225<0.015;
均线拟合向好:=(均线拟合向好A OR 均线拟合向好B OR 均线拟合向好C) AND ((REF(MID,1)>REF(MID,15) OR REF(SMA55,1)>REF(SMA55,6))) AND (XLMID>-0.09 AND XLSMA55>-0.02 AND  XLSMA225>-0.02) AND (XLMID-XLSMA55)>-0.05;
均线不拟合向好:=NOT(均线拟合向好);
//均线向上和均线强势向上的区别是1.均线向上在mid<SMA55的时候只要SMA55的斜率比ma225的斜率高就可以向上了,均线强势向上价格必须在ma225之上且斜率要比均线向上高
//均线向上和均线强势向上分两种情况, 一种在均线ma225之下,如果斜率足够大, 可以判定向上。 一种在ma225之上, 如果没有跌破某个点位, 可以认为向上。
均线向上A:=MID>SMA55 AND (MID-SMA55)/SMA55<=0.01  AND REF(MID,1)>REF(MID,16) AND REF(SMA55,1)>REF(SMA55,6) AND REF(SMA225,1)>REF(SMA225,3) AND (XLMID>0.06 OR XLSMA55>0.04 OR XLSMA225>0.015);
均线向上C:=((MID-SMA225)/SMA225>0.02 OR (SMA55-SMA225)/SMA225>0.02 OR (MID-SMA55)/SMA55>0.01) AND  XLSMA55>-0.07  AND MID>SMA55 AND NOT(XLSMA55<0 AND XLMID<-0.09);
//均线向上C:=(XLMID>0.15 OR XLSMA55>0.05 OR XLSMA225>0.03) ;
均线向上B:= MID>SMA55 AND REF(XLSMA55,1)>REF(XLSMA225,1) AND REF(XLSMA55,1)>0.03 AND XLSMA225>-0.04;//实际上是在mid>SMA55上如果出现拐点且斜率比较大, 则判定均线向上
均线向上D:=(REF(XLSMA55,1)>REF(XLSMA225,1) AND REF(XLSMA55,1)>0.04 AND XLSMA225>-0.03) AND SMA5>SMA55 ;
均线向上E:=XLMID>0.15 AND REF(XLSMA55,1)>REF(XLSMA225,1) AND REF(XLSMA55,1)>-0.01 AND XLSMA225>-0.04 AND SMA5>MID ;

均线向下A:=MID<SMA55 AND (MID-SMA55)/SMA55>=-0.01 AND REF(MID,1)<REF(MID,16) AND REF(SMA55,1)<REF(SMA55,6) AND REF(SMA225,1)<REF(SMA225,3) AND (XLMID<-0.06 OR XLSMA55<-0.04 OR XLSMA225<-0.015);
//均线向下A:MID<SMA55 AND ( (REF(SMA55,1)<REF(SMA55,6)ORREF(SMA55,1)<REF(SMA55,3*15)) AND (REF(SMA225,1)<REF(SMA225,16)OR REF(SMA225,1)<REF(SMA225,3)) ) AND ((XLMID<0.12 OR XLSMA55<0.07) AND  XLSMA225<0);
均线向下C:=((MID-SMA225)/SMA225<-0.02 OR (SMA55-SMA225)/SMA225<-0.02 OR (MID-SMA55)/SMA55<-0.01) AND  XLSMA55<0.07  AND MID<SMA55 AND NOT(XLSMA55>0 AND XLMID>0.09);
//均线向下C:=(XLMID<-0.15 OR XLSMA55<-0.05 OR XLSMA225<-0.03);
均线向下B:=MID<SMA55 AND REF(XLSMA55,1)<REF(XLSMA225,1)AND REF(XLSMA55,1)<-0.05 AND XLSMA225<0.04; //实际上是在mid<SMA55上如果出现拐点且斜率比较大, 则判定均线向下
均线向下D:=(REF(XLSMA55,1)<REF(XLSMA225,1) AND REF(XLSMA55,1)<-0.04 AND XLSMA225<0.03) AND SMA5<MID;
均线向下E:=XLMID<-0.15 AND REF(XLSMA55,1)<REF(XLSMA225,1) AND REF(XLSMA55,1)<0.01 AND XLSMA225<0.04 AND SMA5<MID ;
均线向上:=均线向上B OR 均线向上A OR 均线向上C OR 均线向上D OR 均线向上E;
均线向下:=均线向下B OR 均线向下A OR 均线向下C OR 均线向下D OR 均线向下E;

PD2D测0:C<ENTERPRICE*0.995;
PD2D测1:ENTERBARS<60 AND C<ENTERPRICE*0.995;
PD2D测2:均线向下 AND REF(均线向下,1) AND C<STDBOTTOM;
PD2F:PD2D测1 AND PD2D测2;
PD2D: ENTERBARS<60 AND C<ENTERPRICE*0.995 AND 均线向下 AND REF(均线向下,1) AND C<STDBOTTOM;

实际上PD2F跟PD2D完全一模一样, 为什么在PD2F为1 的时候 PD2D 不是1?

回复

使用道具 举报

3

主题

2万

帖子

2万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-24
曾用名:
发表于 2022-12-29 13:56 | 显示全部楼层
截图看下哪个品种什么时候不一样的呢,本地看都一样
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2024-12-23 21:49 , Processed in 0.223500 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表