![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Jun 2011
Location: Tucson, Arizona
Posts: 15
Thanks: 0
Thanked 1 time in 1 post
|
Hello,
A short while ago I installed NinjaTrader 7, and have been reading the various Help menus and practicing with the pre-installed indicators, as well as writing my own for testing. The wizard can be used to start a new indicator from scratch, where the parameters, data and type of graphical output can be specified. However, I do not know how to add new data or parameters to an existing indicator, and would be most grateful for some help. On opening a chart and specifying indicators, a window is opened with a list of indicators on the left and the parameters, data, graphics etc. displayed on the right. The value in an input parameter can be changed, but how do I add a new parameter or item of data? In looking at the code at the beginning of an indicator are various standard .NET “using System” statements, followed by “using NinjaTrader.Cbi”, “using NinjaTrader.Data” and “using NinjaTrader.Gui.Chart”, which are obviously specific to NinjaTrader, and the last one obviously refers to graphics, so the code associated with parameters and indicators must be referred by the other two “using” statements, but I am unable to locate the source code. In going to \Program Files\NinjaTrader 7\ are the folders bin, db, doc and sounds, together with a Word document with the license agreement. By elimination it looks as if the code I’m looking for must be in \db\NinjaTrader SQL server. I only have .NET express installed and no SQL currently installed. The upshot is that I would be most grateful to know how to change the numbers of parameters or data types in an existing indicator, either by using some kind of wizard or by locating and modifying the source code that is set up by the wizard before the specific indicator is called, and would be most grateful for some help on this. Christopher Csharp |
|
|
|
|
|
#2 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
The following user says thank you to koganam for this post: |
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2011
Location: Tucson, Arizona
Posts: 15
Thanks: 0
Thanked 1 time in 1 post
|
At the end of my reply I meant to say that it may ONLY make sense to change some of these in the code, e.g. the input series, say AA (Daily), depends on what Data Series you select, so there is no point in changing the code for this.
csharp |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,013 times in 994 posts
|
csharp, I would suggest you take a look at this tip here - http://www.ninjatrader.com/support/f...ead.php?t=5782
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2011
Location: Tucson, Arizona
Posts: 15
Thanks: 0
Thanked 1 time in 1 post
|
OK, I did exactly that and it works! Many thanks indeed. I'm new to NinjaScript and that advice saved me a lot of time.
At some point I might want to change some of the other quantities in Data, Visual, Label and Plots. Of these only the last, Plot0, is in the Properties section, and it is set up in the Initialize() method. Where are the other properties set up? I realise that it may make sense to changes some of these in the code. Many thanks, csharp |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi csharp,
Those categories are built in and are non-configurable, as far what items appear in those categories. Each item there is a property you can set in the indicator's initialize() method, that will serve as the default when you apply the script. Autoscale, Displacement, CalculateOnBarClose, etc. Can see an alphabetical listing of all NinjaScript here: http://www.ninjatrader.com/support/h..._reference.htm You can of course add plots and they will show up under the plots category. If you add any inputs, like a period calculation, they're set to display under a Parameters category. You can also customize and provide your own category name.
Ryan M
NinjaTrader Customer Service
Last edited by NinjaTrader_RyanM; 08-23-2011 at 12:10 PM.
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jun 2011
Location: Tucson, Arizona
Posts: 15
Thanks: 0
Thanked 1 time in 1 post
|
Hi Ryan M,
Many thanks, and that is pretty much as I had expected. The link you gave me is of course the same as the Help that comes with NinjaTrader. Incidentally, if I put in at the beginning "using System.Windows.Forms;" a MessageBox can be used which is convenient for testing and debugging, and by making some other changes, it is possible to get a console displayed and use the Console.WriteLine() method for additional output. csharp |
|
|
|
|
|
#8 |
|
Senior Member
|
|
|
|
|
|
|
#9 | |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,013 times in 994 posts
|
Quote:
Bertrand
NinjaTrader Customer Service |
|
|
|
|
![]() |
| Tags |
| code, parameters |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Manually adding parameters | DionysusToast | General Programming | 0 | 03-02-2011 11:10 PM |
| NT crashes on adding instruments to existing list | noincomenojobnoassets | Version 7 Beta General Questions & Bug Reports | 3 | 06-29-2010 04:52 AM |
| Adding parameters in wizard | raycam | Strategy Development | 2 | 08-25-2009 06:41 AM |
| Adding parameters at a later stage... | Sidhartha | General Programming | 7 | 04-04-2008 09:32 AM |
| Problems adding contracts to existing position/strategy | Ouiji | Miscellaneous Support | 1 | 05-10-2007 02:10 PM |