osMA (Moving Average of Oscillator), conversion code mt4 to prorealtime

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #69919 quote
    meconmecon
    Participant
    New

    I would be interested in osMA (Moving Average of Oscillator) conversion code mt4 to prorealtime.

    Thank you for any input.

     

    dax30daily.png dax30daily.png
    #69930 quote
    robertogozzirobertogozzi
    Moderator
    Legend
    You should follow these few steps and rules https://www.prorealcode.com/topic/free-conversion-mt4-indicators-mql4/.
    #69948 quote
    NicolasNicolas
    Keymaster
    Legend
    Just found this simple code on the web, about OSMA for PROREALTIME:
    fastMA = exponentialAverage[12](close)
    slowMA = exponentialAverage[26](close)
    myMACD = fastMA - slowMA
    line = Average[9](myMACD)
    osc = myMACD - line
    Return osc As "Osc" ,0 As "Null"
    mecon thanked this post
    #69951 quote
    meconmecon
    Participant
    New
    Dear Nicolas Thank you for this code. When I enter it into ProBuilder, line 4 (“line = Average[9](myMACD)“) and 5 (“osc = myMACD – line”) get an exclamation mark, and an error window “syntax-error” (see screenshot), so I am stuck. Would you have any idea why that is?
    ERROR.png ERROR.png
    #69958 quote
    robertogozzirobertogozzi
    Moderator
    Legend
    Since ProBuilder makes LINE coloured it must be a reserved word (which I am not aware of), try replacing Line with MyLine.
    mecon thanked this post
    #69961 quote
    meconmecon
    Participant
    New
    Dear Robert Thank you, this “MyLine”-renaming did the trick!
Viewing 6 posts - 1 through 6 (of 6 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

osMA (Moving Average of Oscillator), conversion code mt4 to prorealtime


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
mecon @mecon Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by meconmecon
8 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/07/2018
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...