NinjaTrader Support Forum  

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

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 12-03-2010, 06:57 AM   #1
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,862
Thanks: 16
Thanked 98 times in 81 posts
Default Display update interval for Draw() methods

This is just a short question.

I understand that Plot() is executed as per Chart Properties -> Display Update Interval settings, which will avoid high CPU load.

If I use DrawRectangle(), DtawLine() or any other Draw() method in OnBarUpdate(), will this be

(a) calculated with every incoming tick and cause high processor load, if the indicator is set to CalcOnBarClose = false, or

(b) filtered to comply with the Display Update Interval settings under chart properties.

Thank you for your response.
Harry is offline  
Reply With Quote
Old 12-03-2010, 07:46 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Harry, I saw your thread on BigMike's ... I can't give you a definite answer, since what you are after is definitely beyond what we provide support for. This would require that you tested your approach under every potential situation...

However, here is some info: IndicatorBase.Plot() call frequency is primarily impacted by the chart update frequency. Although there might be additional situations where the chart (and indicators) would require repainting.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-03-2010, 01:37 PM   #3
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,862
Thanks: 16
Thanked 98 times in 81 posts
Default

Hi Dierk,

thanks for the answer, understood that for Plot() and it makes sense. Just wanted to know whether the Draw() methods react to every incoming tick, or if they are filtered as well. A "yes" or "no" would be fine. Otherwise I can do some tests to find out, but an answer would save me some time.

Quote:
Originally Posted by NinjaTrader_Dierk View Post
Harry, I saw your thread on BigMike's ... I can't give you a definite answer, since what you are after is definitely beyond what we provide support for. This would require that you tested your approach under every potential situation...

However, here is some info: IndicatorBase.Plot() call frequency is primarily impacted by the chart update frequency. Although there might be additional situations where the chart (and indicators) would require repainting.
Harry is offline  
Reply With Quote
Old 12-03-2010, 01:44 PM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

The Draw() methods create objects which are redrawn whenever a chart is repainted which is triggered by logic below.

Obviously the Draw() methods in your code would be called whenever OnBarUpdate() is triggered which could be down to the tick (COBC=false).

Hope this helps
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-03-2010, 03:11 PM   #5
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,862
Thanks: 16
Thanked 98 times in 81 posts
Default

Thanks for the information, that was helpful.
Harry 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
Allow quicker chart display update interval Softturbo Version 7 Beta General Questions & Bug Reports 25 06-10-2010 04:34 PM
Display Update Interval dkelly Version 7 Beta General Questions & Bug Reports 1 05-04-2010 01:00 PM
Idea: Display update interval (sec) David Lean Suggestions And Feedback 1 12-08-2009 05:53 AM
Does Display Update Interval Indirectly Control OnBarUpdate? kcsystemtrader Strategy Development 1 02-12-2009 01:26 PM
Display Update Interval (sec) question. higler Charting 1 07-30-2007 06:32 AM


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