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

Add own png diamond.

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

    Add own png diamond.

    How can i load my own png diamond shape instead of using the draw.diamond code?

    I want to use custom shape by using a png to overlay over my chart. Is that possible?

    #2
    Hello priceisking,

    The default drawing tools would not have an option to change the graphic they draw, this is all done through code and is not an image.

    If you do want to draw an image you can, however, this is something you would need to Render using OnRender rather than having a drawing object. you can find a sample of drawing an image in the following link: https://ninjatrader.com/support/foru...chart?t=107504

    Alternatively, you can take a look at the code for the drawing tools to see how they generate shapes which you could replicate in your scripts OnRender.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you so much. Will look into this. Also, any way to increase the size of the diamond or arrows? I don't see size option in the documentation. Document states that it will autosize but i want it to be bigger from the default size.

      Comment


        #4
        Hello priceisking,

        In this case, there is not a way to change the size, this is based on the chart scaling and compression. When using OnRender you can instead decide to render at any size you wish so that would generally be the way around this situation.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Ok great. Thanks. Will take a look at OnRender. If you have any other examples of OnRender being used, please send me link. Thank you again.

          Comment


            #6
            Hello priceisking,

            The best example is the SampleCustomRender indicator that comes with the platform however you can also view any of the drawing tools as they all use OnRender, specifically the shape tools.

            The helpguide is also a good resource:




            There are a few indicators which use this concept as well like the pivots and zig zag.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sofortune, Yesterday, 11:48 AM
            2 responses
            23 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by Zach55, 02-19-2024, 07:22 PM
            2 responses
            57 views
            0 likes
            Last Post lbadisa1  
            Started by JGriff5646, Today, 05:47 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by AlphaOptions, 06-18-2013, 08:24 AM
            9 responses
            2,200 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by ttrader23, Today, 09:33 AM
            3 responses
            23 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X