您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

时间密码指标 公式 源码[其他软件公式]

指标公式源码分析及使用说明:

这段代码看起来是在进行时间密码的编写,将不同节气与对应的月份进行了关联。在这里我可以为您解释一下具体内容:

1. 代码中通过FILTER函数筛选出了不同节气所对应的日期,并将其与对应的月份进行了关联。
2. 使用DRAWTEXT函数在图表上标注了各个节气的名称和对应的月份。
3. 使用STICKLINE函数在图表上绘制了不同节气的线条,并添加了链接地址。
4. 函数COLOR用于设置线条的颜色,ALIGN0用于设置文本对齐方式。

接下来是指标创建思路和使用参考说明:

**指标创建思路:**
根据代码中的节气信息,可以创建一些与农历节气相关的技术指标,比如节气择时指标、季节性交易策略等。具体创建思路如下:
- 可以利用不同节气点作为买入或卖出信号,结合价格走势进行交易决策。
- 可以统计不同节气周期内的股票涨跌幅情况,构建季节性交易策略。
- 可以分析不同节气周期内的成交量变化情况,寻找潜在的市场热点。

**指标使用参考说明:**
- 在使用节气相关指标时,需要结合其他技术指标和市场情况进行综合分析,避免单一指标导致的误判。
- 可以通过回测历史数据来验证节气相关指标的有效性和盈利能力,进一步优化交易策略。
- 需要注意节气信息的更新和变化,及时调整指标参数和交易规则。
- 对于不熟悉节气文化的投资者,建议先深入了解农历节气的含义和相关传统习俗,再结合技术指标进行交易操作。

希望以上内容能帮助到您,如果您有其他问题或需要进一步帮助,请随时告诉我!

 

 

源码:

 


