通达信心师主图指标公式源码

M1:=5;
M2:=10;
M3:=20;
M4:=30;
M5:=60;
M6:=120;
M7:=200;
M8:=250;
M9:=350;
M10:=500;
{季}
JD:=MONTH=1 OR MONTH=4 OR MONTH=7 OR MONTH=10;
JA:=JD AND DAY<REF(DAY,1);
JT:=BARSLAST(JA);
{月}
DAYS:=DATETODAY(DATE)-DAY;
YZ:=((DAYS-REF(DAYS,1))>(MONTH-REF(MONTH,1))) OR BARSCOUNT(C)=1;
YT:=BARSLAST(YZ);
{周}
ZN1:=INTPART(((YEAR-1970)-2)/4);
F:=((YEAR-1970)-2)-ZN1*4;
XX1:=IF(MONTH>=3 AND F>=1,2,IF(MONTH>=3 AND F=0,1,0));
YS2:=IF(MONTH=2 OR MONTH=3,1,IF(MONTH=4 OR MONTH=5,2,IF(MONTH=6 OR MONTH=7,3,IF(MONTH=8,4,IF(MONTH=9 OR MONTH=10,5,IF(MONTH=11 OR MONTH=12,6,0))))))-XX1;
X:=IF(F=0,1,0);
DAYS1970:=(YEAR-1970)*365+ZN1+(MONTH-1)*30+YS2+DAY-X;
ZZ:=((DAYS1970-REF(DAYS1970,1))>(WEEkdAY-REF(WEEKDAY,1))) OR BARSCOUNT(C)=1;
ZT:=BARSLAST(ZZ);
前1季:=REF(C,JT+1);
前1月:=REF(C,YT+1);
前1周:=REF(C,ZT+1);
{DAYS:=DATETODAY(DATE)-DAY;
YZ:=((DAYS-REF(DAYS,1))>(MONTH-REF(MONTH,1))) OR BARSCOUNT(C)=1;
YT:=BARSLAST(YZ);}
YAA:=REF(C,YT+1);
YHH:=MAX(C,YAA);
YLL:=MIN(C,YAA);
YYY:=REF(C,1)>REF(YLL,1);
YYD:=REF(C,1)<REF(YHH,1);
STICKLINE(C>=YAA,YLL,YHH,3,0),COLORRED;
STICKLINE(C<YAA,YLL,YHH,3,0),COLOR008000;
STICKLINE(YYY AND C>=REF(YAA,1),YLL,YHH,3,0),COLORRED;
STICKLINE(YYY AND C<REF(YAA,1),YHH,REF(YAA,1),3,0),COLORRED;
STICKLINE(YYY AND C<REF(YAA,1),REF(YAA,1),C,3,0),COLOR008000;
STICKLINE(YYD AND C<=REF(YAA,1),YLL,YHH,3,0),COLOR008000;
STICKLINE(YYD AND C>REF(YAA,1),YLL,REF(YAA,1),3,0),COLOR008000;
STICKLINE(YYD AND C>REF(YAA,1),REF(YAA,1),C,3,0),COLORRED;
{JD:=MONTH=1 OR MONTH=4 OR MONTH=7 OR MONTH=10;
JA:=JD AND DAY<REF(DAY,1);
JT:=BARSLAST(JA);}
JAA:=REF(C,JT+1);
JHH:=MAX(C,JAA);
JLL:=MIN(C,JAA);
JZY:=REF(C,1)>REF(JLL,1);
JZD:=REF(C,1)<REF(JHH,1);
STICKLINE(C>=JAA,JLL,JHH,3,0),COLORRED;
STICKLINE(C<JAA,JLL,JHH,3,0),COLOR008000;
STICKLINE(JZY AND C>=REF(JAA,1),JLL,JHH,3,0),COLORRED;
STICKLINE(JZY AND C<REF(JAA,1),JHH,REF(JAA,1),3,0),COLORRED;
STICKLINE(JZY AND C<REF(JAA,1),REF(JAA,1),C,3,0),COLOR008000;
STICKLINE(JZD AND C<=REF(JAA,1),JLL,JHH,3,0),COLOR008000;
STICKLINE(JZD AND C>REF(JAA,1),JLL,REF(JAA,1),3,0),COLOR008000;
STICKLINE(JZD AND C>REF(JAA,1),REF(JAA,1),C,3,0),COLORRED;
周收1:=C#WEEK;
STICKLINE(周收1>=前1周 AND PERIOD<=5,前1周,周收1,2.5,0),COLOR600060;
STICKLINE(周收1/前1周>=1.09 AND PERIOD<=5,前1周,周收1,2.5,0),COLORFF0080;
STICKLINE(周收1<前1周 AND PERIOD<=5,前1周,周收1,2.5,0),COLOR006600;
STICKLINE(周收1/前1周<=0.9 AND PERIOD<=5,前1周,周收1,2.5,0),COLOR003F00;
JC:=REF(C,JT+1);
JH:=H#SEASON;
NOTEXT0:IF(JH>JC*1.0,JC*1.0,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT1:IF(JH>JC*1.1,JC*1.1,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT2:=IF(JH>JC*1.2,JC*1.2,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT3:IF(JH>JC*1.3,JC*1.3,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT4:IF(JH>JC*1.4,JC*1.4,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT5:IF(JH>JC*1.5,JC*1.5,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT6:=IF(JH>JC*1.6,JC*1.6,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT7:IF(JH>JC*1.7,JC*1.7,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT8:IF(JH>JC*1.8,JC*1.8,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT9:IF(JH>JC*1.9,JC*1.9,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT10:=IF(JH>JC*2.0,JC*2.0,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT11:IF(JH>JC*2.1,JC*2.1,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT12:IF(JH>JC*2.2,JC*2.2,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT13:IF(JH>JC*2.3,JC*2.3,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT14:IF(JH>JC*2.4,JC*2.4,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT15:=IF(JH>JC*2.5,JC*2.5,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT16:IF(JH>JC*2.6,JC*2.6,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT17:IF(JH>JC*2.7,JC*2.7,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT18:IF(JH>JC*2.8,JC*2.8,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT19:IF(JH>JC*2.9,JC*2.9,DRAWNULL),DOTLINE,COLOR808080;
NOTEXT20:IF(JH>JC*3.0,JC*3.0,DRAWNULL),DOTLINE,COLOR808080;
TT:=JT;
DRAWTEXT(TT=1,NOTEXT0,'0%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT1,'10%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT2,'20%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT3,'30%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT4,'40%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT5,'50%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT6,'60%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT7,'70%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT8,'80%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT9,'90%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT10,'100%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT11,'110%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT12,'120%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT13,'130%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT14,'140%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT15,'150%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT16,'160%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT17,'170%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT18,'180%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT19,'190%'),COLORWHITE;
DRAWTEXT(TT=1,NOTEXT20,'200%'),COLORWHITE;
STICKLINE(MONTH!=REF(MONTH,1)=1 AND crOSS(JA,0.5)!=REF(CROSS(JA,0.5),1)=1 AND PERIOD=5,CONST(HHV(H,0)),CONST(LLV(L,0)),0,0),COLORFF00FF;
STICKLINE(C>=O,H,L,0,0),COLORYELLOW;
STICKLINE(C>=O,O,C,2.8,0),COLOR0096FF;
STICKLINE(C>=O,O,C,2.4,0),COLOR00A5FF;
STICKLINE(C>=O,O,C,2.0,0),COLOR00B4FF;
STICKLINE(C>=O,O,C,1.6,0),COLOR00C3FF;
STICKLINE(C>=O,O,C,1.2,0),COLOR00D2FF;
STICKLINE(C>=O,O,C,0.8,0),COLOR00E1FF;
STICKLINE(C>=O,O,C,0.4,0),COLOR00F0FF;
{}
STICKLINE(C<O,H,L,0,0),COLORFFCC00;
STICKLINE(C<O,C,O,2.8,0),COLOR996700;
STICKLINE(C<O,C,O,2.4,0),COLORAA7800;
STICKLINE(C<O,C,O,2.0,0),COLORBB9900;
STICKLINE(C<O,C,O,1.6,0),COLORCCAA00;
STICKLINE(C<O,C,O,1.2,0),COLORDDBB00;
STICKLINE(C<O,C,O,0.8,0),COLOREECC00;
STICKLINE(C<O,C,O,0.4,0),COLOREFDD00;
STICKLINE(C>0,MAX(YAA,JAA),MAX(YAA,JAA)*1.001,3,0),COLORWHITE;



未来函数检测结果如下:
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图