A/D Indicator

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

A/D Indicator

Postby kempfe » Sat Mar 20, 2010 1:09 pm

Could someone pls translate the A/D Indicator ??

below the MQ4 file

//+------------------------------------------------------------------+
//| Accumulation.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 LightSeaGreen
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("A/D");
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Accumulation/Distribution |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
i=Bars-counted_bars-1;
while(i>=0)
{
double high =High[i];
double low =Low[i];
double open =Open[i];
double close=Close[i];
ExtMapBuffer1[i]=(close-low)-(high-close);
if(ExtMapBuffer1[i]!=0)
{
double diff=high-low;
if(0==diff)
ExtMapBuffer1[i]=0;
else
{
ExtMapBuffer1[i]/=diff;
ExtMapBuffer1[i]*=Volume[i];
}
}
if(i<Bars-1) ExtMapBuffer1[i]+=ExtMapBuffer1[i+1];
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+


think this indicator is nothing special

kind regards
kempfe
 
Posts: 2
Joined: Sat Mar 20, 2010 1:06 pm

Re: A/D Indicator

Postby Nikolay.Gekht » Mon Mar 22, 2010 11:32 am

I take a look at the indicator and found that it requires the volume information. Unfortunately, FXCM does not provide the volume information yet. As far as I know, the number of deals is expected to be provided in future releases, but right now this information is not available at all.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: A/D Indicator

Postby kempfe » Mon Mar 22, 2010 11:52 am

i understand :(

thx anyway have a nice week

greetings from austria
kempfe
 
Posts: 2
Joined: Sat Mar 20, 2010 1:06 pm


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Majestic-12 [Bot] and 32 guests