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

DrawHorizontalLine

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

    DrawHorizontalLine

    Hello all,
    when i use DrawHorizontalLine , I'm getting the result i want but , the line is clickable and movable and doesn't display the price on Y axis , so I'm trying to swich to use Plot,
    Add(new Plot(Color.Navy, PlotStyle.Line, "Line1"));
    Line1.Set(Line1Value);

    this way I have to use the code under OnBarUpdate and for every bar , is there any way to make the line extended ? without looping thru every bar ? or if that's not possible is there a way to draw a line with DrawHorizontalLine but the line is not clickable nor movable and points/displays the price on Y axis ?
    Thanks alot

    #2
    Doing some search , i found using
    Add(
    new Line(Color.Gray, 1250, "whatever")); will genrate unclickable, unmovable line, Great, but it doesnot display the the price on Y axis. what to do ?

    Comment


      #3
      Unfortunately not. You will need to update it every bar or just use the DrawHorizontalLine and have it being clickable.

      You could try overriding the Plot() method to draw a static line, but this is beyond the level of programming we can support on the forums.

      Edit: I thought you did not want it to show a the price marker?
      Last edited by NinjaTrader_JoshP; 09-09-2008, 04:53 PM.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Josh View Post
        Unfortunately not. You will need to update it every bar or just use the DrawHorizontalLine and have it being clickable.

        You could try overriding the Plot() method to draw a static line, but this is beyond the level of programming we can support on the forums.

        Edit: I thought you did not want it to show a the price marker?
        I want to show the price marker , is that possible using Add(new Line(Color.Gray, 1250, "whatever")); ?

        Comment


          #5
          I believe not. You could try PaintPriceMarkers = true in the Initialize() method. If that doesn't work then it is un-doable.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by funk10101, Today, 12:02 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by GLFX005, Today, 03:23 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by nandhumca, Yesterday, 03:41 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, Yesterday, 03:37 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by vecnopus, Today, 06:15 AM
          0 responses
          1 view
          0 likes
          Last Post vecnopus  
          Working...
          X