The folder consists of indicators folders in which
ATR trailing stop
PSAR (dots_color.ex4)
CCI
Histobands.ex4
All the above indicators are redeaily available except "unknown" Histobands
I have decompiled Histobands.ex4 to .mq4 version for you.
Here is the code:
//+------------------------------------------------------------------+
//| HistoBands.mq4 |
//| Copyright 2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Red
double WBP[];
extern int ShortPeriod=5;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_HISTOGRAM,0,2);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM,0,2);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexBuffer(2, WBP);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i,k,counted_bars=IndicatorCounted();
double HH,LL,WBPma,Stdev,Bands;
if(Bars<=32) return(0);
//---- last counted bar will be recounted
int limit=Bars-counted_bars;
if(counted_bars>0) limit++;
for(i=0; i<limit-1; i++)
{
HH=High[Highest(NULL,0,MODE_HIGH,ShortPeriod,i)];
LL=Low[Lowest(NULL,0,MODE_LOW,ShortPeriod,i)];
WBP=(HH+LL+Close)/3;
}
for(i=0; i<limit; i++)
{
WBPma=iMAOnArray(WBP,Bars,34,0,MODE_SMA,i);
Stdev=iStdDevOnArray(WBP,Bars,34,MODE_SMA,0,i);
Bands=((WBP+2*Stdev-WBPma)/(4*Stdev))*4-2;
ExtMapBuffer1=0;
ExtMapBuffer2=0;
if (Bands>0){ExtMapBuffer1=Bands;}
if (Bands<0){ExtMapBuffer2=Bands;}
}
return(0);
}
//+------------------------------------------------------------------+
Please try to convert it to amibroker format.....will be very greatful
Regards
Anurag
ATR trailing stop
PSAR (dots_color.ex4)
CCI
Histobands.ex4
All the above indicators are redeaily available except "unknown" Histobands
I have decompiled Histobands.ex4 to .mq4 version for you.
Here is the code:
//+------------------------------------------------------------------+
//| HistoBands.mq4 |
//| Copyright 2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Red
double WBP[];
extern int ShortPeriod=5;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_HISTOGRAM,0,2);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM,0,2);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexBuffer(2, WBP);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i,k,counted_bars=IndicatorCounted();
double HH,LL,WBPma,Stdev,Bands;
if(Bars<=32) return(0);
//---- last counted bar will be recounted
int limit=Bars-counted_bars;
if(counted_bars>0) limit++;
for(i=0; i<limit-1; i++)
{
HH=High[Highest(NULL,0,MODE_HIGH,ShortPeriod,i)];
LL=Low[Lowest(NULL,0,MODE_LOW,ShortPeriod,i)];
WBP=(HH+LL+Close)/3;
}
for(i=0; i<limit; i++)
{
WBPma=iMAOnArray(WBP,Bars,34,0,MODE_SMA,i);
Stdev=iStdDevOnArray(WBP,Bars,34,MODE_SMA,0,i);
Bands=((WBP+2*Stdev-WBPma)/(4*Stdev))*4-2;
ExtMapBuffer1=0;
ExtMapBuffer2=0;
if (Bands>0){ExtMapBuffer1=Bands;}
if (Bands<0){ExtMapBuffer2=Bands;}
}
return(0);
}
//+------------------------------------------------------------------+
Please try to convert it to amibroker format.....will be very greatful
Regards
Anurag
Code:
_SECTION_BEGIN("HistoBands");
bgTop = ParamColor("BgTop", colorBlack);
bgBot = ParamColor("BgBottom", colorBlack);
SetChartBkGradientFill( bgTop ,bgBot, colorLightGrey);
ShortPeriod = Param("Short Period", 5, 2, 200);
ColorBull = ParamColor("Bull", ColorRGB(40,144,255));
ColorBear = ParamColor("Bear", colorRed);
HH = HHV(H, ShortPeriod);
LL = LLV(L, ShortPeriod);
WBP = (HH+LL+C)/3;
WBPma=MA(WBP,34);
iStDev=StDev(WBP,34);
Bands=((WBP+2*iStDev-WBPma)/(4*iStDev))*4-2;
ColorHisto = IIf(Bands>0, ColorBull, ColorBear);
Plot(Bands, "HistoBand", ColorHisto, styleHistogram);
_SECTION_END();