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
Label Parameters
Collapse
X
-
Hello dmking,
We have a sample that explains the indicators label and how to format/remove it in the following link: https://ninjatrader.com/support/help...lightsub=label
The label can be controlled by the user from the indicators properties menu or in code. If you use custom formatting in code, you can remove the label or reduce its length/make it more readable if needed.
Keep in mind if you remove the label completely in code using the DisplayName override, that can change how the item is listed in the platforms user interface. Generally, you should also use the State object to provide a default label. You can find an example here: http://ninjatrader.com/support/forum...6&postcount=24
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Jesse,
A follow up question. I want to leave the Indicators: Properties: Parameters Alone. That is, I want to be able to configure the parameters from the UI. The Properties: Label correctly only contains the name of the Indicator. I don't want to see the Parameters on the top of the chart. What do I change in the code to avoid this.
This is urgent, so get back to me when you have the time.
D
Comment
-
Jesse,
I reread what you sent, and the examples and got things to work using
Code:public override string DisplayName { get { return "RepeaterV2.1"; } // to prevent showing all parameters (60+) on the chart }
D
Comment
-
Hello dmking,
Thank you for your reply.
The label in the chart is generated from a combination of the Label property that you can set in the UI along with the user inputs. The syntax you have shown is not a workaround but would be the correct way to modify the label from code. This allows you to remove the parameters or add in just the important ones you wanted to see. This is simply a string which is returned when the label is requested from the indicator. The second thread I had linked demonstrates how to use the State object with this override in case you wanted specifically use a blank label as that causes the user interface to have a blank indicator listed.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
213 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
||
Started by TheWhiteDragon, 01-21-2019, 12:44 PM
|
4 responses
544 views
0 likes
|
Last Post
by PaulMohn
Today, 04:09 AM
|
||
Started by GLFX005, Today, 03:23 AM
|
0 responses
3 views
0 likes
|
Last Post
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
12 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
7 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
Comment