Browse Source

bugfix(real): use bar timestamps to update lastTimestamp

stable
Denis Tereshkin 4 years ago
parent
commit
68033553d2
  1. 1
      src/ATrade/Driver/Real.hs

1
src/ATrade/Driver/Real.hs

@ -417,6 +417,7 @@ barStrategyDriver downloadDelta instanceParams callback shutdownVar = do @@ -417,6 +417,7 @@ barStrategyDriver downloadDelta instanceParams callback shutdownVar = do
env <- getEnvironment
let newTimestamp = case event of
NewTick tick -> timestamp tick
NewBar bar -> barTimestamp bar
_ -> env ^. seLastTimestamp
nowRef <- asks envLastTimestamp
lift $ writeIORef nowRef newTimestamp

Loading…
Cancel
Save