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

Missing candle in replay data



  • Hi everyone,

    I am doing backtrading with a csv datafeed. I replay the data from tick to 5 seconds. When there are no tick data in 5 seconds the candle isn't made.

    Here my configuration:
    cerebro.replaydata(
    data,
    timeframe = bt.TimeFrame.TFrame(args.timeframe),
    compression = args.compression,
    bar2edge = True,
    adjbartime = True,
    rightedge = True,
    )

    In my custom log shows the bad behavior:

    Candle 45
    2016-01-04T00:14:10, Id: 305, Candle: 45, High: 87.676, Low: 87.676, Price: 87.676
    maxLight confirmed , 2016-01-04T00:14:00 - 2016-01-04T00:14:11, Id: 95, Value: 87.68
    2016-01-04T00:14:11, Id: 306, Candle: 45, High: 87.676, Low: 87.674, Price: 87.674
    2016-01-04T00:14:12, Id: 307, Candle: 45, High: 87.676, Low: 87.674, Price: 87.674
    2016-01-04T00:14:13, Id: 308, Candle: 45, High: 87.676, Low: 87.674, Price: 87.674
    maxLight confirmed , 2016-01-04T00:14:03 - 2016-01-04T00:14:15, Id: 97, Value: 87.677
    minLight confirmed , 2016-01-04T00:14:03 - 2016-01-04T00:14:15, Id: 98, Value: 87.674
    2016-01-04T00:14:15, Id: 309, Candle: 45, High: 87.676, Low: 87.674, Price: 87.674
    maxLight confirmed , 2016-01-04T00:14:10 - 2016-01-04T00:14:24, Id: 99, Value: 87.676
    Candle 46
    2016-01-04T00:14:24, Id: 310, Candle: 46, High: 87.674, Low: 87.674, Price: 87.674
    2016-01-04T00:14:25, Id: 311, Candle: 46, High: 87.674, Low: 87.674, Price: 87.674
    min possible, 2016-01-04T00:14:25, Id: 100, Value: 87.673

    It shoud be an other candle between 15-20.


 

});