![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2006
Location: Chicago, Illinois, USA
Posts: 126
Thanks: 0
Thanked 1 time in 1 post
|
Hi,
When I use the wizard to generate a user settable input that defaults to a negative value, it gets set to 1 instead. This is verified after installing the strategy in a chart and looking at the input values. Why does every set use Math.Max(1, value)? Can't it just use the value that is passed? Code generated in variables section: private int minSwingShort = -100; // Default setting for MinSwingShort Code generated in properties section: [Description("")] [Category("Parameters")] public int MinSwingShort { get { return minSwingShort; } set { minSwingShort = Math.Max(1, value); } } Thanks, Folls |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
When you define the Input in the Wizard, there is a "Min" value that you must set. By default this is 1. You need to change this to a min value that is less than -100.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Invalid User Password | cabmanage | Installation and Licensing | 1 | 03-18-2007 01:27 AM |
| New user - automation question | Steveinvest | Automated Trading | 2 | 11-21-2005 01:18 PM |
| User Manual PDF Format. | Ripcat | Miscellaneous Support | 1 | 09-26-2005 09:03 AM |
| User Guide download | tradingkevin | Suggestions And Feedback | 1 | 03-02-2005 07:02 PM |
| New user-can't get YM to load | ron | Miscellaneous Support | 2 | 01-20-2005 03:23 AM |