ATrade-QUIK connector
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
684 B

9 years ago
module Main where
import Lib
import QuoteSource.DDE
import QuoteSource.DataImport
import Control.Concurrent hiding (readChan)
import Control.Monad
import Control.Monad.IO.Class
import Data.IORef
import Graphics.UI.Gtk hiding (Action, backspace)
import Control.Concurrent.BoundedChan
import Data.ATrade
callback :: DdeCallback
callback = undefined
9 years ago
main :: IO ()
main = do
chan <- newBoundedChan 1000
forkIO $ forever $ do
tick <- readChan chan
when (datatype tick == Price) $ print tick
dis <- initDataImportServer chan "atrade"
void initGUI
window <- windowNew
window `on` deleteEvent $ do
liftIO mainQuit
return False
widgetShowAll window
mainGUI