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 sjsj2732, 03-23-2026, 04:31 AM
                0 responses
                42 views
                0 likes
                Last Post sjsj2732  
                Started by NullPointStrategies, 03-13-2026, 05:17 AM
                0 responses
                295 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                290 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                135 views
                1 like
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                98 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Working...
                X