For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Time of Day in plot

  • Hey Everyone,

    just curious if there's some builtin functionality in backtrader to display time of day either directly on the x axis or in the bottom-right tooltip in matplotlib.
    Debugging minute resolution plots with ill-mannered indicators can be a bit of a pain otherwise as I'll have to eyeball the time of day when an indicator does something unexpected and potentially step through hundreds of datapoints :-/
    I am passing timeframe=bt.TimeFrame.Minutes to the datafeed as documented and backtrader is working perfectly otherwise.
    Again, not crucial but it would be a nice quality of life feature.


  • administrators

    The plotting functionality is only meant as a visual aid and as automated as possible (you can still change some colours, bar style and others), but it is not meant to be interactive charting. The timeframe determines what the axis displays. But in the case of Minutes, minutes should be displayed.

Log in to reply