Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unlock Text

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

    Unlock Text

    Is it possible, code wise, to have text that is NOT locked on the chart

    eg some text at the top of a bar that you can grab and move around without having to 'unlock' - or have I missed a trick somewhere?

    #2
    i suppose with NT7 it can be done.

    heres a code snippet.

    Code:
    IText t = DrawText("txt" + CurrentBar,CurrentBar.ToString(),0,High[0],Color.Red);
    t.Locked = false;

    Comment


      #3
      lock

      Bukkan - many thanks for that - I don't quite see why support couldn't have come up with that?

      Comment


        #4
        Update

        IText is a little quirky - so if you produce IText from outside the OnBarUpdate the unlocking facility no longer works.

        Found this in help which is a bit brute force but it does the job in a manner of speaking...

        Code:
        // Loops through the DrawObjects collection
         foreach (IDrawObject draw in DrawObjects)
         {
         // Unlocks all draw objects for manual manipulation on the chart
            draw.Locked = false;
        }

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        73 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X