• 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

Slope and how to interpret its value with different tick sizes

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

    Slope and how to interpret its value with different tick sizes

    Using the Slope() function in NT8, and trying to convert the value to degrees where one can easily interpret its meaning, I find it that the output is quite strange.

    For example, if one wants to measure the slope of a SMA50 for the last 10bars, then it would be

    Slope(SMA(50), 10, 0)

    Converting the above value to degrees would be: Math.Atan(Slope(SMA(50), 10, 0)) / ((Math.PI / 180));

    However, the output varies with different instruments where the FX Futures are the most non-intuitive to understand. The output for the above is like 0.00005, whereas one would logically expect something like, 25*, 45*, 75* (degree outputs)

    Why is this? Do we have to divide the above formula by instrument tick size?



    #2
    Originally posted by Boonfly8 View Post
    Using the Slope() function in NT8, and trying to convert the value to degrees where one can easily interpret its meaning, I find it that the output is quite strange.

    For example, if one wants to measure the slope of a SMA50 for the last 10bars, then it would be

    Slope(SMA(50), 10, 0)

    Converting the above value to degrees would be: Math.Atan(Slope(SMA(50), 10, 0)) / ((Math.PI / 180));

    However, the output varies with different instruments where the FX Futures are the most non-intuitive to understand. The output for the above is like 0.00005, whereas one would logically expect something like, 25*, 45*, 75* (degree outputs)

    Why is this? Do we have to divide the above formula by instrument tick size?

    Degrees are a dimensionless quantity: the Slope() of anything on the chart is dimensioned as a price. There is no arithmetic equivalence, which is what you have highlighted by your query. You could try normalizing the slope values by dividing it by some statistical price measure. The one most folks tend to think of is either the ATR or the average range. That gives you a dimensionless quantity that takes into account the travel of price for each particular instrument. You still will not have an arithmetic equivalence to degrees, but at least you will have a measure that takes into account the variance between equities.

    ref: https://ninjatrader.com/support/foru...045#post653045
    https://ninjatrader.com/support/foru...406#post686406
    https://ninjatrader.com/support/forum/forum/ninjatrader-7/indicator-development-aa/73448-relative-smoothness-over-range?p=660026#post660026
    Last edited by koganam; 03-11-2019, 07:39 PM.

    Comment


      #3
      Hello,

      koganam I wanted to say thank you as this needed to be answered by the community.

      Boonfly8, koganam is correct. The value is created the same. You could use some sort of custom normalizing calculation if you wanted.
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ryanmercado, Today, 10:04 AM
      0 responses
      3 views
      0 likes
      Last Post ryanmercado  
      Started by uiwislth, Yesterday, 11:25 PM
      0 responses
      5 views
      0 likes
      Last Post uiwislth  
      Started by Steve L, Yesterday, 10:04 PM
      0 responses
      3 views
      0 likes
      Last Post Steve L
      by Steve L
       
      Started by marianfed, Yesterday, 09:47 PM
      0 responses
      5 views
      0 likes
      Last Post marianfed  
      Started by hir04068, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post hir04068  
      Working...
      X