GRADIENT IN SMA

Viewing 6 posts - 1 through 6 (of 6 total)
  • #132914

    I would like to code a rough gradient in a moving average. My clumsy idea was to try code the SMA, must be higher than SMA of 5 periods ago plus a value, which is X below.

    Above not working.

     

    Help appreciated

     

    #132916

    Try

    This could also help https://www.prorealcode.com/reply/70279/

     

    #132936

    Thank you.

     

    Does not seem to work

     

    #132945

    The best way to measure a gradient is with a ratio of y and x.

    Negative ratio results are a downward sloping MA and the lower the number the steeper the angle. Positive ratio results are an upward sloping MA and the greater the number the steeper the angle.

    #132947

    If you convert it to a percentage of the average p bars back then it is even more usable.

     

    2 users thanked author for this post.
    #132959

    Above added as Log 217 here …

    Snippet Link Library

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login