new to the NT, so what am I missing here? None of the print statements below creates any output in the Output Window during a backtest run (which creates the expected results).
Best regards
Gwaihir
publicclass bidlowprice : Strategy
{
#region Variables
// Wizard generated variables
privateint sellDelay = 2; // Default setting for SellDelay
// User defined variables (add any user defined variables below)
#endregion
///<summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
///</summary>
protectedoverridevoid Initialize()
{
CalculateOnBarClose = false;
Print("XXX");
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
double diff = High[1] - Low[1];
Print("test");
Print(diff + " ," + High[0] + " ," + Low[0] + " ," + Low[1] + " ," + (Low[1] - diff));
if (High[0] > (Low[1] - diff)
&& Low[0] < (Low[1] - diff))
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (BarsSinceEntry() == SellDelay)
{
ExitLong("", "");
}
}
#region Properties
[Description("Delay before Stuff bought gets sold")]
[Category("Parameters")]
publicint SellDelay
{
get { return sellDelay; }
set { sellDelay = Math.Max(0, value); }
}
#endregion
}
}

Comment