设为首页收藏本站

 找回密码
 注册
查看: 545|回复: 0
打印 上一主题 下一主题

请问如何表述连续10天低于10日均价 [复制链接]

Rank: 1

精华
0
UID
280938
积分
25
帖子
19
主题
2
阅读权限
10
注册时间
2019-7-2
最后登录
2023-11-3
1#
发表于 2019-11-16 16:28:02 |显示全部楼层
使用countif就可以了
  1. Params
  2.        
  3. Vars
  4.         NumericSeries ma10;
  5.         Numeric count;
  6.         Bool isLow;
  7. Begin
  8.         If(!CallAuctionFilter()) Return;
  9.         ma10 = Average(Close,10);
  10.         PlotNumeric("ma10",ma10);
  11.         isLow = Close < ma10;
  12.         If(isLow){
  13.                 PlotString("isLow","L",Low,Red);
  14.         }
  15.         count = CountIf(isLow,10);
  16.         If(count == 10){
  17.                 PlotString("isOk","Y",High,Yellow);
  18.         }
  19. End
复制代码

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-5-4 08:32

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部