• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shorten a plot?

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

    Shorten a plot?

    Hi,

    This might be a question for a math wiz, which I'm certainly not. I'm using the following indicator:

    SLOPESCHAFF.Set(Slope(Schaff(23, 50, 9, 9).STR, 4, 0));

    It creates a plot like the one in the attached image. What I'd like to do is "shorten" the plot by 2 periods, for example. I've tried changing the "8" parameter to a lower number but I saw no difference in the plot. Is this possible? I wonder if there's some mathmatical magic to accomplish that? Thanks in advance for any input...
    Attached Files

    #2
    What do you mean shorten? Do you mean that the the most recent plot value is 2 bars behind the current chart bar?
    RayNinjaTrader Customer Service

    Comment


      #3
      Well yes I guess so...but 2 bars before would be preferable...what are potential techniques for manipulating the plot, if any?

      Comment


        #4
        to clarify -

        do you want the indicator value for the current bar to be plotted two bars ago

        or

        do you want the indicator value for the current bar to be plotted on the current bar but make invisible the indicators value for the most recent two bars?
        RayNinjaTrader Customer Service

        Comment


          #5
          Sorry if I was unclear:

          "do you want the indicator value for the current bar to be plotted two bars ago"

          That would be my choice, if possible.

          For example, looking at my attached image, when the plot crosses the "0" line is it possible to manipulate it so that it plots 2 bars before (ago) that? Thank you again for your response(s).

          Comment


            #6
            Try something like:

            if (CurrentBar < 2) return;

            // Your indicator calculations here

            Plot0.Set(2, indicatorValue);

            More info -

            DataSeries.Set(int barsAgo, double value)
            You can also set the value for historical bars by including a "barsAgo" value that represents the number of bars ago that you want the double value to be stored at.
            RayNinjaTrader Customer Service

            Comment


              #7
              I understand. Thank you for your replies.

              Comment


                #8
                Follow up question please.

                Is there a way to "shift" the line plot in "real-time" (vs. historical) in the same manner? With certain indicators I've been able to do this by simply changing the period parameter (the "8" in my example) by increasing/decreasing it...but it is not working for this indicator for some reason.

                Comment


                  #9
                  You can only shift plots forward not backward using displacement setting when adding indicator to chart.
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    OK, thank you.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by GussJ, Today, 01:30 PM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by GARZONJ, Today, 12:25 PM
                    3 responses
                    13 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by RandanAL, Today, 11:53 AM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by yeshujbp, 07-21-2019, 02:40 PM
                    2 responses
                    35 views
                    0 likes
                    Last Post omololu
                    by omololu
                     
                    Started by seagraph, Yesterday, 03:27 PM
                    1 response
                    28 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Working...
                    X