I'm trying to connect my F# app with FIXImulator. FIXImulator is running on local machine and listening on port 9878. The application compiles and runs (it also works in interactive mode).
However, the connection is never established. I don't think the problem is with my code since it runs and tries to establish the connection. Below the method that does that:
type FIXEngine() =
let settings = new SessionSettings(@"C:\Users\pw\Documents\Visual Studio 2013\Projects\FSharpForQuantFirst\TradingSystem\config.cfg")
let application = new ClientInitiator()
let storeFactory = FileStoreFactory(settings)
let logFactory = new ConsoleLogFactory(settings)
let messageFactory = new MessageFactory()
let initiator = new SocketInitiator(application, storeFactory, settings)
let ids = initiator.GetSessionIDs()
let st = initiator.Start() |> ignore
member this.init() : unit = ()
member this.start() : unit = initiator.Start()
The initiator
has a Connected
flag. The flag is set to false
. Also no session IDs are returned.
I initialize my code in the main module:
module Main =
let fixEngine = new FIX.FIXEngine()
fixEngine.init()
fixEngine.start()
[<EntryPoint>]
let main argv =
printfn "%A" argv
0
My application is using the following config file:
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=60
SenderCompID=TRADINGSYSTEM
[SESSION]
BeginString=FIX.4.2
TargetCompID=FIXIMULATOR
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=30
ReconnectInterval=10
SocketConnectPort=9878
SocketConnectHost=0.0.0.0
FileStorePath=temp
ValidateUserDefinedFields=N
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y
The FIXImulator's config is as follows:
[DEFAULT]
FIXimulatorLogToFile=N
FIXimulatorLogToDB=N
FIXimulatorAutoPendingCancel=N
FIXimulatorAutoPendingReplace=N
StartTime=00:00:00
FIXimulatorSendOnBehalfOfCompID=N
FIXimulatorAutoAcknowledge=N
FIXimulatorAutoCancel=N
FIXimulatorAutoReplace=N
FIXimulatorPricePrecision=4
FIXimulatorSendOnBehalfOfSubID=N
SocketAcceptPort=9878
RefreshMessageStoreAtLogon=Y
BeginString=FIX.4.2
HeartBtInt=30
EndTime=00:00:00
ConnectionType=acceptor
DataDictionary=FIX42.xml
FileStorePath=data
FIXimulatorCachedObjects=50
JdbcURL=jdbc:mysql://localhost:3306/quickfix
JdbcUser=fiximulator
JdbcPassword=fiximulator
JdbcDriver=com.mysql.jdbc.Driver
[SESSION]
FileLogPath=logs
OnBehalfOfSubID=DESK
TargetCompID=TRADINGSYSTEM
SenderCompID=FIXIMULATOR
OnBehalfOfCompID=BROKER
I've been playing with different configuration settings but after two days I'm running low on ideas.
The code comes from "F# for Quantitative Finance". Any help with establishing the connection highly appreciated.