I have created a method wich calculates some position size algorithm.
This method returns a value stored in a "double" variable.
When I place this variable in the quantty parameter of an order, the programm compiles ok, but when I press F5 botton in the chart (with the strategy loaded), some big alarming messagebox with many lines of text shows up, nd the NT gets disconnected as soon as I close that window.
This is what shows in the Log:
23/09/2010 16:34:20 Default Unable to restore strategy 'NinjaTrader.Strategy.CJSUNMANAGEDBOXBE4' with ID '4781c8ab688a46fda68817cf4f3baa52'. Most likely this strategy no longer is supported by the custom assemblies.
And this is my order:
if (LngOrder1== null && SrtOrder1== null)
{
PositionSize();
LngOrder1 = SubmitOrder(0,OrderAction.Buy, OrderType.Stop,(int)Psize,0,upper+(TickSize*offSet),"OCO_Initial","Initial_ L1");
SrtOrder1 = SubmitOrder(0,OrderAction.Sell, OrderType.Stop,(int)Psize,0,lower-(TickSize*offSet),"OCO_Initial","Initial_S1");
}
}
Thanks al ot in advance

Comment