pine script - How to get full data from different timeframe as array? - Stack Overflow

admin2025-04-22  0

var DailyCloseArray = array.new_float()

if barstate.islast

    for i = 0 to bar_index
        DailyCloseArray.push(request.security(syminfo.tickerid, "D", close[i])) 

log.info(str.tostring(array.size(DailyCloseArray)))

// Plot the latest stored daily close
plot(close)

How to get full data from different timeframe as array?

var DailyCloseArray = array.new_float()

if barstate.islast

    for i = 0 to bar_index
        DailyCloseArray.push(request.security(syminfo.tickerid, "D", close[i])) 

Error: Cannot use loop variables or mutable variables from a loop's local scope as expression arguments in request.*() calls.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745251440a292528.html

最新回复(0)