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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
67 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
36 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
60 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment