Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Changing variable while Strat Analyzer open causes error
Collapse
X
-
Hello PN720,
I was able to replicate and have submitted this as a bug report.
Thanks for your report.
-
Hi Alan,
I noticed that your syntax is slightly different than mine but I'm not sure that matters.
Anyways, you'll notice that following your steps and your script, you'll see 2 things:
1. In the Log File, you'll see this error after changing and compile:
Time Category Message
8/16/2018 8:39:57 AM Default Error on getting/setting property 'Xx' for NinjaScript 'aaTest/-1': Object of type 'System.Double' cannot be converted to type 'System.Int32'.
2. The Optimization no longer runs as you get no results.
Leave a comment:
-
Hello PN720,
Thank you for your note.
After step 7, the compile, do nothing and the error should come up? I'm having trouble replicating with the script I've attached. I run a optimization, go to the script, uncomment line 73-76 and comment out line 68-71.
What version of NT8 are you on?
I look forward to your reply.Attached Files
Leave a comment:
-
Changing variable while Strat Analyzer open causes error
Hey fellas -
I wanted to report a bug I found while working in the Strat Analyzer. If you have an input parameter that was one variable type and then you change to another while the Strat Analyzer Optimization is open, the Optimization gets confused. After the error condition happens, it won't correct until you restart Ninjatrader.
Steps to duplicate:
1. Create/open a test script.
2. Create an input parameter (i.e. double). For example:
[NinjaScriptProperty]
[Range(1.0, 10.0)]
[Display(ResourceType = typeof(Custom.Resource), Name="Test1", Description="Test1", Order=1, GroupName="NinjaScriptStrategyParameters")]
public double Test1
{ get; set; }
3. Compile.
4. In Strategy Analyzer, select your script and Backtest type (Optimization).
5. Put in some valid values and Run.
6. Go back to your script and change the input parameter to an Int with a range of 1-100 or something.
7. Compile.
8. Note the Strat Analyzer field changed to a single field and the drop down is no longer available.
9. If you change the Backtest type from Standard back to Optimization, it doesn't fix itself. If you close out and restart Strat Analyzer, it doesn't fix itself.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Today, 09:48 PM
|
1 response
11 views
0 likes
|
Last Post Today, 11:54 PM | ||
Started by Mikey_, Today, 09:21 PM
|
0 responses
11 views
0 likes
|
Last Post
by Mikey_
Today, 09:21 PM
|
||
Started by cre8able, Today, 05:53 PM
|
3 responses
14 views
0 likes
|
Last Post
by cre8able
Today, 09:20 PM
|
||
Started by Aryan Kumar, Today, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Today, 09:04 PM
|
||
Started by yertle, Yesterday, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Today, 08:38 PM
|
Leave a comment: