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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信多空吸抛源码


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

以下是通达信多空吸抛源码

突破:=REF(EMA(C,2),1);
A1X:=(EMA(C,10)-突破)/突破*100;
多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);
空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);
STICKLINE(A1X>=0,多方,突破,10,0),COLOR000099;
STICKLINE(A1X<0,空方,突破,10,0),COLOR00CC66;

APX:=(H+L+C)/3;
TR0:=MAX(H-L,MAX(ABS(H-REF(C,1)),ABS(L-REF(C,1))));
MF0:=C-REF(C,2);
MF1:=REF(MF0,1);
MF2:=REF(MF0,2);
DIRECT1:=BARSLAST(MF0>MF1 AND MF0>MF2);
DIRECT2:=BARSLAST(MF0<MF1 AND MF0<MF2);
DIRECT0:=IF(DIRECT1<DIRECT2,100,-100);
TBP:REF(REF(C,1)+IF(DIRECT0>50,MIN(MF0,MF1),MAX(MF0,MF1)),1);
多头获利:REF(IF(DIRECT0>50,APX*2-L,DRAWNULL),1),NODRAW;
多头停损:REF(IF(DIRECT0>50,APX-TR0,DRAWNULL),1),NODRAW;
空头回补:REF(IF(DIRECT0<-50,APX*2-H,DRAWNULL),1),NODRAW;
空头停损:REF(IF(DIRECT0<-50,APX+TR0,DRAWNULL),1),NODRAW;

CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
通道3:(1+7/100)*DD;
通道4:(1-7/100)*DD,COLORLIRED;
BOLL:=MA(CLOSE,20);
UPPER:=BOLL+2*STD(CLOSE,20);
LOWER:=BOLL-2*STD(CLOSE,20);
EMA1:=EMA(C,77)COLORYELLOW;
EMA2:=EMA(C,99),COLORGREEN;
EMA5:EMA(C,5),COLORWHITE;
EMA21:=EMA(C,21);
EMA34:=EMA(C,34);
EMA60:=MA(C,60);
VAR20:=(2*CLOSE+HIGH+LOW)/4;
VAR30:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR40:=LLV(LOW,5); VAR50:=HHV(HIGH,4);
散户:=EMA((VAR20-VAR40)/(VAR50-VAR40)*100,4)*VAR30;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR30;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←吸'),COLORLIRED;
DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←抛'),COLORGREEN;





回复

举报

QQ|

GMT+8, 2024-11-18 08:32

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