I double checked the slippage is set to zero.
The test code below simply says:
if ( 34 < base.CurrentBar ) base.ExitLongLimit(3, 65.82, "bad NinjaTrader", "");
where 65.82 is a price much much lower than the low of the current bar #34.
I am attaching a picture that shows the problem.
When I look at the strategy performance also you can see big losses where in actuality you could have big gains.
I am quite surprised to find an error like this on a platform of this caliber. Am I crazy?
Best
G
// // Copyright (C) 2006, NinjaTrader LLC <www.ninjatrader.com>. // NinjaTrader reserves the right to modify or overwrite this NinjaScript component with each release. // #region Using declarations using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Xml.Serialization; using System.Collections.Generic; //List using NinjaTrader.Cbi; using NinjaTrader.Data; using NinjaTrader.Indicator; using NinjaTrader.Strategy; #endregion // This namespace holds all strategies and is required. Do not change it. namespace NinjaTrader.Strategy { /// <summary> /// /// </summary> [Description("")] public class gSimplestEntryExtStrategyDebugLimitOrder : Strategy { #region Variables #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() { } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { //EnterShort(3); //ExitShort(); if (base.CurrentBar == 27) { EnterLong(3); } //if ( 34 < base.CurrentBar ) base.ExitLongLimit(3, 66.02, "good NinjaTrader", ""); if ( 34 < base.CurrentBar ) base.ExitLongLimit(3, 65.82, "bad NinjaTrader", ""); } #region Properties #endregion } }
Comment