好文档 - 专业文书写作范文服务资料分享网站

同花顺公式函数手册

天下 分享 时间: 加入收藏 我要投稿 点赞

同花顺函数参考手册

目 录

1、通用数据..................................................................................................................................... 1

CLOSE 收盘价 .......................................................................................................................... 1 CODE 证券代码 ....................................................................................................................... 1 CODETYPE 商品类型 ................................................................................................................ 1 DATETIME 显示时间 ................................................................................................................ 1 INVOL 内盘成交量 .................................................................................................................. 1 MONEY 成交金额 .................................................................................................................... 2 NEW 最近一笔成交价 ............................................................................................................. 2 NEWVOL 最近一笔成交量 ...................................................................................................... 2 OPEN 开盘价 ........................................................................................................................... 2 PRE 前收盘 .............................................................................................................................. 2 VALIDBEGIN 区间起始时间 ..................................................................................................... 2 VALIDEND 区间终止时间 ........................................................................................................ 3 VOL总手 ................................................................................................................................... 3 ZQMC 证券名称....................................................................................................................... 3 2、大盘函数..................................................................................................................................... 3

INDEXDATA(“N”,&X,K) 大盘数据 ...................................................................................... 3 3、字符串函数 ................................................................................................................................. 3

STRFIND(STRING,SUBSTRING,N) 子串查找 ............................................................................. 3 STRLEFT(STRING,N) 字符串左部 ............................................................................................. 4 STRMID(STRING,N,M) 字符串中部 ......................................................................................... 4 TOSTRING(X,N) 转换为字符串 ................................................................................................ 4 3、绘图函数..................................................................................................................................... 4

DRAWBMP(COND,PRICE,BMPFILE) 位图绘制 ......................................................................... 4

i

