Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

commodity spread chart

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

    #16
    Hello hellboy78,


    You can plot an RSI based on the Spread indicator:
    • Right mouse click on your chart > Indicators...
    • On the left hand side select RSI and then click New
    • In the RSI parameters under the Data section > select input series > left click on the "..." elipsis button that appears
    • Click the + button on Indicators > Select Spread and configure the spread indicator
    • Click OK when finished
    • Click OK once more on the Indicators window
    Ryan L.NinjaTrader Customer Service

    Comment


      #17
      NT Team,

      Following the instructions offered by Ryan (22 February), I can see the wonderful Spread indicator shared by KDoren can be used as an input for RSI() and SMA(). I've been unable to successfully use Spread as an input for LinReg().

      Any ideas where I may be going wrong?

      Regards
      Shannon

      Comment


        #18
        Hello Shansen,


        You can use the Spread indicator as an input on the LinReg indicator:
        Attached Files
        Ryan L.NinjaTrader Customer Service

        Comment


          #19
          Ryan,

          Thanks for the response.

          Please find attached two screenshots, the first with the indicator Spread(^SP500,1,ES 03-13,-1) correctly showing the difference between the close prices of ^SP500 and ES 03-13 (shown in panel 1). The second screenshot is identical, except for the addition of the indicator LinReg(Spread(^SP500,1,ES 03-13,-1),14).

          You will note, while the Spread has range of 3.8 - 5.0, the LinReg displays in the range of 182,000. I understand the LinReg indicator to return the value of a linear regression at bar [0] over the specified lookback period (in this case 14). While LinReg is not bound between the range of its input series, a return orders of magnitude larger is a little excessive.

          Where have I gone wrong?

          Thanks again
          Shannon
          Attached Files

          Comment


            #20
            Hello Shannon,


            Thank you for the follow up and screenshots.


            It looks like you will need to change the "Scale Justification" for the indicator from right to left:
            • Right mouse click on the chart background > Indicators...
            • Select the Spread indicator on the bottom left hand corner.
            • On the parameters on the right hand side > Change "Scale Justification" from Left to Right.
            • Click Apply to see the changes.
            • Click OK when finished.
            Ryan L.NinjaTrader Customer Service

            Comment


              #21
              Ryan,

              Thanks for the quick response.

              While the approach of an alternate axis for displaying the RSI was correct, it is not the solution for the Spread. The RSI indicator is bound between 0 and 1, it can not return a value outside of these bounds. As such, the RSI is displayed with a y-axis range 0 to 1. Where the primary y-axis (scale justification right) is not ranged 0 to 1, the RSI plots remain between 0 and 1 and are compressed on that scale. Switching to an alternate y-axis (scale justification left) solves the problem.

              The LinReg indicator, returns the value at bar[0] of a linear regression over a lookback period. A linear regression is the line of best fit plotted against the observations. On the attached picture (http://en.wikipedia.org/wiki/Simple_linear_regression), the red line is the linear regression of each of blue data points. It is plotted on the primary y-axis, the same as the blue data points because it necessarily must be in the same vicinity as the data points.

              The LinReg indicator returns only the last point of the linear regression, in the attached picture the most-right data plot of the red line, at approx 60,14 (x-axis, y-axis). So for each bar[0] LinReg returns just the last data point of a linear regression over the lookback period.

              From this explanation, it would seem a LinReg return of 182,000 based on data points in the range of 3.8 - 5.0 is not rational. Either my understanding of the function of the LinReg indicator is incorrect or the LinReg indicator is not calculating as expected with the Spread indicator as its input.

              Any further assistance would be appreciated.

              Regards
              Shannon
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by lightsun47, Today, 03:51 PM
              0 responses
              4 views
              0 likes
              Last Post lightsun47  
              Started by 00nevest, Today, 02:27 PM
              1 response
              8 views
              0 likes
              Last Post 00nevest  
              Started by futtrader, 04-21-2024, 01:50 AM
              4 responses
              44 views
              0 likes
              Last Post futtrader  
              Started by Option Whisperer, Today, 09:55 AM
              1 response
              13 views
              0 likes
              Last Post bltdavid  
              Started by port119, Today, 02:43 PM
              0 responses
              9 views
              0 likes
              Last Post port119
              by port119
               
              Working...
              X