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 > Application Technical Support > Strategy Analyzer

Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer.

Reply
 
Thread Tools Display Modes
Old 06-28-2009, 01:24 AM   #1
tamas
Senior Member
 
Join Date: Jan 2009
Location: Budapest, HUNGARY
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
Default Historical property

Hello,

how does the Strategy Analyzer work, if the below mentioned code is in MyStrategy? Does it have any effect on the result of backtest?

Code:
protected override void OnBarUpdate() 
{ 
 // Only run on real-time data 
 if (Historical) 
    return; 
}
(I have read this help section many times, i understand it.) Thanks.
tamas is offline  
Reply With Quote
Old 06-28-2009, 09:06 AM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

Just checking, did you see this line in the help guide:
"With a strategy, when running a backtest, this property will always return true"

So you may want to comment that part out of your code when you backtest, depending on the result you want.
NinjaTrader_Ben is offline  
Reply With Quote
Old 06-28-2009, 11:46 PM   #3
tamas
Senior Member
 
Join Date: Jan 2009
Location: Budapest, HUNGARY
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Ben View Post
So you may want to comment that part out of your code when you backtest, depending on the result you want.
Thank you Ben
tamas is offline  
Reply With Quote
Reply

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
Query regarding Historical property ScoobyStoo General Programming 14 05-22-2009 09:39 AM
rectangle Opacity Property mikeytrader General Programming 1 05-09-2009 02:08 PM
Positions Property available within OnPositionUpdate? kcsystemtrader Strategy Development 5 03-12-2009 10:46 AM
Added Property to Strategy but Not Showing on Property Grid stocastix Automated Trading 2 11-07-2008 04:00 PM
Add Hidden Property? pivot44 Market Analyzer 1 04-16-2008 10:09 AM


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