Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Configurable Vertical and Ray Lines

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

    Draw Configurable Vertical and Ray Lines

    Hi. I have done programming in EasyLanguage before and I have had some success changing other indicators from this forum to meet my needs. However I haven't found any examples for these specific needs.

    DrawVerticalLine: I want to be able to have a vertical line drawn using input I can enter from the Indicator panel. I need to be able input the time to be drawn and configure the vertical line using its various options.

    DrawRay: Same requirements except for a Ray. I'd need to input the time and value of the first anchor point and the time and the value for the second anchor point, plus configure the Ray.

    Coded examples or other indicators where I can look at the code would be appreciated.

    Thanks.

    #2
    1edlong,

    Here are some help guide entries.

    DrawRay() : http://ninjatrader.com/support/helpG...ml?drawray.htm

    DrawVerticalLine() : http://ninjatrader.com/support/helpG...rticalline.htm

    The help guide has some code examples on how to use it. I believe there may be some indicators in the download section of our forum.

    Here is an example of a ray : http://www.ninjatrader.com/support/f...d=4&linkid=451

    Here is an example using vertical lines : http://www.ninjatrader.com/support/f...d=4&linkid=482

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      I suppose I should have mentioned I had tried using the info in the help guides without much success. I'm looking for examples of actual code. I have made use of the ddTimeLine indicator, but it does not allow to configure the drawn line. I will look at the AutoTrendLine Indicator for code on how to draw the Ray, but it also does not allow for the Ray to be configured.

      Thanks for the reply, but I'm hoping for more specific examples which talk to the the ability to change the configuration of the drawn object.

      Comment


        #4
        Originally posted by 1edlong View Post
        I suppose I should have mentioned I had tried using the info in the help guides without much success. I'm looking for examples of actual code. I have made use of the ddTimeLine indicator, but it does not allow to configure the drawn line. I will look at the AutoTrendLine Indicator for code on how to draw the Ray, but it also does not allow for the Ray to be configured.

        Thanks for the reply, but I'm hoping for more specific examples which talk to the the ability to change the configuration of the drawn object.
        Maybe if you posted your code, I could help correct it?

        Comment


          #5
          1edlong,

          Essentially you can create user defined inputs and then pass them into the drawing function. For example :

          DrawRay(string tag, int anchor1BarsAgo, double anchor1Y, int anchor2BarsAgo, double anchor2Y, Color color)

          You can set up the anchor1BarsAgo, anchor1Y, anchor2BarsAgo, and anchor2Y as user defined inputs.

          Please let me know if I may assist further.
          Adam P.NinjaTrader Customer Service

          Comment


            #6
            Since code saved with errors will prevent importing other NinjaScript, I don't save my code unless it works. But thanks for the offer.

            Comment


              #7
              Adam P, well actually, no you cannot be of futher assistance. Thanks for trying.

              Comment


                #8
                1edlong,

                You can just Copy/Paste what you have here and we can take a look.
                Adam P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                574 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                333 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                553 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X