Skip to main content

MML Oscillator for Amibroker (AFL)

Divyesh almost 11 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 6)
  • Tags:
    oscillator, amibroker

i am not a creator of this code but converter of this code….

i have found this code at

https://www.tradingview.com/script/VQPnbiQd-UCS-Murrey-s-Math-Oscillator-V2/

so tried to convert and find happy at the end…..

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("MML Osscilator");
// Original code from ucsgears from tredingview.com
//https://www.tradingview.com/script/VQPnbiQd-UCS-Murrey-s-Math-Oscillator-V2/
// i have just converte it to AFL
length = 64;
mult = 0.125;

hi = HHV(High, length);
lo = LLV(Low, length);
range = hi - lo;
multiplier = (range) * mult;
midline = lo + multiplier * 4;
oscillator = (Close - midline)/(range/2);
scolor = IIf(oscillator > 0 AND oscillator < mult*6, colorGreen, IIf( oscillator < 0 AND oscillator > -mult*6,colorRed, IIf( oscillator < -mult*6 ,colorBlue, IIf( oscillator > mult*6 , colorOrange,colorYellow))));
a = oscillator > 0 AND oscillator < mult*2;
b = oscillator > 0 AND oscillator < mult*4;
C1 = oscillator > 0 AND oscillator < mult*6;
d = oscillator > 0 AND oscillator < mult*8;
z = oscillator < 0 AND oscillator > -mult*2;
y = oscillator < 0 AND oscillator > -mult*4;
x = oscillator < 0 AND oscillator > -mult*6;
w = oscillator < 0 AND oscillator > -mult*8;
colordef = IIf(a, colorLime, IIf( b ,colorBrightGreen, IIf( C1, colorGreen,IIf( d , colorDarkGreen, IIf( z, colorOrange, IIf( y, colorBrown, IIf( x , colorRed, IIf (w , colorDarkRed , colorBlue))))))));
//Plot (oscillator, color = scolor, Title = "Murrey Math Oscillator", style = columns, transp = 60)
Plot(0, "Zero Line", colorWhite, styleLine);
Plot( mult*2 ,  "", colorWhite, styleLine);
Plot(mult*4 , "", colorWhite, styleLine);
p3 = 
Plot( mult*6  ,"", colorWhite, styleLine);
p4 = 
Plot( mult*8,"", colorWhite, styleLine);
Plot( -mult*2, "", colorWhite, styleLine);
Plot( -mult*4, "", colorWhite, styleLine);
p2 = 
Plot( -mult*6, "", colorWhite, styleLine);
p1 = 
Plot( -mult*8 , "", colorWhite, styleLine);
Plot(Oscillator,"",colordef,ParamStyle( "Style", styleHistogram|styleThick  ), 4);

_SECTION_END();

4 comments

1. val2004
almost 11 years ago

Tks for the oscillator

do you think this one could be a good one to be coded ?

https://www.tradingview.com/script/ngr0qRmw-CM-Laguerre-PPO-PercentileRank-Mkt-Tops-Bottoms/

almost 11 years ago

Nice work, well done.

Is there any reason length = 64 instead of 100?

Thanks for sharing
Viswanath

3. Divyesh
almost 11 years ago

Thank you kv_maligi Sir,
as basic periods of Murray Math Lines are 16/32/64.
when i were preparing the code, had checked this value….and found batter as original code has length = 100.
kindly update if 100 is batter than 64 from your side….
Thanx once again….

almost 11 years ago

Dear Divyesh,

I checked at https://www.tradingview.com/script/ngr0qRmw-CM-Laguerre-PPO-PercentileRank-Mkt-Tops-Bottoms/ and its values is 100.

You have taken as 64 after reasearch hence you are correct & thanks for sharing once again.

And use this /http://www.mudraa.com/trading/146957/0/fisher-transform-inverse-fisher-transform-afl-.html greatly enhances trading calls. Plz have a look at this.

Both codes indicates OB and OS levels. I have checked this one with Bloomberg system

I trade buy/sell after checking Inv. fish transform & now check OBOS levels what you have given (indicator)

Thanks
Viswanath

Leave Comment

Please login here to leave a comment.