Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Can I use a \n character in an indicator Property ??
Can I have a "\n" character in a string variable that I set using Ninjatrader indicator properties?
Ex:
private string entryText = "Entry\nPrice";
DrawText(..., entryText,...);
+Properties
[GridCategory("Screen Text")]
[Gui.Design.DisplayName ("Entry Price")]
public string EntryText
{
get { return entryText; }
set { entryText = value; }
}
The issue is that if I have a "\n" character and I do not escape it with another \ then it does not appear in the properties. If I escape it then it prints as "Entry\nPrice";
Is there a way around this apart from offsetting with two DrawText statements?
regards
p
Can you help answer these questions from other members on NexusFi?
Easiest would be to have two properties and then add the newline in code, then DrawText. Alternatively you could use some character as placeholder for the newline and substitute it for the newline in code.
"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.” Prof. Albert Bartlett