PDA

View Full Version : Print() don`t work


vitaleg
08-18-2010, 09:44 AM
I`m trying to print a message to output window through bactesting using Print:

protected override void OnBarUpdate()
{
Print("soobshenie");
...

Output window is blank (

NinjaTrader_RyanM
08-18-2010, 09:53 AM
Hello Vitaleg,

One thing to check here is that you open the output window before running the backtest.

If you're doing this and not seeing output, check log tab for any error messages related to this strategy.

vitaleg
08-18-2010, 09:59 AM
I`ve had output window opened all the time. In Log I see a couple of entries "Message" appearing through backtesting. But output window is still blank. Please advise.

NinjaTrader_RyanM
08-18-2010, 10:08 AM
Your snippet and decription indicate it is not processing OnBarUpdate(). Please post the strategy file and outline the steps needed to see this. Thanks.

vitaleg
08-18-2010, 10:20 AM
Oh my god, I cannot understand what`s wrong with it. I have putted in the strategy function to post a message to Log "Test". Backtested and saw this message. Then I`ve unloched the code of this strategy and manually changed stringg "Test" to "Test1" and saved. And you know what? It still displays "Test". I`m frustrated.

NinjaTrader_RyanM
08-18-2010, 10:37 AM
It sounds like you are not running the latest version of the strategy. After making any changes to your strategy, be sure to right click and select backtest again.

Let us know if you're still having issues, and post the files you're working with.

vitaleg
08-18-2010, 11:38 AM
Oh...oh. I figured it out. I had to push Compile button, not save. Thank you.

NinjaTrader_RyanM
08-18-2010, 11:44 AM
Glad to hear it's sorted and was something simple. Thanks for the update.