Skip to main content

Effort index for Amibroker (AFL)

habib20216 over 12 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    oscillator, amibroker

This is great formula collected from karthikmarar.

Visit his website for a description:

http://karthikmarar.blogspot.com.au/2013/06/effort-index-afl.html

Indicator / Formula

Copy & Paste Friendly
//Volume Price Analysis - Effort Verus Result Index Afl  - Version 1.0
// Afl by Karthikmarar
// www.karthikmarar.blogspot.com
//============================================================
_SECTION_BEGIN("Effort versus Result - V.1.0");
//SetChartBkColor(colorWhite); 
SetChartOptions(0,chartShowArrows|chartShowDates);
Vlp  = Param("Volume lookback period",40,20,200,10);
Vrg  = MA(V,Vlp);// average volume
rg   = (H-L); //Spread
arg  = Wilders(rg,Vlp);//Average Spread
rs   = abs(C-Ref(C,-1));//Result
rsg  = Wilders(rs,Vlp);//Average Result
sro  = rg/arg;//ratio of spread to average
Vro  = V/Vrg;//ratio of volume to average
rso  = rs/rsg; //ratio of result to average
smax = HHV(sro,Vlp);
smin = LLV(sro,Vlp);
Vmax = HHV(Vro,Vlp);
Vmin = LLV(Vro,Vlp);
rmax = HHV(rso,Vlp);
RMIn = LLV(rso,Vlp);
snor = (sro - smin)*100/(smax-Smin);
Vnor = (Vro - Vmin)*100/(Vmax-Vmin);
rnor = (rso - RMIn)*100/(rmax-RMIn);
EI   = rnor/Vnor;

SelectedIndicator = ParamList( "Show", "Raw Effort-Result,Effort Index", 1 );
SelectedResult = ParamList( "Select", "Spread,Bar to Bar", 1 );
switch ( SelectedIndicator )
{ 
case "Raw Effort-Result":
switch ( SelectedResult )
{

case "Spread":
SetBarFillColor( colorOrange ); 
PlotOHLC(0,snor,0,snor,"Result",IIf(C>Ref(C,-1),colorLime,colorRed), styleCandle |styleThick) ;
Plot(MA(snor,Vlp),"Avg Result",colorYellow,1|styleDashed|styleThick);
SetBarFillColor( colorGreen ); 
PlotOHLC(0,-Vnor,0,-Vnor,"Effort",IIf(C>Ref(C,-1),colorLime,colorRed), styleCandle|styleThick ) ;
Plot(MA(-Vnor,Vlp),"Avg Effort",colorTurquoise,1|styleDashed|styleThick);
break;
case "Bar to Bar":
SetBarFillColor( colorOrange ); 
PlotOHLC(0,rnor,0,rnor,"Result",IIf(C>Ref(C,-1),colorLime,colorRed), styleCandle |styleThick) ;
Plot(MA(rnor,Vlp),"Avg Result",colorYellow,1|styleDashed|styleThick);
SetBarFillColor( colorGreen ); 
PlotOHLC(0,-Vnor,0,-Vnor,"Effort",IIf(C>Ref(C,-1),colorLime,colorRed), styleCandle|styleThick ) ;
Plot(MA(-Vnor,Vlp),"Avg Effort",colorTurquoise,1|styleDashed|styleThick);

break;
}
break;
case "Effort Index":
SetBarFillColor( colorGreen ); 
PlotOHLC(0,EI,0,EI,"Effort Index",colorTurquoise, styleCandle|styleThick ) ;
break;
}
_SECTION_END();

4 comments

2. niladri
over 12 years ago

Looks like “Waddah Attar Buy Sell Vol” MT4 indicator ported on Amibrioker.

MT4 image: http://img203.imageshack.us/img203/4219/vol.gif

4. niladri
over 12 years ago

Waddah Attar Buy Sell Volume works as follows: ( may be it is time to port Waddah’s work to Ami )

this indi shows four Lines:

- horizental dot line ( Dead Zone ) .. it work a filter for weak signals and no alert when the red or green histogram under it .

- red histogram shows the current down trend .

- green histogram shows the current up trend .

- yellow line shows the explosion in price up or down .

signal for buy :

- when green histo goes up and yellow line goes up and green histo is higher than yellow line and all is higher dot line .

signal for exit buy :

- you can exit buy when green histo down lower yellow line .

signal for sell :

- when red histo goes up and yellow line goes up and red histo is higher than yellow line and all is higher dot line .

signal for exit sell :

- you can exit sell when red histo down lower yellow line .

This indicator script will give me the reqd idea for porting Waddah’s work to Ami..watch out for this one.

Leave Comment

Please login here to leave a comment.