手机版 官方微博
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮助:求出十个输出值的最大值

[通达信]
设置
2008 6 海hhy170 Lv.5 发表于 · 2019-11-10 19:23 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
源码如下:
XA_1:=COST(0.1);
XA_2:=COST(99.900002);
XA_3:=(XA_2-XA_1)/10;
STICKLINE((WINNER(XA_1+XA_3)-WINNER(XA_1))*100>1,XA_1,XA_1+XA_3,3,0),COLOR000066;
STICKLINE((WINNER(XA_1+XA_3*2)-WINNER(XA_1+XA_3))*100>1,XA_1+XA_3,XA_1+XA_3*2,3,0),COLOR5533FF;
STICKLINE((WINNER(XA_1+XA_3*3)-WINNER(XA_1+XA_3*2))*100>1,XA_1+XA_3*2,XA_1+XA_3*3,3,0),COLOR7777FF;
STICKLINE((WINNER(XA_1+XA_3*4)-WINNER(XA_1+XA_3*3))*100>1,XA_1+XA_3*3,XA_1+XA_3*4,3,0),COLORWHITE;
STICKLINE((WINNER(XA_1+XA_3*5)-WINNER(XA_1+XA_3*4))*100>1,XA_1+XA_3*4,XA_1+XA_3*5,3,0),COLORFFCC00;
STICKLINE((WINNER(XA_1+XA_3*6)-WINNER(XA_1+XA_3*5))*100>1,XA_1+XA_3*5,XA_1+XA_3*6,3,0),COLORCC6600;
STICKLINE((WINNER(XA_1+XA_3*7)-WINNER(XA_1+XA_3*6))*100>1,XA_1+XA_3*6,XA_1+XA_3*7,3,0),COLOR663300;
STICKLINE((WINNER(XA_1+XA_3*8)-WINNER(XA_1+XA_3*7))*100>1,XA_1+XA_3*7,XA_1+XA_3*8,3,0),COLOR006633;
STICKLINE((WINNER(XA_1+XA_3*9)-WINNER(XA_1+XA_3*8))*100>1,XA_1+XA_3*8,XA_1+XA_3*9,3,0),COLOR009933;
STICKLINE((WINNER(XA_2)-WINNER(XA_1+XA_3*9))*100>1,XA_1+XA_3*9,XA_2,3,0),COLOR00DD33;
筹一:(WINNER(XA_1+XA_3)-WINNER(XA_1))*100,NODRAW;
筹二:(WINNER(XA_1+XA_3*2)-WINNER(XA_1+XA_3))*100,NODRAW;
筹三:(WINNER(XA_1+XA_3*3)-WINNER(XA_1+XA_3*2))*100,NODRAW;
筹四:(WINNER(XA_1+XA_3*4)-WINNER(XA_1+XA_3*3))*100,NODRAW;
筹五:(WINNER(XA_1+XA_3*5)-WINNER(XA_1+XA_3*4))*100,NODRAW;
筹六:(WINNER(XA_1+XA_3*6)-WINNER(XA_1+XA_3*5))*100,NODRAW;
筹七:(WINNER(XA_1+XA_3*7)-WINNER(XA_1+XA_3*6))*100,NODRAW;
筹八:(WINNER(XA_1+XA_3*8)-WINNER(XA_1+XA_3*7))*100,NODRAW;
筹九:(WINNER(XA_1+XA_3*9)-WINNER(XA_1+XA_3*8))*100,NODRAW;
筹十:(WINNER(XA_2)-WINNER(XA_1+XA_3*9))*100,NODRAW;
DRAWNUMBER(筹一>1,XA_1+XA_3,INTPART(筹一)),COLOR7777FF;
DRAWNUMBER(筹二>1,XA_1+XA_3*2,INTPART(筹二)),COLOR7777FF;
DRAWNUMBER(筹三>1,XA_1+XA_3*3,INTPART(筹三)),COLORWHITE;
DRAWNUMBER(筹四>1,XA_1+XA_3*4,INTPART(筹四)),COLOR7777FF;
DRAWNUMBER(筹五>1,XA_1+XA_3*5,INTPART(筹五)),COLORWHITE;
DRAWNUMBER(筹六>1,XA_1+XA_3*6,INTPART(筹六)),COLORFFCC00;
DRAWNUMBER(筹七>1,XA_1+XA_3*7,INTPART(筹七)),COLORFFCC00;
DRAWNUMBER(筹八>1,XA_1+XA_3*8,INTPART(筹八)),COLOR00DD33;
DRAWNUMBER(筹九>1,XA_1+XA_3*9,INTPART(筹九)),COLOR00DD33;
DRAWNUMBER(筹十>1,XA_2,INTPART(筹十)),COLORWHITE;
求筹一至筹十输出值中的最大值

