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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[飞狐] 量均线副图源码


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

以下是量均线副图源码

量均线副图源码

NDDX:=10;金额:=amount/100000000,linethick0;
JJDDX:=(HIGH+LOW+CLOSE)/3;
均价:=(2*C+(H-L)/2+L+o)/4;
p:=if(STKTYPE=0,2,3);
价差:=SUM(均价-REF(均价,1),p)/p;
高低价:=IF(HIGH=LOW,4,HIGH-LOW);
QJ0DDX:=VOL/(均价+价差);
QJ1DDX:=IF(CAPITAL=0,QJ0DDX*(JJDDX-MIN(CLOSE,OPEN)),QJ0DDX*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2DDX:=IF(CAPITAL=0,QJ0DDX*(MIN(OPEN,CLOSE)-LOW),QJ0DDX*IF(HIGH=LOW,1,(JJDDX-MIN(CLOSE,OPEN))));
QJ3DDX:=IF(CAPITAL=0,QJ0DDX*(HIGH-MAX(OPEN,CLOSE)),QJ0DDX*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4DDX:=IF(CAPITAL=0,QJ0DDX*(MAX(CLOSE,OPEN)-JJDDX),QJ0DDX*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJDDX)));
大单:=((QJ1DDX+QJ2DDX)-(QJ3DDX+QJ4DDX))/IF(CAPITAL=0,1000000,10000),COLORRED;
交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
日期差:=DATEDIFF(DATE,CURRENTDATE);
预量:IF(BARSTATUS=2 and 日期差=0,VOL/交易分钟数*240,VOL),COLOR00FFFF,LINETHICK0;
{预测量2:IF(BARSTATUS=2,VOL*240/OPENMINUTES(CURRENTTIME),VOL),COLOR00FF00,LINETHICK0;}
STICKLINE(BARSTATUS=2,0,预量,10,1),COLOR00FFFF,LINEDOT;
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0;
主卖:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;
资金异动:VOL/MA(VOL,55)*100,COLORYELLOW,LINETHICK2;
买卖差:=(主买+主卖*1.1),linethick1,colorred;
STICKLINE(VOL,0,VOL,8,1),COLORRED;
STICKLINE(主卖<0 AND C<O,VOL,ABS(主卖),6,0),COLORCYAN;STICKLINE(主买>0,0,主买,6,0),COLORRED;
STICKLINE(主卖<0,0,ABS(主卖),4,0),COLOR007500;
STICKLINE(资金异动>100 ,0,VOL,0.5,0),COLORYELLOW;
成交量比%:主买/VOL*100,COLORWHITE,LINETHICK;
JgV:=(5*V+4*REF(V,1)+3*REF(V,2)+2*REF(V,3)+1*REF(V,4))/(5+4+3+2+1),COLORRED,LINETHICK2;
天:HHV(MA(V,5),43),COLOR7F00FF;
地:=llV(MA(V,5),43),COLORGREEN;
人:MA(V,5),COLORMAGENTA;
和:HHV(MA(V,5),5),COLORWHITE;
PARTLINE(人=和,和),COLORMAGENTA,LINETHICK2;
PARTLINE(人=天,天),COLORYELLOW,LINETHICK2;
MM:=EMA(V,55),COLORCYAN;
xm:=EMA(JgV,55);
I0:=(Ema(MM,3)+Ema(MM,6)+EMA(MM,12)+EMA(MM,24))/4;
I1:=(Ema(xm,3)+Ema(xm,6)+EMA(xm,12)+EMA(xm,24))/4;
生命线:0.5*(I0+I1),LINETHICK2,COLORRED;





回复

举报

QQ|

GMT+8, 2024-11-16 21:34

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