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

Plot only some data points in data series -- Is this possible??

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

    Plot only some data points in data series -- Is this possible??

    Hello,


    I am interested in only displaying a limited number data points in a data series based indicator.

    For example, if one created an indicator in which a plot would connect each high, is there any way that one could only plot the last five data points, rather than every plot.

    Please see the attached graphic for a visual represenation of what I would like to accomplish.

    I am currently using NT 6.5 and would prefer a solution that would work in 6.5 if possible.
    Attached Files
    Last edited by h1000; 12-31-2010, 08:56 AM. Reason: more info

    #2
    Hello,

    Thanks for the note.

    This would require overriding the Plot method to do this as this is not supported by NinjaTrader by default.

    An example of how to do this is found if you look into the Pivots indicator for example, specifically the Override of the Plot method.

    As far as any documentation or other information on this unfortunately I'm unable to provide as this is officially not supported.

    Let me know if I can be of further assistance.

    Comment


      #3
      Another approach would be to have an indicator just draw lines between the various highs, could produce the desired visual effect.

      Comment


        #4
        How about
        if(CurrentBar>4)
        Plot0.Reset(5)
        which will always remove that section as the new sections are added?
        Actually you would want to Reset(4) I believe, to get what your chart sample shows

        Dan
        Last edited by eDanny; 01-13-2011, 12:54 PM.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Good call

          Good call Dan,

          That worked.
          Attached Files
          Last edited by drmartell; 01-13-2011, 01:21 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Irukandji, Today, 04:58 AM
          0 responses
          2 views
          0 likes
          Last Post Irukandji  
          Started by fitspressoburnfat, Today, 04:25 AM
          0 responses
          2 views
          0 likes
          Last Post fitspressoburnfat  
          Started by Skifree, Today, 03:41 AM
          1 response
          4 views
          0 likes
          Last Post Skifree
          by Skifree
           
          Started by usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          604 views
          0 likes
          Last Post NinjaTrader_Jason  
          Working...
          X