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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
57 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment