Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Advanced Get Oscillator for Amibroker (AFL)

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

Created based on this URL:
https://forexmt4indicators.com/advanced-get-oscillator-indicator-for-metatrader-4/

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Background");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),ParamColor("BgBottom", colorBlack)); 
_SECTION_END();

_SECTION_BEGIN("AdvGetOsc");
//#### Created By Kelvinhand on 2016/Feb 17th ####
Osc_fast = Param("Osc.Fast", 5, 1, 35);
Osc_slow = Param("Osc.Slow", 35, 5, 35);
Osc_Color = ParamColor("Osc.Color", colorLightBlue);
MP=(H+L)/2;
OscAG=MA(MP,Osc_fast)-MA(MP,Osc_slow);
_SECTION_END();

_SECTION_BEGIN("Break Out Bands");
BOB_Upr = ParamColor("Upper", colorRed);
BOB_Lwr = ParamColor("Lower", colorLime);
BOB_Strength = Param("Strength(%)", 100, 1, 100);
_SECTION_END();


Lens=Osc_fast+Osc_slow;

for(i=0; i<Lens; i++)
UprLine[i] =LwrLine[i]= OscAG[i];

Pr = 2.0/Lens;

for(i=Lens; i<BarCount; i++)
{

   if (OscAG[i]>0)
   {
      UprLine[i] = OscAG[i]*pr+UprLine[i-1]*(1-pr);
      LwrLine[i] = LwrLine[i-1];
   }
   else
   {
      
      UprLine[i] = UprLine[i-1];
      LwrLine[i] = OscAG[i]*pr+LwrLine[i-1]*(1-pr);
   }
   

}

Plot(OscAG,"AdvGetOsc",Osc_Color,styleHistogram);
Plot(BOB_Strength/100*UprLine,"Upr",BOB_Upr,styleNoLabel);
Plot(BOB_Strength/100*LwrLine,"Lwr",BOB_Lwr,styleNoLabel);

4 comments

1. amifan

Thank you sir….

2. bhushan84s

thanks kelvin.

3. kv_maligi

Great code. Many thanks.

How to use this is given below
http://www.agetblog.com/tradingtechniques/2007/06/understanding-t.html

4. ali32b

Can anyone add divergence to it?

Leave Comment

Please login here to leave a comment.

Back