NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-16-2010, 04:32 PM   #1
aascotty
Junior Member
 
Join Date: Jul 2009
Posts: 19
Thanks: 0
Thanked 1 time in 1 post
Default Initialize() called more than once before OnBarUpdate()?

I open a form from the Initialize() method based on the belief that Initialize() would be called only once for a strategy. This doesn't seem to be the case since my form is being opened multiple times before OnBarUpdate() is even called.

I tried overriding OnStartUp() to open my form but the compiler is not finding any such method to override. I'm using NT 6.5.1000.14. Is the OnStartUp() method only in NT 8?

A different work around would be to use a flag to force a 1 time execution of certain code?

Any other suggestions?
aascotty 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
when does initialize get called junkone Market Analyzer 1 01-27-2010 06:07 AM
Single Initialize()-like event called only once for a backtest of many products? ChiTrader2000 Strategy Development 4 01-24-2009 10:39 AM
Indicator's OnBarUpdate() is called twice mgbloomfield Automated Trading 1 04-20-2008 12:07 AM
OnBarUpdate() - never seems to be called? altrader Miscellaneous Support 5 03-10-2008 07:09 AM
Is there a counterpart of Initialize, called when strategy is stopped? californiaruby Automated Trading 2 02-20-2007 03:39 AM


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