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

Issue with SharpDX objects to override default plot appearance

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

    Issue with SharpDX objects to override default plot appearance

    I want to override the default plot appearance and using the last example given on this page.



    But I can't get the example to work. The "IsValidDataPointAt" check always returns false. And when removing that if condition "plotValue" always returns 0. When scrolling the chart backwards a bit (to the left) "IsValidDataPointAt" returns true and "plotValue" is correctly populated. But the plots do not display.

    #2
    Hello martyn73,

    Thanks for your post.

    I did not run into those issues when I tested on my end. I've included a demonstration below and attached an export of the indicator so you may test on your end as I am.

    Demo - https://drive.google.com/file/d/1UOk...w?usp=drivesdk

    I may also suggest confirming you are on the latest version of NinjaTrader 8 (8.0.15.1 which can be noted under Help > About.) New versions of NinjaTrader can be downloaded at the link below.

    Download - https://ninjatrader.com/PlatformDirect

    Please let us know if you are encountering issues testing this export on your end.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks for the sample component. Though I still see an issue. The plot lines do not display on a bar in progress. The plot lines appear when scrolling the chart back onto historical bars. The price markers always display even on the bar in progress.

      I'm on version 8.0.13.1 64-bit. I will try upgrading to the latest release and see if that helps.

      Comment


        #4
        Keep in mind, you will need to use a Calculate mode of OnEachTick or OnPriceChange to have the indicator process the developing bar. OnBarClose will wait until the bar closes before the indicator processes that data.

        Calculate - https://ninjatrader.com/support/help.../calculate.htm

        Please let us know if you have any additional questions.
        JimNinjaTrader Customer Service

        Comment


          #5
          Hi there,

          I know this is an old post but it’s relevant.

          The sample code provided in the guide is nice but, how can I make the lines fixed historically? i.e the pivots indicator only shows the current period unless you scroll but would be better if can see all historical pivots at a glance. Is this a huge change or quick tweak?

          Thanks

          Comment


            #6
            Hello mr_trade,

            A script can render pretty much whatever you would like.

            The pivots indicator converts prices to y values and renders a line.

            The logic in OnBarUpdate of the Pivots indicator resets the daily values when the current bar closes.

            Instead of resetting, if you want to keep drawing the pivots from all sessions and let these stack up, you could add to a C# List or a collection or some other custom logic of your choosing.

            The amount of change would not be large amount and would vary in difficulty depending on your experience.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jltarrau, Today, 05:57 AM
            0 responses
            1 view
            0 likes
            Last Post Jltarrau  
            Started by f.saeidi, Today, 05:56 AM
            0 responses
            2 views
            0 likes
            Last Post f.saeidi  
            Started by Stanfillirenfro, Yesterday, 09:19 AM
            7 responses
            51 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by TraderCro, 04-12-2024, 11:36 AM
            4 responses
            70 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Mindset, Yesterday, 02:04 AM
            1 response
            15 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X