NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-29-2009, 03:21 AM   #1
Gwaihir
Junior Member
 
Join Date: Dec 2009
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default Print does not create text in Output Window

Hi,

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

Code:
 
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
}
}
Gwaihir is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print() to Output Window xewoox General Programming 3 09-04-2010 10:24 PM
Print Output Window data to named text file Buttermilk General Programming 1 09-17-2009 03:56 PM
Printing Text to Output Window on the Last Bar of a Chart ollywedgwood Strategy Development 2 07-24-2009 03:39 PM
Colored text in output window? heech Strategy Development 1 03-03-2009 10:02 AM
Output window text kenzo Strategy Analyzer 3 12-12-2008 10:30 AM


All times are GMT -6. The time now is 05:01 AM.