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 03-16-2010, 09:25 AM   #1
eDanny
Senior Member
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 899
Thanks: 0
Thanked 19 times in 17 posts
Default Efficiency

If given the choice of plotting a dot (data series) or drawing a dot (draw method) on every bar, which uses less memory and which is more cpu efficient? It would seem that if you had two different (alternating) color plots according to conditions, it would be be more efficient to use two different color draw objects instead of two different plots but if only using one of either, which would be the better choice? I hope the question isn't confusing.

Dan
eDanny is offline  
Reply With Quote
Old 03-16-2010, 09:56 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

If you only had a small amount of dots then using DrawDot() to achieve your dots would be better as you don't need to store a whole DataSeries worth of values. If you wanted to have dots very commonly then a DataSeries may be the better choice, but then you won't have the ability to manually move the dots.
NinjaTrader_Josh is offline  
Reply With Quote
Old 03-16-2010, 11:39 AM   #3
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

DataSeries is far superior in efficiency both in terms of memory and performance.
NinjaTrader_Ray 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
Exit Efficiency DangerBoy Miscellaneous Support 5 06-12-2009 01:19 PM
Entry/Exit Efficiency GorSvet Strategy Analyzer 3 01-29-2009 03:22 PM
email linkage efficiency Micah Automated Trading 3 08-14-2008 01:37 PM
Memory efficiency redwoood Suggestions And Feedback 9 04-09-2008 06:54 AM
K Efficiency Ratio Learning1 Indicator Development 1 08-01-2007 01:51 PM


All times are GMT -6. The time now is 04:41 AM.