DRAWGBK(COND,COLOR) 区域背景填充 ............................................................................... 5 DRAWGBKLAST(COND,COLOR) 最后一根K线背景填充 ....................................................... 5 DRAWICON(COND,PRICE,TYPE) 绘制小图标 ........................................................................ 6 DRAWLINE(COND1,PRICE1,COND2,PRICE2,EXPAND) 绘制直线 ............................................. 6 DRAWTEXT(COND,PRICE,TEXT) 绘制文字 ............................................................................... 6 FILLRGN(PRICE1,PRICE2,COND1,COLOR1,COND2,COLOR2...) 条件区域填充 ........................ 7 HORLINE(COND,PRICE,TYPE,EXTEND) 绘制水平线 ................................................................. 7 PARTLINE(PRICE,COND1,COLOR1,COND2,COLOR2...) 条件画线 ............................................ 7 POLYLINE(COND,PRICE) 绘制折线 ........................................................................................... 7 RGB(R,G,B) 指定颜色............................................................................................................... 8 STICKLINE(COND,PRICE1,PRICE2,WIDTH,EMPTY) 绘制柱线 ................................................... 8 STRIP(RGB1,RGB2,DIR 描述渐变色 ......................................................................................... 8 TIPTEXT(COND,PRICE,TEXT) TIP文字设置 ............................................................................ 9 VERTLINE(COND,TYPE) 绘制垂直线 ........................................................................................ 9 ZIGLINE(COND,PRICE) 绘制锯齿线 .......................................................................................... 9 4、财务函数..................................................................................................................................... 9

getreptype(&N) 取当期报表 ................................................................................................... 9 LASTREP(&N,K) 调用报表数据 .............................................................................................. 10 MIDREP(&N,K,L) 调用中期报表数据 .................................................................................... 10 QUARTERREP(&N,K,L) 调用季报数据 ................................................................................... 10 REP(&N,K) 调用最近一次报表数据项 .................................................................................. 10 REPDATE(&参数1,参数2,参数3) 取报表日期 .................................................................... 10 YEARREP(&N,K) 调用年报数据项 ......................................................................................... 11 5、板块函数................................................................................................................................... 11

BLOCKAVG(&N) 求板块里某一数据项的平均值 ................................................................. 11 BLOCKLEAD(&X,&Y) 取板块指数的所属个股中数据X最大的股票的数据Y .................... 11

ii

BLOCKMAX(&N) 求板块里某一数据项的最大值 ................................................................. 11 BLOCKSUM(&N) 求板块里某一数据项的和 ......................................................................... 11 INBLOCK('BLOCK') 判断当前代码是否属于某个板块 .......................................................... 12 6、指标函数................................................................................................................................... 12

CM(0,1,2,0) 画成交分布云 .................................................................................................... 12 COST(10) 成本分布情况 ........................................................................................................ 12 FLATZIG(K,N,ABS) 归一化之字转向 ...................................................................................... 12 PEAK(K,N,M,ABS) 前M个ZIG转向波峰值 .......................................................................... 13 PEAKBARS(K,N,M,ABS) 前M个ZIG转向波峰到当前距离 ................................................. 13 PWINNER(10,CLOSE) 远期获利盘比例 ................................................................................. 13 SAR(N,S,M) 抛物转向 ............................................................................................................ 14 含义:计算抛物转向。 ......................................................................................................... 14 TROUGH(K,N,M,ABS) 前M个ZIG转向波谷值 .................................................................... 14 TROUGHBARS(K,N,M,ABS) 前M个ZIG转向波谷到当前距离............................................ 14 WINNER(CLOSE) 获利盘比例 ................................................................................................ 15 ZIG(K,N) 转向 ......................................................................................................................... 15 6、统计函数................................................................................................................................... 15

AVEDEV(X,N) 平均绝对偏差 ................................................................................................. 15 CORREL(X,Y,N) 相关系数 ....................................................................................................... 15 COVAR(X,Y,N) 协方差 ............................................................................................................ 16 DEVSQ(X,N) 偏差平方和 ....................................................................................................... 16 FORCAST(X,N) 线性回归预测值 ............................................................................................ 16 KURT(X,N) 数据集的峰值 ...................................................................................................... 16 SKEW(X,N) 偏斜度 ................................................................................................................. 16 SLOPE(X,N) 线性回归斜率 .................................................................................................... 16 STD(X,N) 标准差 .................................................................................................................... 17

iii

STDP(X,N) 总体标准差 .......................................................................................................... 17 VAR(X,N) 样本方差 ................................................................................................................ 17 VARP(X,N) 总体样本方差 ...................................................................................................... 17 7、算术函数................................................................................................................................... 17

ABS(X) 绝对值 ........................................................................................................................ 17 BETWEEN(A,B,C) 介于两数之间 ............................................................................................ 17 CROSS(A,B) 两条线交叉 ........................................................................................................ 18 ISNULL(A) 是否为空 ............................................................................................................... 18 LONGCROSS(A,B,N) 两条线维持一定周期后交叉 ............................................................... 18 MOD(A,B) 求模 ...................................................................................................................... 18 NOT(X) 求逻辑非 ................................................................................................................... 18 POW(X,Y)求幂 ................................................................................................................... 18 RANGE(A,B,C) 介于某个范围之内 ........................................................................................ 19 REVERSE(X) 求相反数 ............................................................................................................ 19 SQRT(X) 平方根 ..................................................................................................................... 19 8、引用函数................................................................................................................................... 19

BACKSET(X,N) 将当前位置到若干周期前的数据设为X ..................................................... 19 BARSCOUNT(X) 求总的周期数 .............................................................................................. 19 BARSLAST(X) 上一次条件成立到当前的周期数 .................................................................. 19 BARSSINCE(X) 统计第一个条件成立到当前的周期数 ........................................................ 20 COUNT(X,N) 统计满足条件的周期数 ................................................................................... 20 DMA(X,A) 求动态移动平均 ................................................................................................... 20 EMA(X,N) 求指数平滑移动平均 ........................................................................................... 20 FILTER(X,N) 过滤连续出现的信号 ........................................................................................ 20 HHV(X,N) 求最高值 ............................................................................................................... 20 HHVBARS(X,N) 求上一高点到当前的周期数 ....................................................................... 21

iv

同花顺公式函数手册

同花顺函数参考手册1目录1、通用数据.................................................................................................................
推荐度:
点击下载文档文档为doc格式
7ttmw4adtd02ra71xnbr
领取福利

微信扫码领取福利

微信扫码分享