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 PaulMohn, Today, 12:36 PM
                0 responses
                1 view
                0 likes
                Last Post PaulMohn  
                Started by love2code2trade, 04-17-2024, 01:45 PM
                4 responses
                38 views
                0 likes
                Last Post love2code2trade  
                Started by alifarahani, Today, 09:40 AM
                2 responses
                13 views
                0 likes
                Last Post alifarahani  
                Started by junkone, Today, 11:37 AM
                3 responses
                20 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by frankthearm, Yesterday, 09:08 AM
                12 responses
                44 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Working...
                X