Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Help with shading regions.
Collapse
X
-
Hello KennyK,
Thanks for the reply.
Please try adding the [NinjaScriptProperty] decorator to the top of your properties. This will ensure they are added to the property grid properly.
e.g:
[NinjaScriptProperty]
[Display(Name = "1. Color Zone?", Description = "Color Zone?", GroupName = "Colors - Long Trend Up", Order = 1)]
public bool ColorzoneLU
{
get { return colorzoneLU; }
set { colorzoneLU = value; }
}
I look forward to hearing of your results.
Comment
-
Ok, done that. Seems to save everything now, but all the properties are being written in the top of the chart. How do I get rid of that?
I left the [XMLIgnore] in, but I see in the sample you wrote, you have omitted it. Is that intentional, should I omit the [XMLIgnore] from all the properties?
Thanks for you patience.
Comment
-
Hello KennyK,
Thank you for your reply.
You do not need to put [XMLIgnore] on every property, only the ones that require serialization should have that decorator. Using [XMLIgnore] will guarantee that the property is not saved to the XML file.
To remove the label from the top of your chart, just override the DisplayName property in your script. Customize the display name and the long parameter list will be replaced with whatever you override the display name as.
Please let me know if I can assist further.
Comment
-
Hi Chris, Tried that, got a heap of errors. Probably did something wrong? I just did what I thought it said to do in the link you provided.
You will see in the attached pic, name1, that the default name is what it should be, and does not include all the properties that actually print on the chart.
But I have circled in red, the code that I added as per the perceived instruction.
Please advise.
Thanks, Ken.
Actually there are 3 of the inputs I would like to have display along with the name, just not all the rest of them. The 3 are the EMA periods.
So should look like: TrendMA35. 5, 8, 13.
Comment
-
In addition to the previous message, I have looked at the code of another indicator to find an override example. I have applied it the same way to my indicator. It seems to work.
Can you confirm this is the right way to do it? If so, how then do I get the EMA inputs to show there as well?
Comment
-
Hello Ken,
Thanks for the reply.
Your last image is the correct way of setting up the DisplayName.
To include the EMA parameters, concatenate the values of EMA1Period to the string.
e.g.
public override string DisplayName
{
get { return ("TrendMA35, EMA1 Period: " + EMAPeriod1 );}
}
Please let me know if I can assist further.
Comment
-
Hi Chris,
Thanks for your reply.
I now have this:
public override string DisplayName
{
get { return ("TrendMA35-" + EMA1Period + EMA2Period + EMA3Period);}
}
Which prints this: TrendMA35-82134
Is there as simple way to have commas inserted between each of the EMA settings?
To print like this: TrendMA35-8,21,34
Cheers,
Ken.
Comment
-
Here is your updated code DrawOnPricePanel = false;
ABC123TRADERAttached Files
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment