Can someone please code this oscillator moving average

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #77562 quote
    Maisam ZaidiMaisam 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
    VonasiVonasi
    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 ZaidiMaisam 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.
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

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 ZaidiMaisam Zaidi
8 years, 1 month ago.

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