What is units for timeperiod?
-
Are the units for timeperiod candles, or days? Seems like the former, but wanted to make sure.
Thanks.
-
What's a candle? And the next question would be what is timeperiod?
The data feeds have prices (usually
OHLC
) and a timestamp. The platform makes no assumptions as to what the timeframe of the prices are, because it would 1st have to scan all timestamps, what would be costly.It relies on the user telling the platform, during the creation of the data feed, which
timeframe
(Seconds, Minutes, Days, ...) and compression (1, 3, 5 ... you name it) it actually has. See the Docs - Data Feeds ReferenceAll data feeds take the
timeframe
andcompression
parameters (which default toDays
and1
) -
Yes I could have been clearer. I am referring to things such as indicators that have an option "period", and for backtrader I mean bars, some other libraries call these candles.
-
Indicators know nothing about timeframes or compressions. They only understand that they have to calculate something using the input data.