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

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 inanazsocial, Today, 01:15 AM
                0 responses
                1 view
                0 likes
                Last Post inanazsocial  
                Started by trilliantrader, 04-18-2024, 08:16 AM
                5 responses
                22 views
                0 likes
                Last Post trilliantrader  
                Started by Davidtowleii, Today, 12:15 AM
                0 responses
                3 views
                0 likes
                Last Post Davidtowleii  
                Started by guillembm, Yesterday, 11:25 AM
                2 responses
                9 views
                0 likes
                Last Post guillembm  
                Started by junkone, 04-21-2024, 07:17 AM
                9 responses
                70 views
                0 likes
                Last Post jeronymite  
                Working...
                X