Console version: "Can't connect: Unexpected error during con
I am trying to turn a strategy to a console version but I get the following error when I try to run it:
05/10/2016 11:08:40.727 CSConsole @ PFSoft version='1.0.48' build='01.09.2016' started05/10/2016 11:08:40.732 started05/10/2016 11:08:40.891 loading vendors...05/10/2016 11:08:40.906 4 vendors loaded05/10/2016 11:08:40.908 creating app...05/10/2016 11:08:40.913 successfull05/10/2016 11:08:40.920 MultiDataCache creating...05/10/2016 11:08:41.314 successfull05/10/2016 11:08:41.535 Establishing connection...05/10/2016 11:08:43.073 Öndice fuera de los l¡mites de la matriz.05/10/2016 11:08:43.074 Öndice fuera de los l¡mites de la matriz.05/10/2016 11:08:43.074 Can't connect: Unexpected error during connect05/10/2016 11:08:43.074 Disconnect()05/10/2016 11:08:43.087 Add GlobalDataStorage from xml05/10/2016 11:08:43.089 Begin adding stategy : D:\Users\Usuario\Documents\ProtraderMC (64 bit)\PublisherLMAXFIX\publisher\Publisher.class05/10/2016 11:08:43.101 Error adding stategy : publisher
I am using LMAX Demo Connection. The same code and binaries work with the Protrader Demo connection. I mean, if I change the LMAX generated connection.set file with one generated with Protrader Demo account it works.
BTW: Öndice fuera de los l¡mites de la matriz. means Matrix index out of bound.
Thanks!
Replies
The offending code, just in case :).
using PTLRuntime.NETScript; using System; namespace publisher { public class Publisher : NETStrategy { public override void Init() { base.Init(); } public override void OnQuote() { base.OnQuote(); string symbol = Instruments.Current.Symbol; Instrument instrument = Instruments.Current; Quote quote = instrument.LastQuote; string message = $"{symbol} {quote.Time},{quote.Bid},{quote.Ask}"; Print($"{DateTime.Now}: {message}"); } public override void Complete() { base.Complete(); } } }
Join PTMC community to post your replies on forum