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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 08-20-2007, 01:48 PM   #1
mazachan
Senior Member
 
Join Date: Jun 2007
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
Default Creating new objects?

Is there a way to create and compile your own objects within NinjaTrader so that it's not a subclass of either the Indicator or the Strategy class?
mazachan is offline  
Reply With Quote
Old 08-20-2007, 01:51 PM   #2
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

Yes you can, although this is outside the scope of what we provide support for.

Open any custom indicator and create your class in that file. Just declare your class outside the scope of the indicator partial class.
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-20-2007, 03:54 PM   #3
mazachan
Senior Member
 
Join Date: Jun 2007
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you Ray, I understand. I will play around with it then.

Thanks
mazachan is offline  
Reply With Quote
Old 08-20-2007, 06:36 PM   #4
mazachan
Senior Member
 
Join Date: Jun 2007
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
Default

From an architectural level, can there be a UserDefinedMethods class that both the Indicators and the Strategy inherit from? I believe I know the answer already, but I'd like some confirmation.
Thanks
mazachan is offline  
Reply With Quote
Old 08-20-2007, 10:49 PM   #5
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

Unfortunately no, since they are a partial class declaration of either Indicator or Strategy.
NinjaTrader_Dierk 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
Drawing objects and memory mazachan General Programming 2 08-16-2007 06:58 PM
Drawing Objects Disappear with Reload NinjaScript Bruce_Medford_OR Charting 5 05-31-2007 09:07 AM
Indicator disappears after Remove All Draw Objects rtrader General Programming 3 04-13-2007 06:23 AM
Positioning of Manually Drawn Objects whitmark Charting 1 03-27-2007 05:59 AM
Creating a Setup Albenus Automated Trading 1 08-13-2006 06:35 AM


All times are GMT -6. The time now is 11:00 AM.