【问题标题】:First Candle closing price首支蜡烛收盘价
【发布时间】:2020-03-01 18:50:04
【问题描述】:

当我输入收盘时,我想关闭第一根早晨蜡烛,它返回最后一根蜡烛的收盘值。如何在五分钟图表中获得第一根晨光的收盘价? (9.15 到 9.20)

【问题讨论】:

    标签: pine-script


    【解决方案1】:

    接下来的代码绘制了会话第一栏的close

    //@version=4
    study("Close of first bar of a day")
    // If start of the daily session changed, then it's first bar of the new session
    isNewDay = time("D") != time("D")[1]
    var firstBarCloseValue = close
    if isNewDay
        firstBarCloseValue := close
    plot(firstBarCloseValue)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-04
      • 1970-01-01
      • 2021-05-10
      • 2021-02-22
      相关资源
      最近更新 更多