Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
          BertrandNinjaTrader Customer Service

          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.
            BertrandNinjaTrader Customer Service

            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.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ETFVoyageur, 04-30-2024, 02:04 PM
                13 responses
                109 views
                0 likes
                Last Post ETFVoyageur  
                Started by Skifree, Today, 11:21 AM
                1 response
                2 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
                52 responses
                5,265 views
                0 likes
                Last Post olivierh  
                Started by ssijbabu, 10-07-2012, 07:10 AM
                6 responses
                4,430 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by iceman2018, Today, 10:39 AM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X