急求老师把以下大智慧的螺旋历法的指标转换为通达信的

{螺旋历法}n:=8;A:=COUNT(C,0)=1;B:=BARSLAST(A)/N;正弦值:SIN(B);STICKLINE( SIN(B)>=0.99, 0,1 ,10 , 0),colorff00ff;STICKLINE( SIN(B)<-0.99, 0,-1 ,10 , 0),colorff00ff;e:=COUNT(C,0)=1;d:=BARSLAST(e)/13;SIN(d);f:=COUNT(C,0)=1;g:=BARSLAST(f)/21;SIN(g);0;
{n 1 999 10};
立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2);
雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2);
惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2);

第1个回答  2019-05-20

大智慧和通达信代码有区别,这公式涉及到上市总交易天数.这个数值大智慧和通达信算法不同,所以指标肯能会有差异.

N:=8;
B:=BARSCOUNT(CLOSE)/N;
正弦值:SIN(B);
STICKLINE(SIN(B)>=0.99, 0,1 ,10 , 0),COLORFF00FF;
STICKLINE(SIN(B)<-0.99, 0,-1 ,10 , 0),COLORFF00FF;
E:=COUNT(C,0)=1;
D:=BARSCOUNT(CLOSE)/13;
SIN(D);
F:=COUNT(C,0)=1;
G:=BARSCOUNT(CLOSE)/21;
SIN(G);
0;
{N 1 999 10};
立春:=FILTER(MONTH=2 AND (DAY=3 OR DAY=5 ),2);
雨水:=FILTER(MONTH=2 AND (DAY=18 OR DAY=20),2);
惊蛰:=FILTER(MONTH=3 AND (DAY=5 OR DAY=7 ),2);
春分:=FILTER(MONTH=3 AND (DAY=20 OR DAY=22),2);
清明:=FILTER(MONTH=4 AND (DAY=4 OR DAY=6 ),2);
谷雨:=FILTER(MONTH=4 AND (DAY=19 OR DAY=21),2);
立夏:=FILTER(MONTH=5 AND (DAY=6 OR DAY=8 ),2);
小满:=FILTER(MONTH=5 AND (DAY=20 OR DAY=22),2);
芒种:=FILTER(MONTH=6 AND (DAY=5 OR DAY=7 ),2);
夏至:=FILTER(MONTH=6 AND (DAY=20 OR DAY=22),2);
小暑:=FILTER(MONTH=7 AND (DAY=6 OR DAY=8 ),2);
大署:=FILTER(MONTH=7 AND (DAY=22 OR DAY=24),2);
立秋:=FILTER(MONTH=8 AND (DAY=7 OR DAY=9 ),2);
处暑:=FILTER(MONTH=8 AND (DAY=22 OR DAY=24),2);
白露:=FILTER(MONTH=9 AND (DAY=7 OR DAY=9 ),2);
秋分:=FILTER(MONTH=9 AND (DAY=22 OR DAY=24),2);
寒露:=FILTER(MONTH=10 AND (DAY=7 OR DAY=9 ),2);
霜降:=FILTER(MONTH=10 AND (DAY=22 OR DAY=24),2);
立冬:=FILTER(MONTH=11 AND (DAY=7 OR DAY=9 ),2);
小雪:=FILTER(MONTH=11 AND (DAY=22 OR DAY=24),2);
大雪:=FILTER(MONTH=12 AND (DAY=6 OR DAY=8 ),2);
冬至:=FILTER(MONTH=12 AND (DAY=21 OR DAY=23),2);
小寒:=FILTER(MONTH=1 AND (DAY=5 OR DAY=7 ),2);
大寒:=FILTER(MONTH=1 AND (DAY=19 OR DAY=22 ),2);
VARA2:=DRAWTEXT(雨水,0.5,'雨 水');
VARA3:=DRAWTEXT(惊蛰,-0.5,'惊 蛰');
VARA4:=DRAWTEXT(春分,0.5,'春 分');
VARA5:=DRAWTEXT(清明,-0.5,'清 明');
VARA6:=DRAWTEXT(谷雨,0.5,'谷 雨');
VARA8:=DRAWTEXT(小满,-0.5,'小 满');
VARA9:=DRAWTEXT(芒种,0.5,'芒 种');
VARA10:=DRAWTEXT(夏至,-0.5,'夏 至');
VARA11:=DRAWTEXT(小暑,0.5,'小 暑');
VARA12:=DRAWTEXT(大署,-0.5,'大 署');
VARA14:=DRAWTEXT(处暑,0.5,'处 暑');
VARA15:=DRAWTEXT(白露,-0.5,'白 露');
VARA16:=DRAWTEXT(秋分,0.5,'秋 分');
VARA17:=DRAWTEXT(寒露,-0.5,'寒 露');
VARA18:=DRAWTEXT(霜降,0.5,'霜 降');
VARA20:=DRAWTEXT(小雪,-0.5,'小 雪');
VARA21:=DRAWTEXT(大雪,0.5,'大 雪');
VARA22:=DRAWTEXT(冬至,-0.5,'冬 至');
VARA23:=DRAWTEXT(小寒,0.5,'小 寒');
VARA24:=DRAWTEXT(大寒,-0.5,'大 寒');
VARA2,COLORYELLOW,LINETHICK2;
VARA3,COLORYELLOW,LINETHICK2;
VARA4,COLORYELLOW,LINETHICK2;
VARA5,COLORYELLOW,LINETHICK2;
VARA6,COLORYELLOW,LINETHICK2;
VARA8,COLORYELLOW,LINETHICK2;
VARA9,COLORYELLOW,LINETHICK2;
VARA10,COLORYELLOW,LINETHICK2;
VARA11,COLORYELLOW,LINETHICK2;
VARA12,COLORYELLOW,LINETHICK2;
VARA14,COLORYELLOW,LINETHICK2;
VARA15,COLORYELLOW,LINETHICK2;
VARA16,COLORYELLOW,LINETHICK2;
VARA17,COLORYELLOW,LINETHICK2;
VARA18,COLORYELLOW,LINETHICK2;
VARA20,COLORYELLOW,LINETHICK2;
VARA21,COLORYELLOW,LINETHICK2;
VARA22,COLORYELLOW,LINETHICK2;
VARA23,COLORYELLOW,LINETHICK2;
VARA24,COLORYELLOW,LINETHICK2;
STICKLINE(雨水 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(惊蛰 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(春分 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(清明 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(谷雨 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(小满 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(芒种 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(夏至 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(小暑 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(大署 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(处暑 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(白露 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(秋分 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(寒露 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(霜降 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(小雪 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(大雪 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(冬至 ,0 ,-0.5 ,1 , 0),COLORRED;
STICKLINE(小寒 ,0 ,0.5 ,1 , 0),COLORRED;
STICKLINE(大寒 ,0 ,-0.5 ,1 , 0),COLORRED;
DRAWTEXT(立春,0,'●立春'),COLORYELLOW;
DRAWTEXT(立夏,0,'●立夏'),COLOR0000FF;
DRAWTEXT(立秋,0,'●立秋'),COLOR00FFFF;
DRAWTEXT(立冬,0,'●立冬'),COLOR0000FF;

本回答被提问者采纳
相似回答