Can someone please code this oscillator moving average

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #77562 quote
    Maisam Zaidi
    Participant
    Junior

    Hello,

    Can anyone please code the following:

    slowMA = Slow moving average
    fastMA = Fast moving average
    osc = Moving average oscillator
    trend = Moving average of oscillator

    The oscillator is the difference between the fast- and slow-moving averages
    osc = fastMA − slowMA

    I would really appreciate it.

    Thank you.

    #77563 quote
    Vonasi
    Moderator
    Master

    It is almost as you wrote it:

    slow = 100
    fast = 50
    period = 25
    
    slowMA = average[slow]
    fastMA = average[fast]
    osc = fastMA - slowMA
    
    trend = average[period](osc)
    
    return trend

    Put your own values in for the slow and fast average periods and the period for the average of OSC.

    #77584 quote
    Maisam Zaidi
    Participant
    Junior

    @Vonasi,

    Thank you very much. Really appreciate your time. I will put the code in the software and let you know.

    Thanks once again.

    Regards,
    Maisam

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Can someone please code this oscillator moving average


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Maisam Zaidi @maisam Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Maisam Zaidi
7 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/04/2018
Status: Active
Attachments: No files
Logo Logo
Loading...