Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue with Draw.Text

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Issue with Draw.Text

    I am having an issue with Draw.Text() with NT8. The code using DrawText() in NT7 is working properly. The brush color always prints the same regardless of which string is printed.

    protected override void OnBarUpdate()
    {
    SimpleFont textFontTV = new Gui.Tools.SimpleFont( "Arial", 18 ) { Bold = true }; // Tick Volume Label Font
    SolidColorBrush BrushTickAsk = Brushes.LightSalmon;
    SolidColorBrush BrushTickBid = Brushes.LightGreen;

    if( Close[ 0 ] >= GetCurrentAsk() )
    Draw.Text( this, "tagBidAskVol", true, GetCurrentBidVolume().ToString() + " / >" + GetCurrentAskVolume().ToString(), -2, Close[ 0 ], 0, BrushTickAsk, textFontTV, TextAlignment.Left, Brushes.Transparent, Brushes.Transparent, 0 );
    else
    Draw.Text( this, "tagBidAskVol", true, GetCurrentBidVolume().ToString() + "< / " + GetCurrentAskVolume().ToString(), -2, Close[ 0 ], 0, BrushTickBid, textFontTV, TextAlignment.Left, Brushes.Transparent, Brushes.Transparent, 0 );
    }

    Thanks.

    #2
    Hello Omega,

    Thanks for your post and welcome to the forums.

    I was able to replicate the issue. I reduced the code down to:

    Code:
    if( Close[ 0 ] == GetCurrentAsk() )
    			{
    
    				Draw.Text (this, "test","Testing", 0,Low[0]-10*TickSize,Brushes.LightSalmon);
    			}
    			else
    			{
    				//RemoveDrawObject ("test");
    				Draw.Text (this, "test","Untesting", 0,Low[0]-10*TickSize,Brushes.LightGreen);
    			}
    As you can see I also tried removing the draw text object just to test and found that to cause the 2nd draw.text never to print.

    I have entered a bug report on the issue.

    Thanks for reporting the issue and for your participation in the beta test program.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul for your quick reply to this issue!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by tonynt, Today, 11:50 AM
      0 responses
      2 views
      0 likes
      Last Post tonynt
      by tonynt
       
      Started by Welovethelibrary, Today, 11:44 AM
      0 responses
      2 views
      0 likes
      Last Post Welovethelibrary  
      Started by goodknight777, Today, 11:39 AM
      0 responses
      5 views
      0 likes
      Last Post goodknight777  
      Started by MohammedAmine, Today, 10:44 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by Nolyn, Today, 10:59 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X