![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2008
Posts: 69
Thanks: 0
Thanked 0 times in 0 posts
|
If You = NT Staff, stop reading. You shouldn't use up your time answering this sort of question.... I understand C# is not supported here.
![]() I've recently been trying to learn C# up to a level where I will feel comfortable coding Ninjascripts. One exercise has been to look at the auto-generated code in ninjascript editor to learn. Consider picture below. I'm wondering how the Ninjatrader.Indicator namespace is able to put together all the indicators used in Ninjatrader without having some sort of equilvalent of the "Partial" keyword that is sometimes used for a class where the class is defined in multiple files. In this example, my stupid "If Open=Close indicator" is the only indicator here. So just wondering from a programming perspective how C# knows to compile all the different indicators into the same Ninjatrader.Indicator namespace. And yes I know this is nit-picky but I'm trying to understand and process all this stuff.
Last edited by geoMEAN; 04-19-2008 at 04:46 AM.
Reason: typo
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> If You = NT Staff, stop reading
Done
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2008
Posts: 69
Thanks: 0
Thanked 0 times in 0 posts
|
Dierk, well at least you follow instructions!
![]() Perhaps I'll elicit a quick response from a programmer if I refrase in shorter language: Can the same namespace be defined across multiple .cs files? E.g.: //in file SMA.cs namespace NinjaTrader.Indicator { public class SMA : Indicator { } } //in file EMA.cs namespace NinjaTrader.Indicator { public class EMA : Indicator { } } I imagine this is what is happening each time I create a new indicator as I've heard that all strats are kept in 1 compiled strat file and all indicators kept in 1 compiled indicator file. |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> Can the same namespace be defined across multiple .cs files?
That's how all NS files work.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Member
Join Date: Jun 2010
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Last edited by TakisTakis; 07-17-2010 at 08:13 AM.
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why NTMarketPosition doesn't work? | alekstraj | Automated Trading | 29 | 05-25-2011 06:11 AM |
| Functions from System.Drawing namespace | JangoFolly | Indicator Development | 3 | 04-15-2008 02:03 PM |
| 6.5.0.8 and MBT doesn't work | woodside | Historical NinjaTrader 6.5 Beta Threads | 29 | 02-08-2008 04:48 AM |
| So does Gtc work in backtest? | henry.omd | Historical NinjaTrader 6.5 Beta Threads | 10 | 12-30-2007 04:24 PM |
| "The namespace Ninjatrader.Indicator already contains a definition for '<indicator>'" | eeisen | Strategy Development | 3 | 09-02-2007 09:47 PM |