@Sasha consider using the replay datafeeds functionality of Backtrader. This allows you to make trading decisions on a lower timeframe while your higher level algorithm still operates on the higher timeframe. For instance, my system looks at indicators to make choices on the 1D candle, but my entries and exits are made on the 1H level. This way I can place a trade 1H before the close of the 1D candle and my trading results will be much more accurate.
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/