PINE LIBRARY
Aggiornato

OHLCVData

108
OHLCV Data Power Library
Multi-Timeframe Market Data with Mathematical Precision

📌 Overview
This Pine Script library provides structured OHLCV (Open, High, Low, Close, Volume) data across multiple timeframes using mathematically significant candle counts (powers of 3). Designed for technical analysts who work with fractal market patterns and need efficient access to higher timeframe data.

✨ Key Features

6 Timeframes: 5min, 1H, 4H, 6H, 1D, and 1W data

Power-of-3 Candle Counts: 3, 9, 27, 81, and 243 bars

Structured Data: Returns clean OHLCV objects with all price/volume components

Pine Script Optimized: Complies with all security() call restrictions

📊 Timeframe Functions

pinescript
f_get5M_3() // 3 candles of 5min data
f_get1H_27() // 27 candles of 1H data
f_get1D_81() // 81 candles of daily data
// ... and 27 other combinations
🚀 Usage Example

pinescript
import YourName/OHLCVData/1 as OHLCV

weeklyData = OHLCV.f_get1W_27() // Get 27 weekly candles
latestHigh = array.get(weeklyData, 0).high
plot(latestHigh, "Weekly High")
💡 Ideal For

Multi-timeframe analysis

Volume-profile studies

Fractal pattern detection

Higher timeframe confirmation

⚠️ Note

Replace "YourName" with your publishing username

All functions return arrays of OHLCV objects

Maximum lookback = 243 candles

📜 Version History
1.0 - Initial release (2024)
Note di rilascio
Key Fixes:

Library Changes:
Added array size trimming for safety
Simplified the security call while maintaining functionality
Note di rilascio
v3

Added:
f_get4H_81()

f_get4H_243()
Note di rilascio
v4

Removed:
f_get4H_3()

f_get4H_27()

f_get4H_81()

f_get4H_243()
Note di rilascio
v5

Added:
getOHLCV(tf, count)
  Parameters:
    tf (string)
    count (int)

getSupportedTimeframes()

getSupportedCounts()

Removed:
f_get4H_9()
Note di rilascio
v6

Added:
getAvailableCandleCount(tf)
  Parameters:
    tf (string)

Removed:
getSupportedCounts()
Note di rilascio
v7
Note di rilascio
v8

Added:
getAvailableHistory(tf)
  Parameters:
    tf (string)

getFirstValidIndex(tf)
  Parameters:
    tf (string)

getTimeAt(data, index)
  Parameters:
    data (array<OHLCV>)
    index (int)

Updated:
OHLCV
  Fields:
    open (series float)
    high (series float)
    low (series float)
    close (series float)
    volume (series float)
    time (series int)

Removed:
getAvailableCandleCount(tf)
Note di rilascio
v9
Note di rilascio
v10

Updated:
getOHLCV(timeframe, symbol, length)
  Parameters:
    timeframe (string)
    symbol (string)
    length (int)

Removed:
getAvailableHistory(tf)

getFirstValidIndex(tf)

getTimeAt(data, index)

getSupportedTimeframes()
Note di rilascio
v11

Added:
getTimeframeData(timeframe, symbol)
  Parameters:
    timeframe (string)
    symbol (string)

TimeframeData
  Fields:
    ohlcv (OHLCV)
    isAdjustedToChartTF (series bool)
    isTargetBarClosed (series bool)

Removed:
getOHLCV(timeframe, symbol, length)
Note di rilascio
v12
Note di rilascio
v13

Updated:
OHLCV
  Fields:
    open (series float)
    high (series float)
    low (series float)
    close (series float)
    volume (series float)
    time (series int)
    bar_index (series int)

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.