multiple smoothing moving average

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #50720 quote
    PEDRAM.JOKARPEDRAM.JOKAR
    Participant
    Average

    hi

     

    how can I code multiple smoothing moving average? number of smoothing times can be adjustable.

    #50764 quote
    LeoLeo
    Participant
    Veteran
    period=20
    
    MA=average[period](close)
    sMA=average[period](MA)
    ssMA=average[period](sMA)
    sssMA=average[period](ssMA)
    ssssMA=average[period](sssMA)
    sssssMA=sssMA=average[period](ssssMA)
    
    return MA, sMA, ssMA, sssMA, ssssMa , sssssMA

    Hahaha, looks funny the code… I use it very often and very useful because I get rid of another parameter in case I need two crossing moving average in my codes

    tell me how do you use it

    PEDRAM.JOKAR thanked this post
    Screen-Shot-2017-10-28-at-08.17.15.png Screen-Shot-2017-10-28-at-08.17.15.png
    #63408 quote
    karolcrabtreekarolcrabtree
    Participant
    New

    Hi,

    Can you please help me to adapt this code for a simple multiple smoothing moving average (14,10)

    would be very grateful,

    Thanks

    Karol

    #63618 quote
    PEDRAM.JOKARPEDRAM.JOKAR
    Participant
    Average

    Hi Karol

    If i am not wrong your intention, it would be as below:

    MA=average[14](close)
    sMA=average[10](MA)
    
    return sMA
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

multiple smoothing moving average


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by PEDRAM.JOKARPEDRAM.JOKAR
8 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/27/2017
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...