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

Indicator looks fuzzy

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

    Indicator looks fuzzy

    I made some updates to one of my indicators and the lines all appear to be 'fuzzy' now. Is there anything that would cause this?

    I"m using OnRender to do the plotting. Has this issue occurred before in other indicators?

    #2
    RenderTarget.AntialiasMode ?

    Comment


      #3
      Hello habibalex,

      Testing on my end, I am finding that the rendering is the same.

      Attached is a test script I've made.

      The OrangeRed line is using SharpDX.Direct2D1.AntialiasMode.Aliased and has a jagged edge.
      The Brown line is using SharpDX.Direct2D1.AntialiasMode.PerPrimitive and has a smoothed edge.

      Does either line look fuzzy as well?

      May I have a screenshot of you testing this test script to compare with my screenshot?
      Attached Files
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        It's not so much that the line is jagged, it that the chart looks fuzzy. Take a look at the picture below. The top image looks nice and crisp, but the image behind it looks fuzzy.

        I've narrowed it down to a custom drawing object

        Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.


        edit: I have a function setData in my custom drawing shape which has a called when I loop through all the DrawingObjects in my indicator's OnRender method. It then calls the shape's OnRender method to update itself.

        Indicator #OnRender() => shape #setData() => shape #OnRender()

        If I comment out the shape #OnRender() the crispness of the image comes back. If I leave it in, as soon as I complete the 2nd MouseUp to draw the final point of the custom rectangle, it gets fuzzy again.
        Last edited by habibalex; 04-24-2017, 03:47 PM.

        Comment


          #5
          Hello habibalex,

          What is the AntialiasMode used?

          Is there opacity with the drawn line?

          Is it still fuzzy if there is no opacity?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            I had to add the following to the OnRender method in my custom shape to fix the problem. Thanks for the help.

            RenderTarget.AntialiasMode = SharpDX.Direct2D1.AntialiasMode.Aliased;

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by gm7_forum, Today, 05:51 PM
            0 responses
            2 views
            0 likes
            Last Post gm7_forum  
            Started by cre8able, Today, 03:20 PM
            1 response
            9 views
            0 likes
            Last Post cre8able  
            Started by fiddich, Today, 05:25 PM
            0 responses
            3 views
            0 likes
            Last Post fiddich
            by fiddich
             
            Started by gemify, 11-11-2022, 11:52 AM
            6 responses
            804 views
            2 likes
            Last Post ultls
            by ultls
             
            Started by ScottWalsh, Today, 04:52 PM
            0 responses
            4 views
            0 likes
            Last Post ScottWalsh  
            Working...
            X