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 08-17-2012, 04:44 PM   #16
ij001
Senior Member
 
Join Date: Apr 2010
Posts: 125
Thanks: 18
Thanked 3 times in 3 posts
Default

Quote:
Originally Posted by NinjaTrader_Brett View Post
Hello,

This is more general c# support vs NinjaScript support however I believe you need a static class MergeSort when you declare the class.

-Brett
I made a mistake. I had my own classes inside the Indicator class. In Matthew's example they were outside. I changed that. Can you please verify though if I want to call the

methods from the Indicator class

partial class Indicator
{
public bool MyMethod()
{
// do something
}
}

with code outside the class I just create an object to reference them?

I was thinking

public struct MyClass
{
public Indicator indicator; // create object

if (
indicator.MyMethod() == true
)
// do something
}
ij001 is offline  
Reply With Quote
Old 08-19-2012, 03:15 PM   #17
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

ij001,

I am happy to assist you.

That looks correct other than you will want to instantiate your object.

public Indicator indicator = new Indicator();

Here is a more advanced example you may use to glean some knowledge from : http://www.ninjatrader.com/support/f...d=4&linkid=535

Please let me know if I may assist further.
NinjaTrader_AdamP 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
Best practice for programming efficient indicators for the NT Strategy Analyzer? poseidon_sthlm Indicator Development 12 01-24-2013 03:00 AM
Visual Programming Plugin for NT - Seeking beta testers Jeremytang NinjaScript File Sharing Discussion 0 02-24-2012 08:38 AM
Porting StrategyDesk Programming Code to NT borland General Programming 3 09-20-2009 02:49 PM
NT object model astrolobe General Programming 1 04-01-2009 07:58 AM
Need Help Programming Custom Indicator from TS to NT stevestrading Indicator Development 4 06-20-2007 04:31 PM


All times are GMT -6. The time now is 06:32 PM.