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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      139 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      295 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      240 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      339 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      172 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X