Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Font Family for Font()
Collapse
X
-
Hello ballboy11,
Thanks for opening the thread.
Yes, you can create a SimpleFont parameter in NinjaTrader 8 and then the user can select the components used to create the font.
Code:if (State == State.SetDefaults) { UserFont = new NinjaTrader.Gui.Tools.SimpleFont("Courier New", 12) { Size = 50, Bold = true }; }Code:[NinjaScriptProperty] [Display(Name="UserFont", Order=1, GroupName="Parameters")] public SimpleFont UserFont { get; set; }
Please let me know if I may be of further assistance.
-
-
Hello eDanny,
Thanks for your feedback.
We have a feature request tracking interest to expand the SimpleFont Class. I will submit your feedback to this request so we can track your interest as well.
The ticket ID for the feature request is SFT-1135 and will be noted in the Release Notes page upon implementation. Release Notes can be found here: https://ninjatrader.com/support/help...ease_notes.htm
If there is anything I can else to do to assist in the meantime, please let me know.
Comment
-
Thank you
Thank you but I still have 1 issue. I did get it to work but when initializing the indicator the MyInput0 is always set to (none);
private Font nMyInput0 = new Font("Arial",12,FontStyle.Bold );
[Description("Font Name")]
[GridCategory("Font Parameters")]
public Font MyInput0
{ get; set; }
How do I get it initialized?
Comment
-
I changed this got rid of the n in front and it shows,BUT now I created a template and my Indicator will not load with the object. I have to manually load the indicator.
For some reason the template will not accept it if saved.
private Font MyInput0 = new Font("Arial",12,FontStyle.Bold );
[Description("Font Name")]
[GridCategory("Font Parameters")]
public Font MyInput0
{ get; set; }
How do I get it initialized?
Comment
-
When I really need to, I just ignore the SimpleFont class and use the correct Font class for WPF: System.Windows.Media.FontFamily.Originally posted by eDanny View PostUnfortunately this is very limited compared to NT7. How to access underlined, strikeout, condensed, etc? NT8 won't even allow an Arial Narrow selection, a critical font for saving horizontal space.
ref: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
Comment
-
Make a web search on how to properly serialize fonts. You could also use a TypeConverter. ref: https://www.google.com/search?safe=o...for+fonts+C%23Originally posted by ballboy11 View PostI changed this got rid of the n in front and it shows,BUT now I created a template and my Indicator will not load with the object. I have to manually load the indicator.
For some reason the template will not accept it if saved.
private Font MyInput0 = new Font("Arial",12,FontStyle.Bold );
[Description("Font Name")]
[GridCategory("Font Parameters")]
public Font MyInput0
{ get; set; }
How do I get it initialized?
Comment
-
Thanks for your helpful posts koganam.
@ballboy11, you may also search for previous threads in the NinjaTrader 7 forum to see if someone else has encountered this before.
I found a complete example with some quick googling: http://ninjatrader.com/support/forum...69&postcount=4
Comment
-
Maybe that is why they are called "Simple"?Originally posted by koganam View PostWhen I really need to, I just ignore the SimpleFont class and use the correct Font class for WPF: System.Windows.Media.FontFamily.
ref: https://msdn.microsoft.com/en-us/library/system.windows.media.fontfamily(v=vs.110).aspx
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment