Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can not get DrawText to work (NT6)
Collapse
X
-
We just were able to figure this one out.
This line creates font object:
Font fnt = new Font (FontFamily.GenericSansSerif, 14.0F,
FontStyle.Bold);
Now, it can be used in drawing (string cnt needs to be filled with value):
DrawText("counter", cnt, 1, High[1]+2, Color.Blue, fnt,
StringAlignment.Center, Color.DarkSeaGreen, Color.DarkSeaGreen, 10);
Regards,
redduke
-
imported post
Apart from setting and saving the default font size? Sorry no.
Leave a comment:
-
imported post
Dierk,
The logic that I have constanly removes and then draws the values. I need to remove them because otherwise the charts will be too clogged. So, even if I change the text object settings and increase the font, it obviously dissapears once it removed and drawn again. Any other way of increasing it?
Thanks,
redduke
Leave a comment:
-
imported post
Not programmatically. You can change the properties of an existing text object and save them as default.
Leave a comment:
-
imported post
Hi Dierk,
Is there anyway to increase the size of the font?
Thanks
Leave a comment:
-
imported post
Please inspect your logs. NT reports issues to the logs. It's always a good idea to check there first. There likely will be an error message
Error on calling the 'OnBarUpdate' method for indicator 'MyCustomIndicator' on bar 1: Bar index needs to be greater/equal 0
You need to code:
Code:if (CurrentBar >= 5) DrawText("TEST", "TEST1", 5, Close[1], Color.Black);
We will look into making this more tolerant...
Leave a comment:
-
Can not get DrawText to work (NT6)
I created an indicator using wizard without changing anything.
The only line of code that I have in OnBarUpdate()is
DrawText("TEST", "TEST1", 5, Close[1], Color.Black);
However, nothing is being displayed on the chart. I am obviously doing something wrong.
Thanks,
redduke
Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fscabrera03, Today, 05:46 PM
|
0 responses
1 view
0 likes
|
Last Post
![]()
by fscabrera03
Today, 05:46 PM
|
||
Started by jleira, Today, 05:45 PM
|
0 responses
2 views
0 likes
|
Last Post
![]()
by jleira
Today, 05:45 PM
|
||
Started by AaronKoRn, Today, 03:05 PM
|
1 response
11 views
0 likes
|
Last Post
|
||
Started by zacharydw00, Today, 02:21 PM
|
2 responses
15 views
0 likes
|
Last Post
![]()
by zacharydw00
Today, 03:56 PM
|
||
Started by Harvard, Today, 12:01 PM
|
2 responses
15 views
0 likes
|
Last Post
![]()
by Harvard
Today, 01:51 PM
|
Leave a comment: