I coded a nt 6 strategy, now I'm porting to 6.5 (last beta) but I'm experiencing something I do not understand, the piece of code below was perfectly working, I had a look to help files but i didn't find useful informations.
Specifically, as you can see below, the strategy executes only the first order in the row (in this case EnterLongStop), no short trades are taken (while levels are perfectly printed). If I comment EnterLongStop the system enters only short trades....
Any suggestions?
if (Position.MarketPosition == MarketPosition.Flat) { ExitOrderStatus = ExitStatus.Nothing; try { // Definizione ingressi if (Time[0].TimeOfDay.CompareTo(OperationTimeStop.TimeOfDay)<0 && (Close[0]<=ChannelHigh && Close[0] >= ChannelLow)) { EnterLongStop(NContracts,ChannelHigh+TickSize*Sfond,"l"); EnterShortStop(NContracts,ChannelLow-TickSize*Sfond,"s"); #if DEBUG Print(Time[0].ToString()+"-Enter Long["+(ChannelHigh+TickSize*Sfond).ToString()+"]- Enter Short ["+(ChannelLow-TickSize*Sfond).ToString()+")"); #endif } } catch (Exception ex) { Print("Gestione ingressi - Errore"+ex.StackTrace.ToString()); }
Marce
Comment