I would be interested in osMA (Moving Average of Oscillator) conversion code mt4 to prorealtime.
Thank you for any input.
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"
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?
Since ProBuilder makes LINE coloured it must be a reserved word (which I am not aware of), try replacing Line with MyLine.
Dear Robert
Thank you, this “MyLine”-renaming did the trick!