
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Indicators usually are lagging than price. The most effective way for trading is price action
please fix this indicator ... not work at my MT4
thanks
//+------------------------------------------------------------------+
//| Ý Â À-1.mq4 |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//V// ÝÂÀ-1
#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color8 DarkOliveGreen
#property indicator_color7 Magenta
#property indicator_color6 Blue
#property indicator_color5 Magenta
#property indicator_color4 Teal //Ëèíèÿ
#property indicator_levelcolor Green
#property indicator_style1 STYLE_DOT
#property indicator_style2 STYLE_DOT
#property indicator_level1 0
//V// ÝÂÀ
#property indicator_minimum -0.007
#property indicator_maximum 0.007
#property indicator_color3 Black
#property indicator_color2 Lime
#property indicator_color1 Red
//#property indicator_levelcolor Green
//#property indicator_level1 0
//
extern string A1 = "------------- ÝÂÀ-1 ------------";
extern int Length = 14;
extern int Price = 0;
extern bool Double = false;
extern bool ShowHistogram = true;
extern bool ShowUpDownLimit = false;
extern bool PreFilterPrice = true;
extern int PreFilterPriceLength = 4;
extern double Kot = 0.0001; //0.001
extern string A2 = "------------- ÝÂÀ ------------";
extern int period = 12;
extern int period2 = 12;
//
// ÝÂÀ-1
double rsx[];
double rsxU[];
double rsxD[];
double limU[];
double limD[];
double stored[][26];
int Correction = 0;
int LoopCount = 1;
double smoothCoeffs[];
double smoothDivisor;
#define Pi 3.141592653589793238462643
//ÝÂÀ
double g_ibuf_80[];
double g_ibuf_84[];
double g_ibuf_88[];
string gs_92 = "";
string gs_100;
int init()
{
SetIndexBuffer(7,limU); SetIndexLabel(7,NULL);
SetIndexBuffer(6,limD); SetIndexLabel(6,NULL);
SetIndexBuffer(3,rsx); SetIndexLabel(3,"RSX4");
if (ShowHistogram)
{
SetIndexBuffer(5,rsxU); SetIndexStyle(5,DRAW_HISTOGRAM); SetIndexLabel(5,"RSX2");
SetIndexBuffer(4,rsxD); SetIndexStyle(4,DRAW_HISTOGRAM); SetIndexLabel(4,"RSX3");
Correction = -50;
}
else
{
SetIndexStyle(5,DRAW_NONE); SetIndexLabel(5,NULL);
SetIndexStyle(4,DRAW_NONE); SetIndexLabel(4,NULL);
}
if (Double) LoopCount = 2;
//V //ÝÂÀ
SetIndexStyle(2, DRAW_NONE, STYLE_SOLID, 0);
SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 0);
SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 0);
IndicatorDigits(Digits + 1);
SetIndexBuffer(2, g_ibuf_80);
SetIndexBuffer(1, g_ibuf_84);
SetIndexBuffer(0, g_ibuf_88);
SetIndexLabel(1, "ÝÂÀ");
SetIndexLabel(0, "ÝÂÀ");
//V //ÝÂÀ-1
ArrayResize(smoothCoeffs, PreFilterPriceLength);
smoothCoeffs[0] = 1;
smoothDivisor = 1;
for (int i = 1; i < PreFilterPriceLength; i++)
{
double temp = 1 << (i / Pi);
smoothCoeffs = MathSin(temp) / temp;
smoothDivisor += smoothCoeffs;
}
gs_100 = "ssssssssssss";
IndicatorShortName(gs_100);
creataalltext();
return(0);
}
int deinit() { ObjectDelete(gs_100); return(0); }
//
int start()
{
//V //ÝÂÀ
double ld_0;
double ld_8;
double ld_16;
double ld_48 = 0;
double ld_56 = 0;
double ld_80 = 0;
double l_low_96 = 0;
double l_high_104 = 0;
int li_112 = 16777215;
//
int i,r,limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit = Bars-counted_bars;
if (ArrayRange(stored,0) != Bars) ArrayResize(stored,Bars);
//V //ÝÂÀ
for (i = 0; i < limit; i++) {
l_high_104 = High;
l_low_96 = Low;
ld_16 = (High + Low) / 2.0;
ld_48 = 0.66 * ((ld_16 - l_low_96) / (l_high_104 - l_low_96) - 0.5) + 0.67 * ld_56;
ld_48 = MathMin(MathMax(ld_48, -0.999), 0.999);
g_ibuf_80 = MathLog((ld_48 + 1.0) / (1 - ld_48)) / 2.0 + ld_80 / 2.0;
ld_56 = ld_48;
ld_80 = g_ibuf_80;
}
bool li_124 = TRUE;
//
for(i=limit, r=Bars-i-1; i>=0; i--, r++)
{
//"------------- ÝÂÀ ------------"
ld_8 = g_ibuf_80;
ld_0 = g_ibuf_80;
if ((ld_8 0.0) || ld_8 < 0.0) li_124 = FALSE;
if ((ld_8 > 0.0 && ld_0 0.0) li_124 = TRUE;
if (!li_124) {
g_ibuf_88 = ld_8;
g_ibuf_84 = EMPTY_VALUE;
gs_92 = "";
li_112 = Magenta;
} else {
g_ibuf_84 = ld_8;
g_ibuf_88 = EMPTY_VALUE;
gs_92 = "";
li_112 = LawnGreen;
}
//"------------- ÝÂÀ-1 ------------"
if (!PreFilterPrice) double trsx = iMA(NULL,0,1,0,MODE_SMA,Price,i);
else
{
double sum = 0;
for (int l = 0; l < PreFilterPriceLength; l++) sum += iMA(NULL,0,1,0,MODE_SMA,Price,l+i)*smoothCoeffs[l];
trsx = (sum/smoothDivisor);
}
//
for (int k=0; k<LoopCount; k++)
{
stored[r][24+k] = trsx;
double roc = trsx-stored[r-1][24+k];
double roa = MathAbs(roc);
double avg1 = iCalc(roc,Length,i,r,k*12);
double avg2 = iCalc(roa,Length,i,r,k*12+6);
//
if (avg2 != 0)
trsx = MathMax(MathMin((avg1/avg2+1.0)*50.0,100.00),0.00);
else trsx = 50.0;
}
rsx = (trsx+Correction)*Kot;
//
if (ShowHistogram)
{
rsxD = rsxD;
rsxU = rsxU;
if (rsx > rsx) { rsxU = rsx; rsxD = EMPTY_VALUE; }
if (rsx < rsx) { rsxD = rsx; rsxU = EMPTY_VALUE; }
}
if (ShowUpDownLimit)
{
limD = Correction*Kot;
limU = (Correction+100)*Kot;
}
}
//
settext("Ý_Â_Àm", gs_92, 12, li_112, 10, 15);
return(0);
}
#define F01 0
#define F02 1
#define F03 2
#define F04 3
#define F05 4
#define F06 5
//
double iCalc(double price, int periods, int i, int r, int s)
{
double f01=stored[r-1][s+F01]; double f02=stored[r-1][s+F02];
double f03=stored[r-1][s+F03]; double f04=stored[r-1][s+F04];
double f05=stored[r-1][s+F05]; double f06=stored[r-1][s+F06];
//
double Kg = 3.0/(2.0+periods);
double Hg = 1.0-Kg;
f01 = Kg * price + Hg * f01; f02 = Kg * f01 + Hg * f02; double v01 = 1.5 * f01 - 0.5 * f02;
f03 = Kg * v01 + Hg * f03; f04 = Kg * f03 + Hg * f04; double v02 = 1.5 * f03 - 0.5 * f04;
f05 = Kg * v02 + Hg * f05; f06 = Kg * f05 + Hg * f06; double v03 = 1.5 * f05 - 0.5 * f06;
//
stored[r][s+F01] = f01; stored[r][s+F02] = f02;
stored[r][s+F03] = f03; stored[r][s+F04] = f04;
stored[r][s+F05] = f05; stored[r][s+F06] = f06;
return(v03);
}
void creataalltext() {
ObjectCreate("Ý_Â_Àm", OBJ_LABEL, WindowFind(WindowExpertName( )), 0, 0);
settext("Ý_Â_Àm", "", 12, White, 10, 15);
}
void settext(string a_name_0, string a_text_8, int a_fontsize_16, color a_color_20, int a_x_24, int a_y_28) {
ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_24);
ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_28);
ObjectSetText(a_name_0, a_text_8, a_fontsize_16, "Arial", a_color_20);
}
please fix this indicator ... not work at my MT4
thanks
//+------------------------------------------------------------------+
//| Ý Â À-1.mq4 |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//V// ÝÂÀ-1
#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color8 DarkOliveGreen
#property indicator_color7 Magenta
#property indicator_color6 Blue
#property indicator_color5 Magenta
#property indicator_color4 Teal //Ëèíèÿ
#property indicator_levelcolor Green
#property indicator_style1 STYLE_DOT
#property indicator_style2 STYLE_DOT
#property indicator_level1 0
//V// ÝÂÀ
#property indicator_minimum -0.007
#property indicator_maximum 0.007
#property indicator_color3 Black
#property indicator_color2 Lime
#property indicator_color1 Red
//#property indicator_levelcolor Green
//#property indicator_level1 0
//
extern string A1 = "------------- ÝÂÀ-1 ------------";
extern int Length = 14;
extern int Price = 0;
extern bool Double = false;
extern bool ShowHistogram = true;
extern bool ShowUpDownLimit = false;
extern bool PreFilterPrice = true;
extern int PreFilterPriceLength = 4;
extern double Kot = 0.0001; //0.001
extern string A2 = "------------- ÝÂÀ ------------";
extern int period = 12;
extern int period2 = 12;
//
// ÝÂÀ-1
double rsx[];
double rsxU[];
double rsxD[];
double limU[];
double limD[];
double stored[][26];
int Correction = 0;
int LoopCount = 1;
double smoothCoeffs[];
double smoothDivisor;
#define Pi 3.141592653589793238462643
//ÝÂÀ
double g_ibuf_80[];
double g_ibuf_84[];
double g_ibuf_88[];
string gs_92 = "";
string gs_100;
int init()
{
SetIndexBuffer(7,limU); SetIndexLabel(7,NULL);
SetIndexBuffer(6,limD); SetIndexLabel(6,NULL);
SetIndexBuffer(3,rsx); SetIndexLabel(3,"RSX4");
if (ShowHistogram)
{
SetIndexBuffer(5,rsxU); SetIndexStyle(5,DRAW_HISTOGRAM); SetIndexLabel(5,"RSX2");
SetIndexBuffer(4,rsxD); SetIndexStyle(4,DRAW_HISTOGRAM); SetIndexLabel(4,"RSX3");
Correction = -50;
}
else
{
SetIndexStyle(5,DRAW_NONE); SetIndexLabel(5,NULL);
SetIndexStyle(4,DRAW_NONE); SetIndexLabel(4,NULL);
}
if (Double) LoopCount = 2;
//V //ÝÂÀ
SetIndexStyle(2, DRAW_NONE, STYLE_SOLID, 0);
SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 0);
SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 0);
IndicatorDigits(Digits + 1);
SetIndexBuffer(2, g_ibuf_80);
SetIndexBuffer(1, g_ibuf_84);
SetIndexBuffer(0, g_ibuf_88);
SetIndexLabel(1, "ÝÂÀ");
SetIndexLabel(0, "ÝÂÀ");
//V //ÝÂÀ-1
ArrayResize(smoothCoeffs, PreFilterPriceLength);
smoothCoeffs[0] = 1;
smoothDivisor = 1;
for (int i = 1; i < PreFilterPriceLength; i++)
{
double temp = 1 << (i / Pi);
smoothCoeffs = MathSin(temp) / temp;
smoothDivisor += smoothCoeffs;
}
gs_100 = "ssssssssssss";
IndicatorShortName(gs_100);
creataalltext();
return(0);
}
int deinit() { ObjectDelete(gs_100); return(0); }
//
int start()
{
//V //ÝÂÀ
double ld_0;
double ld_8;
double ld_16;
double ld_48 = 0;
double ld_56 = 0;
double ld_80 = 0;
double l_low_96 = 0;
double l_high_104 = 0;
int li_112 = 16777215;
//
int i,r,limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit = Bars-counted_bars;
if (ArrayRange(stored,0) != Bars) ArrayResize(stored,Bars);
//V //ÝÂÀ
for (i = 0; i < limit; i++) {
l_high_104 = High;
l_low_96 = Low;
ld_16 = (High + Low) / 2.0;
ld_48 = 0.66 * ((ld_16 - l_low_96) / (l_high_104 - l_low_96) - 0.5) + 0.67 * ld_56;
ld_48 = MathMin(MathMax(ld_48, -0.999), 0.999);
g_ibuf_80 = MathLog((ld_48 + 1.0) / (1 - ld_48)) / 2.0 + ld_80 / 2.0;
ld_56 = ld_48;
ld_80 = g_ibuf_80;
}
bool li_124 = TRUE;
//
for(i=limit, r=Bars-i-1; i>=0; i--, r++)
{
//"------------- ÝÂÀ ------------"
ld_8 = g_ibuf_80;
ld_0 = g_ibuf_80;
if ((ld_8 0.0) || ld_8 < 0.0) li_124 = FALSE;
if ((ld_8 > 0.0 && ld_0 0.0) li_124 = TRUE;
if (!li_124) {
g_ibuf_88 = ld_8;
g_ibuf_84 = EMPTY_VALUE;
gs_92 = "";
li_112 = Magenta;
} else {
g_ibuf_84 = ld_8;
g_ibuf_88 = EMPTY_VALUE;
gs_92 = "";
li_112 = LawnGreen;
}
//"------------- ÝÂÀ-1 ------------"
if (!PreFilterPrice) double trsx = iMA(NULL,0,1,0,MODE_SMA,Price,i);
else
{
double sum = 0;
for (int l = 0; l < PreFilterPriceLength; l++) sum += iMA(NULL,0,1,0,MODE_SMA,Price,l+i)*smoothCoeffs[l];
trsx = (sum/smoothDivisor);
}
//
for (int k=0; k<LoopCount; k++)
{
stored[r][24+k] = trsx;
double roc = trsx-stored[r-1][24+k];
double roa = MathAbs(roc);
double avg1 = iCalc(roc,Length,i,r,k*12);
double avg2 = iCalc(roa,Length,i,r,k*12+6);
//
if (avg2 != 0)
trsx = MathMax(MathMin((avg1/avg2+1.0)*50.0,100.00),0.00);
else trsx = 50.0;
}
rsx = (trsx+Correction)*Kot;
//
if (ShowHistogram)
{
rsxD = rsxD;
rsxU = rsxU;
if (rsx > rsx) { rsxU = rsx; rsxD = EMPTY_VALUE; }
if (rsx < rsx) { rsxD = rsx; rsxU = EMPTY_VALUE; }
}
if (ShowUpDownLimit)
{
limD = Correction*Kot;
limU = (Correction+100)*Kot;
}
}
//
settext("Ý_Â_Àm", gs_92, 12, li_112, 10, 15);
return(0);
}
#define F01 0
#define F02 1
#define F03 2
#define F04 3
#define F05 4
#define F06 5
//
double iCalc(double price, int periods, int i, int r, int s)
{
double f01=stored[r-1][s+F01]; double f02=stored[r-1][s+F02];
double f03=stored[r-1][s+F03]; double f04=stored[r-1][s+F04];
double f05=stored[r-1][s+F05]; double f06=stored[r-1][s+F06];
//
double Kg = 3.0/(2.0+periods);
double Hg = 1.0-Kg;
f01 = Kg * price + Hg * f01; f02 = Kg * f01 + Hg * f02; double v01 = 1.5 * f01 - 0.5 * f02;
f03 = Kg * v01 + Hg * f03; f04 = Kg * f03 + Hg * f04; double v02 = 1.5 * f03 - 0.5 * f04;
f05 = Kg * v02 + Hg * f05; f06 = Kg * f05 + Hg * f06; double v03 = 1.5 * f05 - 0.5 * f06;
//
stored[r][s+F01] = f01; stored[r][s+F02] = f02;
stored[r][s+F03] = f03; stored[r][s+F04] = f04;
stored[r][s+F05] = f05; stored[r][s+F06] = f06;
return(v03);
}
void creataalltext() {
ObjectCreate("Ý_Â_Àm", OBJ_LABEL, WindowFind(WindowExpertName( )), 0, 0);
settext("Ý_Â_Àm", "", 12, White, 10, 15);
}
void settext(string a_name_0, string a_text_8, int a_fontsize_16, color a_color_20, int a_x_24, int a_y_28) {
ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_24);
ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_28);
ObjectSetText(a_name_0, a_text_8, a_fontsize_16, "Arial", a_color_20);
}
That is a decompiled version of an indicator where someone patched solar wind to a perfectly good rsx. Forget about it (or use some of the correct rsx versions)
That is a decompiled version of an indicator where someone patched solar wind to a perfectly good rsx. Forget about it (or use some of the correct rsx versions)
thanks mladen for the information... but i want to test this indicator .... pleaseeeeee
Hi all
Where do I had file attachment to post
thank you
Hi all
Where do I had file attachment to post
thank youWhen posting the reply, click Go Advanced then click on the paper clip icon to attach your files.
Hi
Can someone help fix Tarzan Indictor to work on new built mt4 (that will make Jane happy again)
file attached thank you
Hi
Can someone help fix Tarzan Indictor to work on new built mt4 (that will make Jane happy again)
file attached thank youHere you go (we don't want Jane to be unhappy
) : tarzan_mtfalerts_2_nmc.mq4
Hi Mladen ,
Thank you for very good service
(you are Jane man)
Thank you
Somebody please help fix this COG indi please, it does not draw on the chart anymore after MT4 update and I don't know what went wrong????
center_of_gravity.mq4
Thank you in advance.