![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Location: Atlanta
Posts: 281
Thanks: 0
Thanked 4 times in 3 posts
|
I am having an issue when using DrawText and setting the AutoScale to false. Could you folks test this on your end to determine if it is a "Me" issue or NT issue. The image included shows the issue. This is the code that I am using:
#region Variables // Wizard generated variables private int myInput0 = 1; // Default setting for MyInput0 private System.Drawing.Font textFont; #endregion protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0")); CalculateOnBarClose = true; Overlay = true; PriceTypeSupported = false; textFont = new Font("Arial", 16 ); } protected override void OnBarUpdate() { if (ToTime(Time[0]) == 151500 ) DrawText( "test" + CurrentBar.ToString(), false, "Test Something", 0, High[0] + 100 * TickSize, 0, Color.Black, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0); } Thanks. You guys are great. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
What is it you are trying to accomplish? The issue is not apparent to me from your screen shot.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Dec 2007
Location: Atlanta
Posts: 281
Thanks: 0
Thanked 4 times in 3 posts
|
Quote:
When I open the Text Properties and UnCheck the "Auto scale" it performs as expected. I don't have this issue with DrawLine, DrawArrowUp, DrawArrowDown, DrawRectangle when setting the AutoScale variable to true or false. That leads me to believe that POSSIBLY the DrawText command is not handling the AutoScale correctly or something is not working correctly on my computer. One or the other. That is the reason I ask if it could be confirmed as a "Me" issue or NT issue. I have tried everything that I can think of and have not found a solution to the problem. |
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
I will have someone take a look at this on Monday. Thank you for your patience.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2007
Location: Atlanta
Posts: 281
Thanks: 0
Thanked 4 times in 3 posts
|
Now I am confused. Monday morning and I just started NT and the AutoScale is working as expected for the DrawText(...) command. Will watch and report. Maybe I was doing something wrong or it is an issue with my computer. Clueless at the moment.
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
Ok, thanks for reporting back - did you try this in a brand new chart and workspace? Do you see any errors in the logs if this happens? If it happends again, please reference this thread and send us your log and trace through the Help > Mail to Support feature - thanks!
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AutoScale | hegh2000 | Indicator Development | 4 | 05-18-2009 01:42 PM |
| DrawHorizontalLine/Autoscale | hemlock | Charting | 6 | 05-05-2009 08:26 AM |
| Turning off AutoScale using a custom indicator | Newton | Charting | 1 | 01-14-2009 01:10 PM |
| Autoscale on Horizontal Line | chantj | General Programming | 6 | 03-26-2008 10:15 AM |
| DrawText AutoScale property no longer works | Rollins | Historical NinjaTrader 6.5 Beta Threads | 4 | 02-25-2008 05:36 AM |