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
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.JimNinjaTrader Customer Service
-
-
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.JimNinjaTrader Customer Service
Comment
-
Hello ballboy11,
Sorry for any confusion.
You can make a Font parameter for NinjaTrader 7 as follows:
[Description("")]
[GridCategory("Parameters")]
public Font MyInput0
{ get; set; }JimNinjaTrader Customer Service
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
-
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
-
Originally 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=4JimNinjaTrader Customer Service
Comment
-
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 andrewtrades, Today, 04:57 PM
|
1 response
5 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
3 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment