I am trying to add an indicator to my strategy. The indicator has an expandable property. How does one specify the input values for the expandable property inside the strategy? Any advice would be greatly appreciated. Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Add Indicator with Expandable Property
Collapse
X
-
Add Indicator with Expandable Property
Hi,
I am trying to add an indicator to my strategy. The indicator has an expandable property. How does one specify the input values for the expandable property inside the strategy? Any advice would be greatly appreciated. Thank you.Tags: None
-
Hello Zeos6,
Thanks for your post.
Alot of the time you just need to include that input inside your call to the indicator. For example, we'll call my custom indicator "AAA" , if I have a boolean drop down selector inside my indicator AAA's parameters, I would set that by doing something similar to the following in my strategies code.
If you have multiple selectable parameters you will need to make sure you are setting the correct one. For that you can use the built in intelliPrompt inside the NinjaScript editor. I am including a link to that help guide page below. intelliPrompt will let you know what order your inputs are in and the type of input.Code:else if (State == State.DataLoaded) { AddChartIndicator(AAA(true)); }
IntelliPrompt
https://ninjatrader.com/support/help...elliprompt.htm
Please let me know if you have any questions.Josh G.NinjaTrader Customer Service
-
Thanks for the reply Josh but this is is not answering my question. I know how to set the values of simple indicator properties.
The issue is how to set values for an expandable property created via a class. The property will generally not have a [NinjaScriptProperty] attribute. If the attribute is added, then I get the error:
The type or namespace name 'MyPropertyClass' could not be found (are you missing a using directive or an assembly reference?)
How exactly does the [NinjaScriptProperty] attribute work?
Comment
-
Hello Zeos6,
Thanks for letting me know.
I believe the following forum post is what you are looking for. It discusses how to create user defined input parameters. The second link goes over parameter sequencing.
https://ninjatrader.com/support/foru...ead.php?t=5782
https://ninjatrader.com/support/foru...ead.php?t=4770
If this is not what you are looking for please provide a sample of the code.
Let me know if you have any questions.Josh G.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment