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.

    Comment


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X