股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[飞狐] 半月线


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-25 14:43:14

以下是半月线

DRAWGBK(1,COLORRGB(20,20,110),COLORRGB(0,0,50),1);
TBS:=POW(10,ABS(LOG(MINDIFF)));
//半月线
YB:=MOD(DAY,15)<REF(MOD(DAY,15),1)ORDATETOD1970(DATE)-REF(DATETOD1970(DATE),1)>14ORBARPOS=1;
w:BARSLAST(YB),LINETHICK;
dg:=w=0orISLASTBAR;
wx:=0*C;
forP=datacount-1downtolbound(dg)do
ifdg[P]then
wx[P]:=0;
else
wx[P]:=wx[P+1]+1;
r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;
wx:=refx(wx,1)+r,LINETHICK;
oo:=ref(o,w);
hh:=hhv(h,w+1);
LL:=LLv(L,w+1);
半月开:ROUND(OO*TBS)/TBS,LINETHICK;
半月高:ROUND(refx(hh,wx)*TBS)/TBS,LINETHICK;
半月低:ROUND(refx(LL,wx)*TBS)/TBS,LINETHICK;
半月收:ROUND(refx(c,wx)*TBS)/TBS,LINETHICK;

上半月收:=REF(半月收,W+1),LINETHICK;
半月涨幅:半月收/上半月收*100-100,LINETHICK,COLORFFFFFF;
f:=半月收>半月开or(半月收=半月开and半月收>ref(半月收,W));
j:=cross(w,wx);
STICKLINE(w>=0andfANDNOT(YBORREFX(YB,1)),半月低,半月高,20,0),COLORMAGENTA;
STICKLINE(w>=0andnot(f)ANDNOT(YBORREFX(YB,1)),半月低,半月高,20,0)COLORFFDD00;{}
P:=BARPOS;
DRAWTEXT(w>0andjANDDAY<15,半月高*1.01,'月上半月'),COLOR00CCFF,ALIGN1;
DRAWTEXT(w>0andjANDDAY>15,半月高*1.01,'月下半月'),COLOR00CCFF,ALIGN1;
DRAWNUMBER(w>0andj,半月高*1.01,MONTH,0),COLOR00CCFF,ALIGN2;


//日线
TJ:=CLOSE>OPENorCLOSE=OPENandCLOSE>REF(CLOSE,1);
STICKLINE(TJ,LOW,HIGH,1,0),ColorE9;
STICKLINE(TJ,LOW,CLOSE,8,0),Color80;
STICKLINE(TJ,LOW,CLOSE,6,0),ColorA5;
STICKLINE(TJ,LOW,CLOSE,4,0),ColorC0;
STICKLINE(TJ,LOW,CLOSE,2,0),ColorE6;

STICKLINE(NOT(TJ),HIGH,LOW,1,0),ColorAA00;
STICKLINE(NOT(TJ),CLOSE,OPEN,8,0),Color5000;
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),Color6600;
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),Color8000;
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),ColorA000;




回复

举报

QQ|

GMT+8, 2024-11-16 00:37

快速回复 返回顶部 返回列表