买进主图指标公式指标公式[其他软件公式]
主要是通过计算股票价格的变化来判断买卖信号。其中多空线是通过几天内的平均价格计算得出的,用于判断买卖方向。另外还有CXH1和CXHD两个变量用于判断是否上升或下降趋势,以及PMA和DD用于判断当前股票价格是否高于或低于多空线。最后还有CXH21和CXH22用于通过一定的算法计算出的信号来判断买入信号。
具体思路是,根据股票价格的变化情况,计算出多空线并判断买卖方向,然后再结合PMA和CXH21等指标进行具体的买卖决策。
CXH1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
CXH2:=REF(CXH1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH3:=REF(CXH2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH4:=REF(CXH3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH5:=REF(CXH4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH6:=REF(CXH5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH7:=REF(CXH6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH8:=REF(CXH7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH9:=REF(CXH8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXHA:=REF(CXH9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXHB:=REF(CXHA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXHC:=REF(CXHB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(CXH1 OR CXH2 OR CXH3 OR CXH4 OR CXH5 OR CXH6 OR CXH7 OR
CXH8 OR CXH9 OR CXHA OR CXHB OR CXHC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1}
CXHD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
CXHE:=REF(CXHD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXHF:=REF(CXHE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH10:=REF(CXHF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH11:=REF(CXH10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH12:=REF(CXH11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH13:=REF(CXH12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH14:=REF(CXH13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH15:=REF(CXH14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH16:=REF(CXH15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
CXH17:=REF(CXH16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
CXH18:=REF(CXH17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(CXHD OR CXHE OR CXHF OR CXH10 OR CXH11 OR CXH12 OR CXH13 OR
CXH14 OR CXH15 OR CXH16 OR CXH17 OR CXH18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
CXH19:=REF(CXHD OR CXHE OR CXHF OR CXH10 OR CXH11 OR CXH12 OR CXH13 OR
CXH14 OR CXH15 OR CXH16 OR CXH17 OR CXH18,1) AND CXH1;
STICKLINE(CXH19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;
CXH1A:=REF(CXH1 OR CXH2 OR CXH3 OR CXH4 OR CXH5 OR CXH6 OR CXH7 OR
CXH8 OR CXH9 OR CXHA OR CXHB OR CXHC,1) AND CXHD;
STICKLINE(CXH1A,REF(CLOSE,1),REF(CLOSE,2),5,2),COLOR00FF00{98FD};
STICKLINE(CXH19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;
STICKLINE(CXH19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;
STICKLINE(CXH19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10FFFF;
STICKLINE(CXH1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;
STICKLINE(CXH1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;
STICKLINE(CXH1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;
PMA:MA(C,5),COLORWHITE,LINETHICK2;
IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;
IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2;
X:=(3*C+L+O+H)/6;
多空线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)
+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)
+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+
REF(X,20))/210,COLORFF00FF,LINETHICK2;
{用法:黄托底买进,蓝压顶卖出。}
DD:=多空线<REF(多空线,1);
IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2;
A:=(PMA>多空线);
IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;
CXH21:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);
CXH22:=8;
SS:=CROSS(CXH21,CXH22);
DRAWTEXT(SS,L*0.98,'买进!'),COLOR0099FF;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容