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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信富力彩K通道主图源码


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

以下是通达信富力彩K通道主图源码

E:=(HIGH+LOW+OPEN+2*CLOSE)/5;
明日阻力:=2*E-LOW,NODRAW;
明日支撑:=2*E-HIGH;
明日突破:=E+(HIGH-LOW);
明日反转:=E-(HIGH-LOW);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);

DRAWTEXT_FIX(ISLASTBAR,0.6,0.05,0, '【动态读盘(元)】'),COLOR767676;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.1,0,'明日阻力'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.1,0,明日阻力),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.15,0,'明日支撑'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.15,0,明日支撑),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.2,0,'明日突破'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.2,0,明日突破),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.25,0,'明日反转'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.25,0,明日反转),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.3,0,'今日阻力'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.3,0,今日阻力),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.35,0,'今日支撑'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.35,0,今日支撑),COLOR545454;

DRAWTEXT_FIX(1,0.04,0.04,0, '【动态读盘(手)】'),COLORFFFF00;
DRAWTEXT_FIX(1,0.01,0.08,0,'当日买卖量='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.15,0,'日主动买量='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.22,0,'日主动卖量='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.29,0,'当日买卖比='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.36,0,'买入累计万元: '),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.43,0,'卖出累计万元: '),COLOR6B8E23;
AAAA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,AAAA*(HIGH-LOW),IF(CLOSE<OPEN,AAAA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,AAAA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,AAAA*(HIGH-LOW),VOL/2));
买卖比:=主动买盘/主动卖盘;
WJ:=(HIGH+LOW+CLOSE)/3;
VD1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
VD2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-WJ);
VD3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
VD4:=IF(HIGH=LOW,1,WJ-MIN(CLOSE,OPEN));
VD5:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
VD6:=(VD1*VD5);
VD7:=(VD2*VD5);
VD8:=(VD3*VD5);
VD9:=(VD4*VD5);
买入量:=(VD9+VD8);
卖出量:=(VD6+VD7);
买入资金:=买入量*CLOSE/100;
卖出资金:=卖出量*CLOSE/100;
DRAWNUMBER_FIX(1,0.11,0.08,0,CONST(VOL)),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.11,0.15,0,CONST(主动买盘)),COLORFF00FF;
DRAWNUMBER_FIX(1,0.11,0.22,0,CONST(主动卖盘)),COLORFFFFFF;
DRAWNUMBER_FIX(1,0.11,0.29,0,CONST(买卖比)),COLOR00FF00;
DRAWNUMBER_FIX(1,0.11,0.36,0,CONST(买入资金)),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.11,0.43,0,CONST(卖出资金)),COLORRED;

Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR656565;
HAN:=DATE<1141230;
当前获利筹码:=IF(WINNER(CLOSE),WINNER(CLOSE)*100,0);
DRAWKLINE(H,O,L,C);
九十成本集中:=(COST(95)-COST(5))/(COST(95)+COST(5))*100;
成本价:COST(九十成本集中),LINETHICK2,POINTDOT,COLORFFFFFF;
入1:IF(成本价>REF(成本价,1),成本价,DRAWNULL),COLORFFFFFF,POINTDOT,LINETHICK2;
出1:IF(成本价<REF(成本价,1),成本价,DRAWNULL),COLORFFFFFF,POINTDOT,LINETHICK2;


DIR2:=ABS(CLOSE-REF(CLOSE,30));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),30);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
M熊:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;
牛熊:=M熊;
M震:IF(M熊/REF(M熊,1)>0.997,M熊,DRAWNULL),COLORBLUE,LINETHICK2;
M牛:IF(M熊/REF(M熊,1)>1.001,M熊,DRAWNULL),COLORRED,LINETHICK2;
XX1:=C>牛熊 AND 牛熊>REF(牛熊,1);
DRAWTEXT_FIX(ISLASTBAR AND XX1,0,0.01,0,'【处于牛区】'),COLORRED;
XX2:=C<牛熊 AND 牛熊<=REF(牛熊,1);
DRAWTEXT_FIX(ISLASTBAR AND XX2,0,0.01,0,'【处于熊区】'),COLORGREEN;


FD:=(H-L)/3;{分段}
OPEN1:=O>FD*2+L;
OPEN3:=O<FD+L;
OPEN2:=NOT(OPEN1 OR OPEN3);
CLOSE1:=C>FD*2+L;
CLOSE3:=C<FD+L;
CLOSE2:=NOT(CLOSE1 OR CLOSE3);
DFZD:=CLOSE1 OR (OPEN3 AND CLOSE2);
WQS1:=OPEN2 AND CLOSE2;
KFZD:=NOT(DFZD OR WQS1);
ZD:=(H+L)/2;
QSXS:=ZD>REF(H,1);
QSXX:=ZD<REF(L,1);
WQS2:=NOT(QSXS OR QSXX);
S1:=DFZD AND QSXS ;
S2:=KFZD AND QSXX ;
S3:=DFZD AND QSXX;
S4:=KFZD AND QSXS;
S5:=DFZD AND WQS2;
S6:=KFZD AND WQS2;
S7:=WQS1 AND (QSXS OR QSXX OR WQS2);
STICKLINE(S2 ,C ,O,3,0 ),COLORFF2020;
STICKLINE(S1,C,O,3 ,0 ),COLOR2020FF;
STICKLINE(S3,C,O,3,0),COLORYELLOW;
STICKLINE(S4,C,O,3,0),COLORCYAN;
STICKLINE(S5,C,O,3,0),COLORMAGENTA;
STICKLINE(S6,C,O,3,0),COLORGREEN;
STICKLINE(S7,C,O,3,0),COLORGRAY;
STICKLINE(1,C,O,0,0),COLORWHITE;
M13:MA(CLOSE,13),LINETHICK1,COLOREBC79E;

金底:MA(C,13)*0.78,DOTLINE,COLOR00FFFF;
银底:MA(C,13)*0.84,DOTLINE,COLORCCCCCC;
铁底:MA(C,13)*0.9,DOTLINE,COLOR999966;
玉顶:MA(C,13)*1.1,DOTLINE,COLORCCCC00;
翡顶:MA(C,13)*1.16,DOTLINE,COLOR00FF00;
钻顶:MA(C,13)*1.22,DOTLINE,COLORRED;





回复

举报

QQ|

GMT+8, 2024-11-27 18:28

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