![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 times in 0 posts
|
Hi. I have been working with and fine tuning a strategy of mine. I just recently added a variable to my existing list, but I can't seem to get Ninja to recognize it when I pull up the strategy to backtest or run in simulation mode. It is acting as if it is not there. I have compiled and saved the strategy and each time I open the strategy to edit, I can see it in the code, but it does not seem to get recognized by Ninja.
Do I need to perform another step to get it recognized somehow? Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Mannygags,
I am happy to assist you. Yes, there is an additional step if you simply added a variable to the code. If you look at the section : Properties at the bottom of the editor when you have the strategy open, then expand it by clicking the "+" icon to the left, it will show necessary code for user defined variables. It looks something like this : Code:
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int Fast
{
get { return fast; }
set { fast = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Slow
{
get { return slow; }
set { slow = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int StopLoss
{
get { return stopLoss; }
set { stopLoss = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int TakeProfit
{
get { return takeProfit; }
set { takeProfit = Math.Max(1, value); }
}
#endregion
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks! That's what I needed.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Mannygags,
You're welcome. Please don't hesitate to contact us should you require additional assistance.
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 times in 0 posts
|
Another quick question. I am looking at purchasing a new amchine to trade on. Is Ninja supported on Windows 7? Are there any known issues?
Thanks again. |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Mannygags,
NinjaTrader works in WIndows XP/Vista and 7. There are no known issues in using it across platforms. Please let me know if I may assist further.
Adam P.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Variable problem | RickStevenson1 | Strategy Development | 5 | 05-17-2010 06:25 AM |
| Variable Persistence | FatCanary | Strategy Development | 4 | 04-28-2010 02:02 PM |
| Expression As Variable | JT454 | General Programming | 2 | 02-25-2010 09:23 AM |
| Srategy terminated "price below stop price" How can I fix? | ninjablanks | Automated Trading | 2 | 06-08-2009 06:37 AM |
| Variable in Wizard | Stainless2000 | Strategy Development | 3 | 08-29-2008 02:23 PM |