Browse Source

QuoteSource: do not use ticks time

stable
Denis Tereshkin 6 years ago
parent
commit
8be20b57dd
  1. 6
      src/ATrade/Driver/Real/QuoteSourceThread.hs

6
src/ATrade/Driver/Real/QuoteSourceThread.hs

@ -43,11 +43,7 @@ startQuoteSourceThread ctx qsEp strategy eventChan agg tickFilter maybeSourceTim @@ -43,11 +43,7 @@ startQuoteSourceThread ctx qsEp strategy eventChan agg tickFilter maybeSourceTim
case handleTick tick aggValue of
(Just bar, !newAggValue) -> writeIORef agg newAggValue >> writeChan eventChan (NewBar bar)
(Nothing, !newAggValue) -> writeIORef agg newAggValue
Just _ -> do
aggValue <- readIORef agg
case updateTime tick aggValue of
(Just bar, !newAggValue) -> writeIORef agg newAggValue >> writeChan eventChan (NewBar bar)
(Nothing, !newAggValue) -> writeIORef agg newAggValue
Just _ -> return ()
QDBar (_, bar) -> do
aggValue <- readIORef agg
when (isJust maybeSourceTimeframe) $ do

Loading…
Cancel
Save