![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Certified NinjaScript Consultant
|
I have a strategy that is code locked that has spaces in the names of the parameters, such as "Trigger EMA" or "Number of Bars". How are they able to do that, since when creating a variable in the code, you can't use spaces? I would like use names with spaces in my strategy.
Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Hi lawyse,
You can't do it in the Indicator Wizard pages, but it is possible to change it directly in the NinjaScript editor later when editing the full code.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
|
Quote:
There's a region (almost invisible text) called "Properties"; click on the 'plus' sign to expand it. There are the parameters available for your strategy. However they represent spaces there, I'd imagine you can copy it by hand in your own code. |
|
|
|
|
|
|
#4 |
|
Certified NinjaScript Consultant
|
Here is some of the code... I am not using the wizard. At the bottom are my parameters, like 15 of them...
There is a description and a category, but I don't see a place for the "name." Any more ideas? [Description("")] [Category("Parameters")] publicint BOBs { get { return bOBs; } set { bOBs = Math.Max(1, value); } } [Description("")] [Category("Parameters")] publicdouble EntryAdjust { get { return entryAdjust; } set { entryAdjust = Math.Max(-100, value); } } |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
|
Is this from the code that you said already had spaces? If so... beats me, I'm baffled.
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Hi,
Here is some code snippet demonstrating how to change the display to allow spaces, unfortunately we can not support it though... Code:
[Description("Plots the entry prices")]
[Category("Plots")]
[Gui.Design.DisplayName("Draw Entry Price")]
public bool DrawEntries
{
get { return showentries; }
set { showentries = value; }
}
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Certified NinjaScript Consultant
|
Thanks... exactly what I wanted!!!!! You can close this thread now.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| strategy parameters | kenzo | Strategy Analyzer | 4 | 04-27-2009 04:18 PM |
| No parameters to optimize | CapoeiraNick | Strategy Analyzer | 8 | 02-12-2009 12:06 AM |
| Strategy Parameters | ohowie | Historical NinjaTrader 6.5 Beta Threads | 1 | 01-20-2008 08:39 PM |
| Strategy Parameters Negative int value | MindSabre | Strategy Development | 1 | 04-30-2007 01:28 AM |
| Strategy Parameters | Json | Strategy Development | 2 | 04-01-2007 03:38 PM |