Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

clearing text from .TopRight

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

    clearing text from .TopRight

    This code works ok initially. But when i change the text later (same tag), some of this text remains, and the new text partially covers it up, making it unreadable. How do i clear it?


    { DrawTextFixed("Status", "OK to trade"+"\n" +myMktPosition, TextPosition.TopRight);

    #2
    That should not happen if you are using the same tag. Are you sure you are not calling it in another location with some more drawing elsewhere? Maybe even a different tag?

    What you can try is calling RemoveDrawObject() prior to the second call and see if you can clear it out that way.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Still having a problem removing the old draw object.. both draw objects are superimposed, I would expect when i hit <f5> to restart the strategy, the old object should be deleted
      v 7.,01
      The following code is in OnStartUp
      RemoveDrawObject("BLStatus");
      statusBL = plFactor+" "+myAtmML;
      //DrawTextFixed("BLStatus", statusBL, TextPosition.BottomLeft);
      DrawTextFixed("BLStatus", statusBL, TextPosition.BottomLeft, Color.White, FontMed, Color.Yellow, Color.White, 0);

      It does not matter which of the 2 DrawTextFixed statements i use, the problem of superimposed msgs remains.
      BLStatus is not ref'd anywhere else in code

      Comment


        #4
        Hello,

        Your code does not post any ghosting on my side.

        Can you please let me know what version of NinjaTrader you are using this is located in the Control Center under Help->About and is to the right of the NinjaTrader logo.


        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        649 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        576 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X