NinjaTrader Support Forum  
X

Attention!

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


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 08-09-2010, 01:14 PM   #1
billr
Senior Member
 
Join Date: Apr 2010
Location: San Antonio, Texas
Posts: 315
Thanks: 31
Thanked 2 times in 2 posts
Default Adding variables

I know this is a very basic question, but how do you add user defined variables that show up in the Strategy Edit table like those created using the Wizard? Below is a shot of the current variables:


Code:
 
#region Variables
// Wizard generated variables
private int dEMA1 = 1; // Default setting for DEMA1
private int dEMA2 = 1; // Default setting for DEMA2
private int profTgt1BE = 1; // Default setting for ProfTgt1BE
private int profTgt2 = 1; // Default setting for ProfTgt2
private int profTgtSell = 1; // Default setting for ProfTgtSell
private int stopInitial = 1; // Default setting for StopInitial
private int stop2 = 1; // Default setting for Stop2
// User defined variables (add any user defined variables below)
#endregion
I tried inserting int stop3 = 1; just above the #endregion, and also private int stop3 = 1; within the Wizard generated variable, but that doesn't work.

thanks.
billr is offline  
Reply With Quote
Old 08-09-2010, 01:41 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi billr,

Please see this post on creating user defined input parameters.
http://www.ninjatrader.com/support/f...ead.php?t=5782
NinjaTrader_RyanM 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gloabal Variables? mktrend General Programming 61 08-15-2012 02:04 PM
Help with variables? jhsoccer9 General Programming 1 07-29-2010 06:27 AM
Using variables eswap0 General Programming 2 06-07-2008 05:56 PM
Global variables monpere Strategy Development 1 03-10-2008 07:06 PM
where should variables be declared? Folls Indicator Development 2 05-04-2007 11:12 AM


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