I have correctly referenced the AxInterop.TWSlib and Interop.TWSlib DLLs and I am using the test code shown below.
This works perfectly well in a C# form created by Visual Studio, but I'm at a loss why the NT strategy cannot load the AxInterop.TWSlib dll.
The only thing that I can think of is that it might have been loaded already by NT.
Can you shed any light on this please
Thanks
#region Variables private AxTWSLib.AxTws Tws1; #endregion /// <summary> /// This method is used to configure the strategy and is called once before any strategy method is called. /// </summary> protected override void Initialize() { Tws1 = new AxTWSLib.AxTws(); Tws1.reqHistoricalData(1, "MSFT", "STK", "", 0, "","", "smart", "usd",0, "20080124 11:01:00","3600 S", "5 mins","MIDPOINT", 1, 1); Tws1.historicalData+=new AxTWSLib._DTwsEvents_historicalDataEventHandler(this.historicalData); } private void historicalData(object sender, AxTWSLib._DTwsEvents_historicalDataEvent e) { string msg = "Id="+e.reqId+" Date: "+e.date+" open: "+e.open+" high: "+e.high+" low: "+e.low+" close: "+e.close+" volume: "+e.volume; Print (msg); }
Comment