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 CaptainJack, 05-29-2026, 05:09 AM
                0 responses
                217 views
                0 likes
                Last Post CaptainJack  
                Started by CaptainJack, 05-29-2026, 12:02 AM
                0 responses
                132 views
                0 likes
                Last Post CaptainJack  
                Started by charlesugo_1, 05-26-2026, 05:03 PM
                0 responses
                147 views
                0 likes
                Last Post charlesugo_1  
                Started by DannyP96, 05-18-2026, 02:38 PM
                1 response
                231 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 05-11-2026, 05:56 AM
                0 responses
                192 views
                0 likes
                Last Post CarlTrading  
                Working...
                X