相关股票

今曰
Lv.4
发表于 2019-11-11 14:57 复制 查看全部楼层
看贴学习 感谢分享!
老马识途10
Lv.7
发表于 2019-11-11 12:48 复制 查看全部楼层
海hhy170 发表于 2019-11-10 20:51
老马老师,再问个问题,收盘价上穿筹码最大值的位置,如何表达?

XA_1:=COST(0.1);
XA_2:=COST(99.900002);
XA_3:=(XA_2-XA_1)/10;

筹一:=(WINNER(XA_1+XA_3)-WINNER(XA_1))*100;
筹二:=(WINNER(XA_1+XA_3*2)-WINNER(XA_1+XA_3))*100;
筹三:=(WINNER(XA_1+XA_3*3)-WINNER(XA_1+XA_3*2))*100;
筹四:=(WINNER(XA_1+XA_3*4)-WINNER(XA_1+XA_3*3))*100;
筹五:=(WINNER(XA_1+XA_3*5)-WINNER(XA_1+XA_3*4))*100;

筹六:=(WINNER(XA_1+XA_3*6)-WINNER(XA_1+XA_3*5))*100;
筹七:=(WINNER(XA_1+XA_3*7)-WINNER(XA_1+XA_3*6))*100;
筹八:=(WINNER(XA_1+XA_3*8)-WINNER(XA_1+XA_3*7))*100;
筹九:=(WINNER(XA_1+XA_3*9)-WINNER(XA_1+XA_3*8))*100;
筹十:=(WINNER(XA_2)-WINNER(XA_1+XA_3*9))*100;


A:=MAX(MAX(MAX(筹一,筹二),MAX(筹三,筹四)),筹五);
B:=MAX(MAX(MAX(筹六,筹七),MAX(筹八,筹九)),筹十);
最大:=MAX(A,B);

CROSS(C,最大);
海hhy170
Lv.5
发表于 2019-11-10 21:03 复制 查看全部楼层
休闲者68 发表于 2019-11-10 20:24
XA_1:=COST(0.1);
XA_2:=COST(99.900002);
XA_3:=(XA_2-XA_1)/10;

同问楼上一样问题。
海hhy170
Lv.5
发表于 2019-11-10 20:51 复制 查看全部楼层

老马老师,再问个问题,收盘价上穿筹码最大值的位置,如何表达?
休闲者68
Lv.6
发表于 2019-11-10 20:24 复制 查看全部楼层
本帖最后由 福阿德 于 2019-11-11 09:30 编辑

供参考

附件

回复.txt [预览]

736 Bytes, 下载次数: 0, 下载积分: 共享币 -5 个

查看全部打赏
  • 福阿德+8理想币 +7共享币 : 赠人玫瑰,手有余香。
  • 海hhy170+2共享币 : 答案正确
老马识途10
Lv.7
发表于 2019-11-10 19:35 复制 查看全部楼层
回复.txt [预览] (756 Bytes, 下载次数: 1)
查看全部打赏
  • 福阿德+10理想币 +10共享币 : 赠人玫瑰,手有余香。
  • 海hhy170+2共享币 : 答案正确
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

回顶部 到页底
快速回复 返回顶部 返回列表