It's similar for a TimeSpan, though I haven't included a picture. If the parameter is, say, 00:00:00, then 00:00:00 gets inserted into the code. No quotes, no constructor, just 00:00:00.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Wizard builds code that won't compile
Collapse
X
-
Strategy Wizard builds code that won't compile
I noticed cases in the Strategy Wizard where selections in the Condition Builder can result in code that won't compile. It appears that If you use an indicator in Condition Builder that has a parameter that needs to be serialized, like a Color or a TimeSpan, the code that is generated will be incorrect. The attached screen shot shows a Condition Builder entry using an indicator that has a color as a parameter. Notice that the entry for the color parameter is 'Color [Gray]'. That is exactly what gets inserted into the code (rather than Color.Gray), and so you get an error.
It's similar for a TimeSpan, though I haven't included a picture. If the parameter is, say, 00:00:00, then 00:00:00 gets inserted into the code. No quotes, no constructor, just 00:00:00.
Tags: None
-
Mike,
I cant see but what is the indicator this is occuring on?
Is this a custom indicator or a NinjaTrader indicator?
Also, does this color are you able to change it when you add it to the chart just the paremeter appears differently in the strategy builder?
I look forward to assisting you further.
-
Hello,
On my side when I add a customizable color option using the method described below.
The color option isnt there. Did they code this color to be correctly serialized as I think this might be where the issue here.
As the color option should not be visable in the strategy wizard according to my test.
Please check the coding to make sure it has the below aspects and let me know if it does. If it does I would need you to send me an indicator that causes this to happen so I can test on my side.
Comment
-
Okay, "they" is me, and the indicator I used in my example works fine as a stand-alone indicator. I've attached it, though somewhat ruefully because I really don't think this is about the indicator. The issue should remain why a properly-constructed indicator causes Strategy Wizard to generate code that won't compile.
BollingerShaded.zip
Comment
-
Correct, this is because you are working outside of what is supported by the Strategy Wizard. The Wizard cannot take color inputs. For your case, you would need to actually click on the color, bring up the selector, select a color, and then it should populate that selected color into there.Josh P.NinjaTrader Customer Service
Comment
-
Hello,
I would agree.
Currently this is not supported.and as such you will get an non-valid entry since its outside of whats supported. Development is aware of this and will look to add this to a future version of NinjaTrader.
As of currently color inputs parameters will need to be hard coded in if an indicator uses it Unfortunately or selected manually for now.
Thanks for reporting in. You have been of great help narrowing down bugs we/ I very much appreciate it.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Today, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Today, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
Comment