宝塔线指标 公式 源码[同花顺公式]
指标代码分析及参考使作建议:
根据给出的代码,分析指标并给出简要的思路和操作建议如下:
SS指标:根据代码可以得出SS指标,它是根据当前收盘价与前两天的收盘价的比较结果来判断市场的趋势。如果当前收盘价大于前一天且前一天收盘价大于前两天的收盘价,则为1;如果当前收盘价小于前一天且前一天收盘价小于前两天的收盘价,则为-1;如果当前收盘价大于前两天且前两天的收盘价大于前一天的收盘价,则为2;如果当前收盘价小于前两天且前两天的收盘价小于前一天的收盘价,则为-2;否则为0。
SM指标:根据代码可以计算出SM指标,它是对SS指标进行了平滑处理,并返回非零的最近的值。通过比较SM指标的变化可以判断价格趋势的延续情况。
mc指标:根据代码可以计算出mc指标,它根据SS指标和SM指标的取值选择相应的数值作为mc的值。当SS指标的前一天的值不等于0时,mc等于B2;当SM指标大于0时,mc等于B1和B2中的较小值;当SM指标小于等于0时,mc等于B1和B2中的较大值。该指标可以用来标记买入点和卖出点。
操作建议:根据SS指标和SM指标的取值,可以选择适当时机进行买入和卖出操作。当SS指标为1或2时可以考虑买入,当SS指标为-1或-2时可以考虑卖出。同时,通过比较SS指标与SM指标的变化以及满足特定条件时的mc取值,可以判断价格趋势的延续与反转信号。然而,仅仅依靠这些指标进行买卖操作可能存在一定的风险,建议结合其他技术指标、基本面分析和市场走势等因素进行综合判断。同时,还需要注意风险管理和资金控制,以保证投资安全。请注意,投资有风险,需谨慎操作。
源码:
B1:=REF(C,1);B2:=REF(C,2);
SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));
SM:=IF(REF(SS,1)<>0,REF(SS,1),IF(REF(SS,2)<>0,REF(SS,2),IF(REF(SS,3)<>0,REF(SS,3),IF(REF(SS,5)<>0,REF(SS,5),IF(REF(SS,6)<>0,REF(SS,6),IF(REF(SS,7)<>0,REF(SS,7),0))))));
mc:IF(REF(SS,1)<>0,B2,IF(SM>0,MIN(B1,B2),MAX(B1,B2))),COLORff00ff;
STICKLINE(SS=1 OR SM>=1 AND SS=0,B1,C,4,1),colorred;
STICKLINE(SS=-1 OR SM<=-1 AND SS=0,B1,C,4,0),colorFF9000;
STICKLINE(SS=2,B2,C,4,1),colorred;
STICKLINE(SS=-2,B2,C,4,0),colorFF9000;
STICKLINE((SS=-1 OR SS=-2) AND SM>0,B2,B1,4,1),colorred;
STICKLINE((SS=1 OR SS=2) AND SM<0,B2,B1,4,0),colorFF9000;
宝塔线副图
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),9,1),colorred;
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),9,0),COLORGREEN;//http://www.cxh99.com
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),9,0) , COLORGREEN;//http://www.cxh99.com
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),9,1),colorred;
手机版宝塔线全部一起
B1:=REF(C,1);B2:=REF(C,2);
SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));
SM:=IF(REF(SS,1)<>0,REF(SS,1),IF(REF(SS,2)<>0,REF(SS,2),IF(REF(SS,3)<>0,REF(SS,3),IF(REF(SS,5)<>0,REF(SS,5),IF(REF(SS,6)<>0,REF(SS,6),IF(REF(SS,7)<>0,REF(SS,7),0))))));
mc:IF(REF(SS,1)<>0,B2,IF(SM>0,MIN(B1,B2),MAX(B1,B2))),COLORff00ff;
STICKLINE(SS=1 OR SM>=1 AND SS=0,B1,C,4,1),colorred;
STICKLINE(SS=-1 OR SM<=-1 AND SS=0,B1,C,4,0),colorFF9000;
STICKLINE(SS=2,B2,C,4,1),colorred;
STICKLINE(SS=-2,B2,C,4,0),colorFF9000;
STICKLINE((SS=-1 OR SS=-2) AND SM>0,B2,B1,4,1),colorred;
STICKLINE((SS=1 OR SS=2) AND SM<0,B2,B1,4,0),colorFF9000;
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);
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);
CXH100:=CXH1 OR CXH2 OR CXH3 OR CXH4 OR CXH5 OR CXH6 OR CXH7 OR CXH8
OR CXH9 OR CXHA OR CXHB OR CXHC;
STICKLINE(CXH100,CLOSE,REF(CLOSE,1),8,1),colorred;
CXH200:=CXHD OR CXHE OR CXHF OR CXH10 OR CXH11 OR CXH12 OR CXH13 OR
CXH14 OR CXH15 OR CXH16 OR CXH17 OR CXH18;
STICKLINE(CXH200,CLOSE,REF(CLOSE,1),8,0),COLORGREEN;//http://www.cxh99.com
CXH200:=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(CXH200,REF(CLOSE,1),REF(CLOSE,2),8,0),COLORGREEN;//http://www.cxh99.com
CXH400:=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(CXH400,REF(CLOSE,1),REF(CLOSE,2),8,1),colorred;
//程序化交易 www.cxh99.com
//程序化交易 www.cxh99.com
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容