{时间密码}
立春:=FILTER(MONTH=2 AND (DAY=4 OR DAY=6 ),2);
雨水:=FILTER(MONTH=2 AND (DAY=19 OR DAY=21),2);
惊蛰:=FILTER(MONTH=3 AND (DAY=6 OR DAY=8 ),2);
春分:=FILTER(MONTH=3 AND (DAY=21 OR DAY=23),2);
清明:=FILTER(MONTH=4 AND (DAY=5 OR DAY=7 ),2);
谷雨:=FILTER(MONTH=4 AND (DAY=20 OR DAY=22),2);
立夏:=FILTER(MONTH=5 AND (DAY=7 OR DAY=9 ),2);
小满:=FILTER(MONTH=5 AND (DAY=21 OR DAY=23),2);
芒种:=FILTER(MONTH=6 AND (DAY=6 OR DAY=8 ),2);
夏至:=FILTER(MONTH=6 AND (DAY=21 OR DAY=23),2);
小暑:=FILTER(MONTH=7 AND (DAY=7 OR DAY=9 ),2);
大暑:=FILTER(MONTH=7 AND (DAY=23 OR DAY=25),2);
立秋:=FILTER(MONTH=8 AND (DAY=8 OR DAY=10 ),2);
处暑:=FILTER(MONTH=8 AND (DAY=23 OR DAY=25),2);
白露:=FILTER(MONTH=9 AND (DAY=8 OR DAY=10 ),2);
秋分:=FILTER(MONTH=9 AND (DAY=23 OR DAY=25),2);
寒露:=FILTER(MONTH=10 AND (DAY=8 OR DAY=10 ),2);
霜降:=FILTER(MONTH=10 AND (DAY=23 OR DAY=25),2);
立冬:=FILTER(MONTH=11 AND (DAY=8 OR DAY=10 ),2);
小雪:=FILTER(MONTH=11 AND (DAY=23 OR DAY=25),2);
大雪:=FILTER(MONTH=12 AND (DAY=7 OR DAY=9 ),2);
冬至:=FILTER(MONTH=12 AND (DAY=22 OR DAY=24),2);
小寒:=FILTER(MONTH=1 AND (DAY=6 OR DAY=8 ),2);
大寒:=FILTER(MONTH=1 AND (DAY=20 OR DAY=22),2);
寅月:=立春;
卯月:=惊蛰;
辰月:=清明;
巳月:=立夏;
午月:=芒种;
未月:=小暑;
申月:=立秋;
酉月:=白露;
戌月:=寒露;
亥月:=立冬;
子月:=大雪;
丑月:=小寒;DRAWTEXT(寅月,LOW*0.96,'寅'),COLORGREEN,ALIGN0;
DRAWTEXT(卯月,LOW*0.96,'卯'),COLORGREEN,ALIGN0;
DRAWTEXT(辰月,LOW*0.96,'辰'),COLOR0099FF,ALIGN0;
DRAWTEXT(巳月,LOW*0.96,'巳'),COLORMAGENTA,ALIGN0;
DRAWTEXT(午月,LOW*0.96,'午'),COLORMAGENTA,ALIGN0;
DRAWTEXT(未月,LOW*0.96,'未'),COLOR0099FF,ALIGN0;
DRAWTEXT(申月,LOW*0.96,'申'),COLORYELLOW,ALIGN0;
DRAWTEXT(酉月,LOW*0.96,'酉'),COLORYELLOW,ALIGN0;
DRAWTEXT(戌月,LOW*0.96,'戌'),COLOR0099FF,ALIGN0;
DRAWTEXT(亥月,LOW*0.96,'亥'),COLORBLUE,ALIGN0;
DRAWTEXT(子月,LOW*0.96,'子'),COLORBLUE,ALIGN0;
DRAWTEXT(丑月,LOW*0.96,'丑'),COLOR0099FF,ALIGN0;STICKLINE(立春,HIGH,LOW,0.1,1),COLORGREEN;{http://www.cxh99.com}
STICKLINE(立春,OPEN,CLOSE,2,1),linethick1,COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(立春,HIGH*1.02,'立春'),COLORgreen,ALIGN0;
STICKLINE(雨水,HIGH,LOW,0.1,1),COLORGREEN;{http://www.cxh99.com}
STICKLINE(雨水,OPEN,CLOSE,2,1),linethick1,COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(雨水,HIGH*1.02,'雨水'),COLORgreen,ALIGN0;
STICKLINE(惊蛰,HIGH,LOW,0.1,1),COLORGREEN;{http://www.cxh99.com}
STICKLINE(惊蛰,OPEN,CLOSE,2,1),linethick1,COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(惊蛰,HIGH*1.02,'惊蛰'),COLORgreen,ALIGN0;
STICKLINE(春分,HIGH,LOW,0.1,1),COLORGREEN;{http://www.cxh99.com}
STICKLINE(春分,OPEN,CLOSE,2,1),linethick1,COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(春分,HIGH*1.02,'春分'),COLORgreen,ALIGN0;
STICKLINE(清明,HIGH,LOW,0.1,1),COLORGREEN;{http://www.cxh99.com}
STICKLINE(清明,OPEN,CLOSE,2,1),linethick1,COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(清明,HIGH*1.02,'清明'),COLORgreen,ALIGN0;
STICKLINE(谷雨,HIGH,LOW,0.1,1),COLORGREEN;{http://www.cxh99.com}
STICKLINE(谷雨,OPEN,CLOSE,2,1),linethick1,COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(谷雨,HIGH*1.02,'谷雨'),COLORgreen,ALIGN0;
STICKLINE(立夏,HIGH,LOW,0.1,1),COLORMAGENTA;
STICKLINE(立夏,OPEN,CLOSE,2,1),linethick1,COLORMAGENTA;
DRAWTEXT(立夏,HIGH*1.02,'立夏'),COLORMAGENTA,ALIGN0;
STICKLINE(小满,HIGH,LOW,0.1,1),COLORMAGENTA;
STICKLINE(小满,OPEN,CLOSE,2,1),linethick1,COLORMAGENTA;
DRAWTEXT(小满,HIGH*1.02,'小满'),COLORMAGENTA,ALIGN0;
STICKLINE(芒种,HIGH,LOW,0.1,1),COLORMAGENTA;
STICKLINE(芒种,OPEN,CLOSE,2,1),linethick1,COLORMAGENTA;
DRAWTEXT(芒种,HIGH*1.02,'芒种'),COLORMAGENTA,ALIGN0;
STICKLINE(夏至,HIGH,LOW,0.1,1),COLORMAGENTA;
STICKLINE(夏至,OPEN,CLOSE,2,1),linethick1,COLORMAGENTA;
DRAWTEXT(夏至,HIGH*1.02,'夏至'),COLORMAGENTA,ALIGN0;
STICKLINE(小暑,HIGH,LOW,0.1,1),COLORMAGENTA;
STICKLINE(小暑,OPEN,CLOSE,2,1),linethick1,COLORMAGENTA;
DRAWTEXT(小暑,HIGH*1.02,'小暑'),COLORMAGENTA,ALIGN0;
STICKLINE(大暑,HIGH,LOW,0.1,1),COLORMAGENTA;
STICKLINE(大暑,OPEN,CLOSE,2,1),linethick1,COLORMAGENTA;
DRAWTEXT(大暑,HIGH*1.02,'大暑'),COLORMAGENTA,ALIGN0;
STICKLINE(立秋,HIGH,LOW,0.1,1),COLORYELLOW;
STICKLINE(立秋,OPEN,CLOSE,2,1),linethick1,COLORYELLOW;
DRAWTEXT(立秋,HIGH*1.02,'立秋'),COLORYELLOW,ALIGN0;
STICKLINE(处暑,HIGH,LOW,0.1,1),COLORYELLOW;
STICKLINE(处暑,OPEN,CLOSE,2,1),linethick1,COLORYELLOW;
DRAWTEXT(处暑,HIGH*1.02,'处暑'),COLORYELLOW,ALIGN0;
STICKLINE(白露,HIGH,LOW,0.1,1),COLORYELLOW;
STICKLINE(白露,OPEN,CLOSE,2,1),linethick1,COLORYELLOW;
DRAWTEXT(白露,HIGH*1.02,'白露'),COLORYELLOW,ALIGN0;
STICKLINE(秋分,HIGH,LOW,0.1,1),COLORYELLOW;
STICKLINE(秋分,OPEN,CLOSE,2,1),linethick1,COLORYELLOW;
DRAWTEXT(秋分,HIGH*1.02,'秋分'),COLORYELLOW,ALIGN0;
STICKLINE(寒露,HIGH,LOW,0.1,1),COLORYELLOW;
STICKLINE(寒露,OPEN,CLOSE,2,1),linethick1,COLORYELLOW;
DRAWTEXT(寒露,HIGH*1.02,'寒露'),COLORYELLOW,ALIGN0;
STICKLINE(霜降,HIGH,LOW,0.1,1),COLORYELLOW;
STICKLINE(霜降,OPEN,CLOSE,2,1),linethick1,COLORYELLOW;
DRAWTEXT(霜降,HIGH*1.02,'霜降'),COLORYELLOW,ALIGN0;
STICKLINE(立冬,HIGH,LOW,0.1,1),colorwhite;
STICKLINE(立冬,OPEN,CLOSE,2,1),linethick1,colorwhite;
DRAWTEXT(立冬,HIGH*1.02,'立冬'),COLORWHITE,ALIGN0;
STICKLINE(小雪,HIGH,LOW,0.1,1),colorwhite;
STICKLINE(小雪,OPEN,CLOSE,2,1),linethick1,colorwhite;
DRAWTEXT(小雪,HIGH*1.02,'小雪'),COLORWHITE,ALIGN0;
STICKLINE(大雪,HIGH,LOW,0.1,1),colorwhite;
STICKLINE(大雪,OPEN,CLOSE,2,1),linethick1,colorwhite;
DRAWTEXT(大雪,HIGH*1.02,'大雪'),COLORWHITE,ALIGN0;
STICKLINE(冬至,HIGH,LOW,0.1,1),colorwhite;
STICKLINE(冬至,OPEN,CLOSE,2,1),linethick1,colorwhite;
DRAWTEXT(冬至,HIGH*1.02,'冬至'),COLORWHITE,ALIGN0;
STICKLINE(小寒,HIGH,LOW,0.1,1),colorwhite;
STICKLINE(小寒,OPEN,CLOSE,2,1),linethick1,colorwhite;
DRAWTEXT(小寒,HIGH*1.02,'小寒'),COLORWHITE,ALIGN0;
STICKLINE(大寒,HIGH,LOW,0.1,1),colorwhite;
STICKLINE(大寒,OPEN,CLOSE,2,1),linethick1,colorwhite;
DRAWTEXT(大寒,HIGH*1.02,'大寒'),COLORWHITE,ALIGN0;
M3:MA(CLOSE,3),ColorFFFfff;
M5:MA(CLOSE,5),ColorFFff00;
m7:ma(c,7);
m14:ma(c,14),POINTDOT,linethick3;
m28:ma(c,28),POINTDOT,linethick3;
m49:ma(c,49);
m64:ma(c,64);
m98:ma(c,98);
E1:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
B0:=(AH-AL)/40;
KB1:=H+B0;
KB2:=L-B0;
STICKLINE((E1+0)/34=FLOOR((E1+0)/34),KB2,KB2-0.8*B0,1,0),COLORYELLOW,LINETHICK3;
DRAWTEXT((E1+0)/34=FLOOR((E1+0)/34),KB2-B0,'满窗'),ALIGN0,COLORYELLOW;STICKLINE((E1+0)/17=FLOOR((E1+0)/17),KB2,KB2-0.8*B0,1,0),COLORYELLOW,LINETHICK3;
DRAWTEXT((E1+0)/17=FLOOR((E1+0)/17),KB2-B0,'半窗'),ALIGN0,COLORYELLOW;

{程序化交易 www.cxh99.com }

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容