NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 08-05-2008, 08:14 AM   #1
clearpicks
Senior Member
 
Join Date: Jan 2008
Posts: 257
Thanks: 0
Thanked 0 times in 0 posts
Default How to draw text without background and outline colors specified

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);
}
}
clearpicks is offline  
Reply With Quote
Old 08-05-2008, 08:59 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

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.
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-05-2008, 01:29 PM   #3
clearpicks
Senior Member
 
Join Date: Jan 2008
Posts: 257
Thanks: 0
Thanked 0 times in 0 posts
Default

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.
clearpicks is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 01:56 AM.