NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-30-2007, 01:09 AM   #1
MindSabre
Junior Member
 
Join Date: Apr 2007
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

When I enter a negative value (ex.-10) in a field of a Strategy for analyzing, it gets changed to 1. Can parameters not be negative int32 values? How to solve this?
MindSabre is offline  
Reply With Quote
Old 04-30-2007, 01:28 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

If you generated your strategy via the NinjaScript Editor, look under the Properties section and find the parameter you wish to have a negative value.

You will see something like Math.Min(1, value) --> Change the "1" to a negative number.

If you generated your strategy via the Wizard, in the "User Defined Inputs" screen, set the "Min." value to a negative number.

Ray
NinjaTrader_Ray 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


All times are GMT -6. The time now is 03:40 PM.