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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] XMA 偏移移动平均函数的大智慧表达式


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-22 17:22:16
XMA 偏移移动平均函数的大智慧表达式介绍

XMA 偏移移动平均函数的大智慧表达式

XMA-----偏移移动平均函数的大智慧表达式


INPUT:N(7,1,50);
DATACOUNT:=HHVALL(HHV(BARPOS,COUNT(C,0)));
P:=(DATACOUNT-BARPOS+1);
XMA:IF(P=1,"REFX@REFX"(MA(CLOSE,N/2+1),N/2),
IF(P=2 AND N>1,"REFX@REFX"(MA(CLOSE,N/2+2),N/2),
IF(P=3 AND N>4,"REFX@REFX"(MA(CLOSE,N/2+3),N/2),
IF(P=4 AND N>6,"REFX@REFX"(MA(CLOSE,N/2+4),N/2),
IF(P=5 AND N>8,"REFX@REFX"(MA(CLOSE,N/2+5),N/2),
IF(P=6 AND N>10,"REFX@REFX"(MA(CLOSE,N/2+6),N/2),
IF(P=7 AND N>12,"REFX@REFX"(MA(CLOSE,N/2+7),N/2),
IF(P=8 AND N>14,"REFX@REFX"(MA(CLOSE,N/2+8),N/2),
IF(P=9 AND N>16,"REFX@REFX"(MA(CLOSE,N/2+9),N/2),
IF(P=10 AND N>18,"REFX@REFX"(MA(CLOSE,N/2+10),N/2),
IF(P=11 AND N>20,"REFX@REFX"(MA(CLOSE,N/2+11),N/2),
IF(P=12 AND N>22,"REFX@REFX"(MA(CLOSE,N/2+12),N/2),
IF(P=13 AND N>24,"REFX@REFX"(MA(CLOSE,N/2+13),N/2),
IF(P=14 AND N>26,"REFX@REFX"(MA(CLOSE,N/2+14),N/2),
IF(P=15 AND N>28,"REFX@REFX"(MA(CLOSE,N/2+15), N/2),
IF(P=16 AND N>30,"REFX@REFX"(MA(CLOSE,N/2+16),N/2),
IF(P=17 AND N>32,"REFX@REFX"(MA(CLOSE,N/2+17),N/2),
IF(P=18 AND N>34,"REFX@REFX"(MA(CLOSE,N/2+18),N/2),
IF(P=19 AND N>36,"REFX@REFX"(MA(CLOSE,N/2+19),N/2),
IF(P=20 AND N>38,"REFX@REFX"(MA(CLOSE,N/2+20),N/2),
IF(P=21 AND N>40,"REFX@REFX"(MA(CLOSE,N/2+21),N/2),
IF(P=22 AND N>42,"REFX@REFX"(MA(CLOSE,N/2+22),N/2),
IF(P=23 AND N>44,"REFX@REFX"(MA(CLOSE,N/2+23),N/2),
IF(P=24 AND N>46,"REFX@REFX"(MA(CLOSE,N/2+24),N/2),
"REFX@REFX"(MA(CLOSE,N),(N+1)/2-1)))))))))))))))))))))))));
 


 




 



gd13441

回复

举报

QQ|

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

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