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
env <- getEnvironment env <- getEnvironment
let newTimestamp = case event of let newTimestamp = case event of
NewTick tick -> timestamp tick NewTick tick -> timestamp tick
NewBar bar -> barTimestamp bar
_ -> env ^. seLastTimestamp _ -> env ^. seLastTimestamp
nowRef <- asks envLastTimestamp nowRef <- asks envLastTimestamp
lift $ writeIORef nowRef newTimestamp lift $ writeIORef nowRef newTimestamp

Loading…
Cancel
Save