查找特定日内时间间隔的高 - 低
Find high - low for a particular intraday time interval
我试图在 tradingview 中找到特定蜡烛的 high/low。例如我需要知道 10:00-10:15 之间形成的蜡烛的高点。有没有办法在松脚本中执行它
我已经尝试四处寻找,但找不到执行此操作的示例代码。
我试过的东西:
t1 = time(period, "1000-1015")
session_open = na(t1) ? false : true
if (session_open)
ll = low
hh = high
我想你看起来像这样:
//@version=4
study("My Script", overlay=true)
locHigh = 0.0
locLow = 0.0
h = security(syminfo.tickerid, "15", high, lookahead=true)
l = security(syminfo.tickerid, "15", low, lookahead=true)
if hour == 10 and minute == 0
locHigh := h
locLow := l
else
locHigh := locHigh[1]
locLow := locLow[1]
plot(locHigh)
plot(locLow)
我试图在 tradingview 中找到特定蜡烛的 high/low。例如我需要知道 10:00-10:15 之间形成的蜡烛的高点。有没有办法在松脚本中执行它
我已经尝试四处寻找,但找不到执行此操作的示例代码。
我试过的东西:
t1 = time(period, "1000-1015")
session_open = na(t1) ? false : true
if (session_open)
ll = low
hh = high
我想你看起来像这样:
//@version=4
study("My Script", overlay=true)
locHigh = 0.0
locLow = 0.0
h = security(syminfo.tickerid, "15", high, lookahead=true)
l = security(syminfo.tickerid, "15", low, lookahead=true)
if hour == 10 and minute == 0
locHigh := h
locLow := l
else
locHigh := locHigh[1]
locLow := locLow[1]
plot(locHigh)
plot(locLow)