Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Line type - borrow from another indicator?

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

    Line type - borrow from another indicator?

    Hi guys,
    There is a line type called up or down triangles used in the UppDnn indicator add on for Opening Range bars. I would like to use these triangles in another instance - for example a Ray that is horizontal from a particular point. Is it possible to somehow go into the script for the UppDnn indicator and “borrow” the triangles part and apply it to the options for the “Ray type”?
    Many thanks,
    Adam.

    #2
    Hello AdamDJ8,

    You can very likely reuse code from the indicator, do you have a link to the item you are asking about so I can take a look at what code was used?

    Also are you asking to create a drawing object that has triangles or is your indicator drawing a ray and you wanted to also draw triangles?
    JesseNinjaTrader Customer Service

    Comment


      #3
      I’m really computer illiterate when it comes to code - its an indicator from UppDnn indicators that i have full access to and is in my list - if you explain how to get a link to the code for it I can do this easily for you - thanks.
      Re the second part of your question - basically you know when you choose to do a drawing object - Ray - you have the choice of line,dash,dash-dot, etc etc , what I’d like is to add the triangles as one of these options so I can use them in other places other than just he opening range bar indicator that is from the vendor. They are really good at drawing your attention to the area.

      Comment


        #4
        Hello AdamDJ8,

        You can access triangle objects from the menu that you are using, they are located under the chart marker foder, they are named triangle up and triangle down. That can also be accessed in NinjaScript if you wanted to add triangles to custom scripts that you use.



        JesseNinjaTrader Customer Service

        Comment


          #5
          Okay so you are on the exact right track with the "triangle up" part of the drawing tool. The question is how do I turn a plain dashed or dotted ray or line into a series of "up triangles"? That's what I'm trying to achieve. So once you've drawn the ray or line - in the options part of this drawing object it would be great if it gave "up triangles" or "down triangles" as an option under the dashes and dots etc etc.

          Comment


            #6
            Hello DJ888,

            To make a line of all triangles would be fairly difficult, you would have to use math calculate the angle of the line between the anchors and draw triangles using OnRender for each point in the line where you wanted a triangle drawn. The way lines are rendered they can have a dash style applied to make it dotted or dashed but a more complex drawing like a triangle with a fill would require using OnRender to draw that.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Ok, I think I’ll let this one slide to be honest - it seems way too hard unfortunately. Thank you very much for confirming that it’s a very difficult task so that I don’t waste anyone else’s time any further - much appreciated. Cheers!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by xfactscout, 07-22-2024, 09:01 PM
              1 response
              23 views
              0 likes
              Last Post xfactscout  
              Started by Chrisnasdaq, 08-26-2023, 08:37 PM
              4 responses
              1,401 views
              0 likes
              Last Post pierodicarlo  
              Started by GillRymhes, 06-23-2022, 09:16 AM
              13 responses
              744 views
              5 likes
              Last Post pierodicarlo  
              Started by aligator, 06-22-2022, 01:10 PM
              13 responses
              1,821 views
              0 likes
              Last Post pierodicarlo  
              Started by sumobull, Today, 06:48 PM
              0 responses
              10 views
              0 likes
              Last Post sumobull  
              Working...
              X