Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

iline object

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

    iline object

    Hallo

    I'm using a manually drawn line object.

    When i change programatically StartY or EndY, the change happens but when i do the same for StartBarsAgo or EndBarsAgo it doesn't.

    Am i doing something wrong ?

    Thanks in advance.

    #2
    Hi voyager,

    I believe this should work as well, with StartY or EndY. Can you provide some stripped down snippets of code for me to test on my end?
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks for replying

      A little code:


      string LineName;
      double currentY;
      foreach (IDrawObject draw in DrawObjects){
      if ( draw is ILine){
      ILine drawnLine = (ILine) draw;
      drawnLine.StartY = drawnLine.EndY;

      drawnLine.StartBarsAgo = 60;
      drawnLine.EndBarsAgo = 10;
      }
      }


      where the drawnLine.StartY = drawnLine.EndY;
      works fine ( the line becomes horizontal ) ,
      but the drawnLine.StartBarsAgo = 60;
      drawnLine.EndBarsAgo = 10;
      dont work.
      Please remember to create manually a line.
      Thanks again

      Comment


        #4
        Hi voyager,

        Thank you for you patience while I try this on my end.
        TimNinjaTrader Customer Service

        Comment


          #5
          voyager, I was able to reproduce this here, we'll look into matters.

          Comment


            #6
            voyager, we checked into and the outcome is unfortunately expected : it's not possible to modify those properties for manual drawn objects via code as otherwise malicious code could easily modify a users custom drawn objects, so this is a safeguard to ensure this would not happen.

            Comment


              #7
              Thanks for your help.

              p.s. Maybe i could propose for the security level to be manually adjustable.

              Comment


                #8
                You're welcome, thanks for your suggestion.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                594 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                343 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                556 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                554 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X