What is units for timeperiod?



  • Are the units for timeperiod candles, or days? Seems like the former, but wanted to make sure.

    Thanks.


  • administrators

    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 Reference

    All data feeds take the timeframe and compression parameters (which default to Days and 1)



  • 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.


  • administrators

    Indicators know nothing about timeframes or compressions. They only understand that they have to calculate something using the input data.


Log in to reply
 

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.