v2
Added:
getOHLC(offset)
Returns higher timeframe OHLC options with given offset. To be used within request.security
Parameters:
offset (int): Offset to current bar index
Returns: [open, high, low, close, bar_index, time, time_close] for given timeframe in security call
getCandleFromOhlc(o, h, l, c, b, t, isChartTimeframe)
Gets the current candle along with reassigned ltf components. To be used with request.security to capture higher timeframe candle data
Parameters:
o (float): Open price of the candle
h (float): High price of the candle
l (float): Low price of the candle
c (float): Close price of the candle
b (int): Bar Index of the candle
t (int): Bar time of the candle
isChartTimeframe (bool): true if using current chart timeframe, false otherwise
Returns: Candle object with embedded lower timeframe key candles in them
LTFCandle
LTFCandle type. Replica of Candle. Created to avoid issues with respect to runtime errors
Fields:
o (series float): Open price of the candle
h (series float): High price of the candle
l (series float): Low price of the candle
c (series float): Close price of the candle
barindex (series int): Bar Index of the candle
bartime (series int): Bar time of the candle
bartimeclose (series int): Bar time of the candle
Updated:
Candle
Candle represents the data related to a candle
Fields:
o (series float): Open price of the candle
h (series float): High price of the candle
l (series float): Low price of the candle
c (series float): Close price of the candle
barindex (series int): Bar Index of the candle
bartime (series int): Bar time of the candle
lo (LTFCandle): Lower timeframe candle that records the open price of the current candle.
lh (LTFCandle): Lower timeframe candle that records the high price of the current candle.
ll (LTFCandle): Lower timeframe candle that records the low price of the current candle.
lc (LTFCandle): Lower timeframe candle that records the close price of the current candle.
last (Candle): Link to last candle of the series if any
direction (series float): Direction of the candle with respect to last Candle
Removed:
getCurrentCandle(ltfCandles)
Gets the current candle along with reassigned ltf components. To be used with request.security to capture higher timeframe candle data