![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Jan 2008
Posts: 257
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
How can Ninjascript draw texts with only front color specified? It does not accept null as a valid parameter for background color and outline color. Also the left border of the outline box incorrectly overlaps with the first letter in drawn text, is this a buy in drawtext()? - Clearpicks if ( FirstTickOfBar ) { if ( Count -1 - CurrentBar == 0 ) { DrawText("Test", false, " --Test", 0, Close[0], 0, Color.Red, tcFont, StringAlignment.Near, Color.Red, Color.Yellow, 5); } } |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
I suspect this overload would work:
DrawText(string tag, string text, int barsAgo, double y, Color color) Regarding overlapping, your alignment parameter causes that I suspect.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2008
Posts: 257
Thanks: 0
Thanked 0 times in 0 posts
|
So it seems drawText() can not draw outline box correctly when the string alignment is Far or Near. It only works correctly when it is set to Center. This is a minor bug.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Draw tools that draw on multiple charts of the same instrument | cipher4d | Suggestions And Feedback | 3 | 04-19-2008 12:33 AM |
| Enabling black Outline of Candles | RK_trader | Indicator Development | 26 | 02-14-2008 06:48 AM |
| Custom Plot colors & Thresholds & Price marker colors | higler | General Programming | 5 | 06-22-2007 07:47 AM |
| Plotting background colors between bands | rt-trader | Indicator Development | 11 | 01-20-2007 05:24 AM |
| Option to display hidden background colors in the PRICE column | jwalker | Suggestions And Feedback | 1 | 02-22-2006 12:22 PM |