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
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
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.
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 The_Sec, Today, 03:53 PM
|
0 responses
3 views
0 likes
|
Last Post
by The_Sec
Today, 03:53 PM
|
||
Started by love2code2trade, Today, 01:45 PM
|
2 responses
13 views
0 likes
|
Last Post Today, 03:29 PM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
4 responses
26 views
0 likes
|
Last Post
by stafe
Today, 03:27 PM
|
||
Started by mmenigma, Today, 03:25 PM
|
0 responses
1 view
0 likes
|
Last Post
by mmenigma
Today, 03:25 PM
|
||
Started by SugarDefenderGetNow, Today, 03:21 PM
|
0 responses
9 views
0 likes
|
Last Post Today, 03:21 PM |
Comment