Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Font size in Draw methods
Collapse
X
-
Thank you, Bertrand. Previous to adding color and font, my DrawTextFixed statement had compiled and worked fine. When I added color or both, I got "No overload for method 'DrawTextFixed' takes '4' arguments" Then the message with '5' arguments. Here is the statement.
DrawTextFixed("yesterClose",dtPrevTradeDate.ToString("dddd") + "'s close was "+ Convert.ToString(yesterClose),TextPosition.TopRigh t,Color.Green,new Font("Arial",18));
Note: Right is shown with a space between the h and t in my browser but that's not the case in my code.Last edited by sgordet; 01-01-2011, 01:49 PM.
Comment
-
If you take the advanced overload with more options, you need to define outline color, area color and opacity as well, would the below compile for you?
DrawTextFixed("yesterClose", dtPrevTradeDate.ToString("dddd") + "'s close was "+ Convert.ToString(yesterClose), TextPosition.TopRight, Color.Green, new Font("Arial",18), Color.Blue, Color.DarkGray, 5);
Comment
-
Bertrand,
I tried a variation of your suggestion:in variables I included
private Font myFont = new Font("Arial Bold", 12);
and then in my code I have:
DrawText(CurrentBar.ToString(), "xMA1", 0, High[0] + 5 * TickSize * vTickMult, Color.Black, new Font("Arial Bold", 12) );
but I get 'no overload for drawtext takes 6 arguments' ... this does draw correctly if I dont have the last 'new Font("Arial Bold"), 12) included !
What did I miss?
Thanks,
Jon
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
633 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
567 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment