IBFX_-_Waves 1
IBFX_-_Waves 1

IBFX_-_Waves 1

更新日期:
2022-02-24
分类标签:
语言:
中文
平台:
没限制

14 人已下载 手机查看

IBFX_-_Waves 1

 

/*
Generated by EX4-TO-MQ4 decompiler ONE FILE V4.0.217.1
EX4 ID : E6CC67A05D9D3DA9631A985BD7CAE011
Website: http://purebeam.biz
E-mail : purebeam@gmail.com
*/
#property copyright “Copyright © 2007, Patrick Nouvion”
#property link “www.patricknouvion.com”

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Black
#property indicator_color2 Black

int gi_76 = 0;
string gs_80 = “”;
int gi_88 = 12;
int gi_92 = 6;
extern string Options = “===========OPTIONS===========”;
extern bool DisplayWaves = TRUE;
extern bool DisplayTarget = TRUE;
extern bool DisplayComment = TRUE;
extern string Colors = “===========COLORS============”;
extern color Waves = Crimson;
extern color ProfitTarget = DarkBlue;

int init() {
CustomInit();
CleanUp();
if (DisplayComment) Comment(“\n IBFX-Waves: No Signal”);
return (0);
}

int deinit() {
CleanUp();
return (0);
}

int start() {
string l_str_concat_24;
double ld_36;
double ld_44;
double ld_52;
double ld_60;
double ld_68;
double ld_76;
double ld_84;
double ld_92;
double ld_100;
double ld_108;
int li_184;
string ls_188;
double l_price_196;
double l_price_204;
double ld_228;
double ld_236;
double ld_244;
double ld_260;
double ld_268;
double ld_276;
double ld_284;
double ld_292;
double ld_300;
double ld_308;
double ld_316;
double ld_324;
double ld_340;
int li_360;
CustomInit();
int li_0 = IndicatorCounted();
if (li_0 < 0) return (-1);
if (li_0 > 0) li_0–;
int li_4 = Bars – li_0;
int li_8 = 0;
int li_12 = 0;
string l_text_16 = “”;
int li_32 = 0;
bool li_116 = FALSE;
bool li_120 = FALSE;
double ld_124 = CalcAdjust(1);
bool li_132 = FALSE;
bool li_136 = FALSE;
double ld_140 = CalcAdjust(0);
for (int l_index_148 = 0; l_index_148 < li_4; l_index_148++) {
if (High[l_index_148] == MathMax(MaxHighPres(l_index_148, gi_92), MaxHighPast(l_index_148, gi_92)) && li_32 >= 0 && !li_136) {
switch (li_32) {
case 0:
ld_108 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh5”, Symbol(), Period());
li_12 = 144;
li_32 = -1;
break;
case 1:
ld_100 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh4”, Symbol(), Period());
li_12 = 143;
li_32 = -2;
break;
case 2:
ld_92 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh3”, Symbol(), Period());
li_12 = 142;
li_32 = -3;
break;
case 3:
ld_84 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh2”, Symbol(), Period());
li_12 = 141;
li_32 = -4;
break;
case 4:
ld_76 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh1”, Symbol(), Period());
li_12 = 140;
li_32 = -5;
}
if (DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_ARROW, 0, Time[l_index_148], High[l_index_148] + ld_140);
ObjectSet(l_str_concat_24, OBJPROP_ARROWCODE, li_12);
ObjectSet(l_str_concat_24, OBJPROP_COLOR, Waves);
}
} else {
if (High[l_index_148] == MathMax(MaxHighPres(l_index_148, gi_92), MaxHighPast(l_index_148, gi_92)) && li_32 < 0 && !li_136) {
switch (li_32) {
case -1:
if (High[l_index_148] > ld_108) {
ld_108 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh5”, Symbol(), Period());
li_12 = 144;
li_132 = TRUE;
}
break;
case -2:
if (High[l_index_148] > ld_100) {
ld_100 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh4”, Symbol(), Period());
li_12 = 143;
li_132 = TRUE;
}
break;
case -3:
if (High[l_index_148] > ld_92) {
ld_92 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh3”, Symbol(), Period());
li_12 = 142;
li_132 = TRUE;
}
break;
case -4:
if (High[l_index_148] > ld_84) {
ld_84 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh2”, Symbol(), Period());
li_12 = 141;
li_132 = TRUE;
}
break;
case -5:
if (High[l_index_148] > ld_76) {
ld_76 = High[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesmh1”, Symbol(), Period());
li_12 = 140;
li_132 = TRUE;
li_136 = TRUE;
}
break;
default:
li_136 = TRUE;
}
if (li_132 && DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_ARROW, 0, Time[l_index_148], High[l_index_148] + ld_140);
ObjectSet(l_str_concat_24, OBJPROP_ARROWCODE, li_12);
ObjectSet(l_str_concat_24, OBJPROP_COLOR, Waves);
li_132 = FALSE;
}
}
}
if (Low[l_index_148] == MathMin(MinLowPres(l_index_148, gi_92), MinLowPast(l_index_148, gi_92)) && li_32 <= 0 && !li_136) {
switch (li_32) {
case 0:
ld_108 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml5”, Symbol(), Period());
li_12 = 144;
li_32 = 1;
break;
case -1:
ld_100 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml4”, Symbol(), Period());
li_12 = 143;
li_32 = 2;
break;
case -2:
ld_92 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml3”, Symbol(), Period());
li_12 = 142;
li_32 = 3;
break;
case -3:
ld_84 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml2”, Symbol(), Period());
li_12 = 141;
li_32 = 4;
break;
case -4:
ld_76 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml1”, Symbol(), Period());
li_12 = 140;
li_32 = 5;
li_136 = TRUE;
}
if (DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_ARROW, 0, Time[l_index_148], Low[l_index_148] – ld_140);
ObjectSet(l_str_concat_24, OBJPROP_ARROWCODE, li_12);
ObjectSet(l_str_concat_24, OBJPROP_COLOR, Waves);
}
} else {
if (Low[l_index_148] == MathMin(MinLowPres(l_index_148, gi_92), MinLowPast(l_index_148, gi_92)) && li_32 > 0 && !li_136) {
switch (li_32) {
case 1:
if (Low[l_index_148] < ld_108) {
ld_108 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml5”, Symbol(), Period());
li_12 = 144;
li_132 = TRUE;
}
break;
case 2:
if (Low[l_index_148] < ld_100) {
ld_100 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml4”, Symbol(), Period());
li_12 = 143;
li_132 = TRUE;
}
break;
case 3:
if (Low[l_index_148] < ld_92) {
ld_92 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml3”, Symbol(), Period());
li_12 = 142;
li_132 = TRUE;
}
break;
case 4:
if (Low[l_index_148] < ld_84) {
ld_84 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml2”, Symbol(), Period());
li_12 = 141;
li_132 = TRUE;
}
break;
case 5:
if (Low[l_index_148] < ld_76) {
ld_76 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(“Small”, “ibfxwavesml1”, Symbol(), Period());
li_12 = 140;
li_132 = TRUE;
li_136 = TRUE;
}
break;
default:
li_136 = TRUE;
}
if (li_132 && DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_ARROW, 0, Time[l_index_148], Low[l_index_148] – ld_140);
ObjectSet(l_str_concat_24, OBJPROP_ARROWCODE, li_12);
ObjectSet(l_str_concat_24, OBJPROP_COLOR, Waves);
li_132 = FALSE;
}
}
}
if (High[l_index_148] == MathMax(MaxHighPres(l_index_148, gi_88), MaxHighPast(l_index_148, gi_88)) && li_8 >= 0 && !li_120) {
switch (li_8) {
case 0:
ld_68 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh5”);
l_text_16 = “E”;
li_8 = -1;
break;
case 1:
ld_60 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh4”);
l_text_16 = “D”;
li_8 = -2;
break;
case 2:
ld_52 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh3”);
l_text_16 = “C”;
li_8 = -3;
break;
case 3:
ld_44 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh2”);
l_text_16 = “B”;
li_8 = -4;
break;
case 4:
ld_36 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh1”);
l_text_16 = “A”;
li_8 = -5;
}
if (DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_TEXT, 0, Time[l_index_148], High[l_index_148] + ld_124);
ObjectSetText(l_str_concat_24, l_text_16, 12, “Arial Bold”, Waves);
}
} else {
if (High[l_index_148] == MathMax(MaxHighPres(l_index_148, gi_88), MaxHighPast(l_index_148, gi_88)) && li_8 < 0 && !li_120) {
switch (li_8) {
case -1:
if (High[l_index_148] > ld_68) {
ld_68 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh5”);
l_text_16 = “E”;
li_116 = TRUE;
}
break;
case -2:
if (High[l_index_148] > ld_60) {
ld_60 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh4”);
l_text_16 = “D”;
li_116 = TRUE;
}
break;
case -3:
if (High[l_index_148] > ld_52) {
ld_52 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh3”);
l_text_16 = “C”;
li_116 = TRUE;
}
break;
case -4:
if (High[l_index_148] > ld_44) {
ld_44 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh2”);
l_text_16 = “B”;
li_116 = TRUE;
}
break;
case -5:
if (High[l_index_148] > ld_36) {
ld_36 = High[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesh1”);
l_text_16 = “A”;
li_116 = TRUE;
li_120 = TRUE;
}
break;
default:
li_120 = TRUE;
}
if (li_116 && DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_TEXT, 0, Time[l_index_148], High[l_index_148] + ld_124);
ObjectSetText(l_str_concat_24, l_text_16, 12, “Arial Bold”, Waves);
li_116 = FALSE;
}
}
}
if (Low[l_index_148] == MathMin(MinLowPres(l_index_148, gi_88), MinLowPast(l_index_148, gi_88)) && li_8 <= 0 && !li_120) {
switch (li_8) {
case 0:
ld_68 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl5”);
l_text_16 = “E”;
li_8 = 1;
break;
case -1:
ld_60 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl4”);
l_text_16 = “D”;
li_8 = 2;
break;
case -2:
ld_52 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl3”);
l_text_16 = “C”;
li_8 = 3;
break;
case -3:
ld_44 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl2”);
l_text_16 = “B”;
li_8 = 4;
break;
case -4:
ld_36 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl1”);
l_text_16 = “A”;
li_8 = 5;
li_120 = TRUE;
}
if (DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_TEXT, 0, Time[l_index_148], Low[l_index_148] – ld_124);
ObjectSetText(l_str_concat_24, l_text_16, 12, “Arial Bold”, Waves);
}
} else {
if (Low[l_index_148] == MathMin(MinLowPres(l_index_148, gi_88), MinLowPast(l_index_148, gi_88)) && li_8 > 0 && !li_120) {
switch (li_8) {
case 1:
if (Low[l_index_148] < ld_68) {
ld_68 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl5”);
l_text_16 = “E”;
li_116 = TRUE;
}
break;
case 2:
if (Low[l_index_148] < ld_60) {
ld_60 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl4”);
l_text_16 = “D”;
li_116 = TRUE;
}
break;
case 3:
if (Low[l_index_148] < ld_52) {
ld_52 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl3”);
l_text_16 = “C”;
li_116 = TRUE;
}
break;
case 4:
if (Low[l_index_148] < ld_44) {
ld_44 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl2”);
l_text_16 = “B”;
li_116 = TRUE;
}
break;
case 5:
if (Low[l_index_148] < ld_36) {
ld_36 = Low[l_index_148];
l_str_concat_24 = StringConcatenate(Symbol(), Period(), “ibfxwavesl1”);
l_text_16 = “A”;
li_116 = TRUE;
li_120 = TRUE;
}
break;
default:
li_120 = TRUE;
}
if (li_116 && DisplayWaves) {
ObjectCreate(l_str_concat_24, OBJ_TEXT, 0, Time[l_index_148], Low[l_index_148] – ld_124);
ObjectSetText(l_str_concat_24, l_text_16, 12, “Arial Bold”, Waves);
li_116 = FALSE;
}
}
}
li_184 = CalculateSignals(ld_36, ld_44, ld_52, ld_60, ld_68, ld_76, ld_84, ld_92, ld_100, ld_108);
ls_188 = TimeToStr(Time[l_index_148] + 60 * (gi_92 * Period()), TIME_DATE|TIME_MINUTES);
if (li_184 != gi_76 && ls_188 != gs_80 && li_184 != 0) {
gi_76 = li_184;
gs_80 = ls_188;
switch (li_184) {
case 3:
case -3:
ld_300 = ld_68 – 0.6 * (ld_44 – ld_36);
ld_308 = ld_68 – 1.0 * (ld_44 – ld_36);
ld_316 = ld_68 – 1.6 * (ld_44 – ld_36);
ld_324 = ld_68 – 2.6 * (ld_44 – ld_36);
if (ld_68 > ld_36 – 0.05 * (ld_44 – ld_36)) {
ld_260 = ld_44 – 0.2 * (ld_44 – ld_68);
ld_268 = ld_44 – 0.6 * (ld_44 – ld_68);
ld_276 = ld_44 – 1.0 * (ld_44 – ld_68);
ld_284 = ld_44 – 1.6 * (ld_44 – ld_68);
ld_292 = ld_44 – 2.6 * (ld_44 – ld_68);
} else {
ld_260 = ld_44 – 0.2 * (ld_44 – ld_36);
ld_268 = ld_44 – 0.6 * (ld_44 – ld_68);
ld_276 = ld_44 – 1.0 * (ld_44 – ld_68);
ld_284 = ld_44 – 1.6 * (ld_44 – ld_36);
ld_292 = ld_44 – 2.6 * (ld_44 – ld_36);
}
ld_340 = ld_300 – ld_260;
ld_228 = ld_300;
if (ld_340 > ld_300 – ld_268) {
ld_340 = ld_300 – ld_268;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_276) {
ld_340 = ld_300 – ld_276;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_284) {
ld_340 = ld_300 – ld_284;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_292) {
ld_340 = ld_300 – ld_292;
ld_228 = ld_300;
}
if (ld_340 > ld_308 – ld_260) {
ld_340 = ld_308 – ld_260;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_268) {
ld_340 = ld_308 – ld_268;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_276) {
ld_340 = ld_308 – ld_276;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_284) {
ld_340 = ld_308 – ld_284;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_292) {
ld_340 = ld_308 – ld_292;
ld_228 = ld_308;
}
if (ld_340 > ld_316 – ld_260) {
ld_340 = ld_316 – ld_260;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_268) {
ld_340 = ld_316 – ld_268;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_276) {
ld_340 = ld_316 – ld_276;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_284) {
ld_340 = ld_316 – ld_284;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_292) {
ld_340 = ld_316 – ld_292;
ld_228 = ld_316;
}
if (ld_340 > ld_324 – ld_260) {
ld_340 = ld_324 – ld_260;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_268) {
ld_340 = ld_324 – ld_268;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_276) {
ld_340 = ld_324 – ld_276;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_284) {
ld_340 = ld_324 – ld_284;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_292) {
ld_340 = ld_324 – ld_292;
ld_228 = ld_324;
}
ld_236 = MathAbs(ld_340) + ld_228;
ld_244 = (ld_44 – ld_36) / MathMax(ld_44, 0.0000001);
l_price_196 = ld_236 + ld_236 * (ld_244 / 40.0);
l_price_204 = ld_236 – ld_236 * (ld_244 / 40.0);
break;
case 2:
case -2:
ld_300 = ld_68 + 0.3 * (ld_60 – ld_36);
ld_308 = ld_68 + 0.6 * (ld_60 – ld_36);
ld_316 = ld_68 + 1.0 * (ld_60 – ld_36);
ld_260 = ld_60 + 0.2 * (ld_60 – ld_68);
ld_268 = ld_60 + 0.6 * (ld_60 – ld_68);
ld_276 = ld_60 + 1.0 * (ld_60 – ld_68);
ld_284 = ld_60 + 1.6 * (ld_60 – ld_68);
ld_292 = ld_60 + 2.6 * (ld_60 – ld_68);
ld_340 = ld_300 – ld_260;
ld_228 = ld_300;
if (ld_340 > ld_300 – ld_268) {
ld_340 = ld_300 – ld_268;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_276) {
ld_340 = ld_300 – ld_276;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_284) {
ld_340 = ld_300 – ld_284;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_292) {
ld_340 = ld_300 – ld_292;
ld_228 = ld_300;
}
if (ld_340 > ld_308 – ld_260) {
ld_340 = ld_308 – ld_260;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_268) {
ld_340 = ld_308 – ld_268;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_276) {
ld_340 = ld_308 – ld_276;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_284) {
ld_340 = ld_308 – ld_284;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_292) {
ld_340 = ld_308 – ld_292;
ld_228 = ld_308;
}
if (ld_340 > ld_316 – ld_260) {
ld_340 = ld_316 – ld_260;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_268) {
ld_340 = ld_316 – ld_268;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_276) {
ld_340 = ld_316 – ld_276;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_284) {
ld_340 = ld_316 – ld_284;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_292) {
ld_340 = ld_316 – ld_292;
ld_228 = ld_316;
}
ld_236 = MathAbs(ld_340) + ld_228;
ld_244 = (ld_36 – ld_44) / MathMax(ld_36, 0.0000001);
l_price_196 = ld_236 + ld_236 * (ld_244 / 10.0);
l_price_204 = ld_236 – ld_236 * (ld_244 / 10.0);
break;
case 1:
case -1:
ld_300 = ld_68 + 0.6 * (ld_60 – ld_52);
ld_308 = ld_68 + 1.0 * (ld_60 – ld_52);
ld_316 = ld_68 + 1.6 * (ld_60 – ld_52);
ld_324 = ld_68 + 2.6 * (ld_60 – ld_52);
if (ld_68 < ld_60 – 0.05 * (ld_60 – ld_52)) {
ld_260 = ld_60 + 0.2 * (ld_60 – ld_68);
ld_268 = ld_60 + 0.6 * (ld_60 – ld_68);
ld_276 = ld_60 + 1.0 * (ld_60 – ld_68);
ld_284 = ld_60 + 1.6 * (ld_60 – ld_68);
ld_292 = ld_60 + 2.6 * (ld_60 – ld_68);
} else {
ld_260 = ld_60 + 0.2 * (ld_60 – ld_52);
ld_268 = ld_60 + 0.6 * (ld_60 – ld_68);
ld_276 = ld_60 + 1.0 * (ld_60 – ld_52);
ld_284 = ld_60 + 1.6 * (ld_60 – ld_52);
ld_292 = ld_60 + 2.6 * (ld_60 – ld_52);
}
ld_340 = ld_300 – ld_260;
ld_228 = ld_300;
if (ld_340 > ld_300 – ld_268) {
ld_340 = ld_300 – ld_268;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_276) {
ld_340 = ld_300 – ld_276;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_284) {
ld_340 = ld_300 – ld_284;
ld_228 = ld_300;
}
if (ld_340 > ld_300 – ld_292) {
ld_340 = ld_300 – ld_292;
ld_228 = ld_300;
}
if (ld_340 > ld_308 – ld_260) {
ld_340 = ld_308 – ld_260;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_268) {
ld_340 = ld_308 – ld_268;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_276) {
ld_340 = ld_308 – ld_276;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_284) {
ld_340 = ld_308 – ld_284;
ld_228 = ld_308;
}
if (ld_340 > ld_308 – ld_292) {
ld_340 = ld_308 – ld_292;
ld_228 = ld_308;
}
if (ld_340 > ld_316 – ld_260) {
ld_340 = ld_316 – ld_260;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_268) {
ld_340 = ld_316 – ld_268;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_276) {
ld_340 = ld_316 – ld_276;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_284) {
ld_340 = ld_316 – ld_284;
ld_228 = ld_316;
}
if (ld_340 > ld_316 – ld_292) {
ld_340 = ld_316 – ld_292;
ld_228 = ld_316;
}
if (ld_340 > ld_324 – ld_260) {
ld_340 = ld_324 – ld_260;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_268) {
ld_340 = ld_324 – ld_268;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_276) {
ld_340 = ld_324 – ld_276;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_284) {
ld_340 = ld_324 – ld_284;
ld_228 = ld_324;
}
if (ld_340 > ld_324 – ld_292) {
ld_340 = ld_324 – ld_292;
ld_228 = ld_324;
}
ld_236 = MathAbs(ld_340) + ld_228;
ld_244 = (ld_60 – ld_52) / MathMax(ld_52, 0.0000001);
l_price_196 = ld_236 + ld_236 * (ld_244 / 10.0);
l_price_204 = ld_236 – ld_236 * (ld_244 / 10.0);
}
li_360 = 0;
if (l_index_148 < 10) li_360 = 10;
if (DisplayTarget) {
ObjectCreate(StringConcatenate(Symbol(), Period(), “ibfxwavestarget”), OBJ_RECTANGLE, 0, Time[l_index_148] + 60 * (gi_92 * Period()), l_price_204, Time[li_360], l_price_196);
ObjectSet(StringConcatenate(Symbol(), Period(), “ibfxwavestarget”), OBJPROP_COLOR, ProfitTarget);
}
if (DisplayComment) {
if (li_184 > 0) Comment(“\n Signal: Buy \n Profit Target: “, NormalizeDouble(l_price_196, MarketInfo(Symbol(), MODE_DIGITS)), ” \n Signal Given on: “, ls_188);
else
if (li_184 < 0) Comment(“\n Signal: Sell \n Profit Target: “, NormalizeDouble(l_price_204, MarketInfo(Symbol(), MODE_DIGITS)), ” \n Signal Given on: “, ls_188);
}
}
}
return (0);
}

double MaxHighPres(int ai_0, int ai_4) {
double ld_ret_8 = 0.0;
for (int l_count_16 = 0; l_count_16 < ai_4; l_count_16++) ld_ret_8 = MathMax(ld_ret_8, iHigh(NULL, 0, ai_0 – l_count_16));
return (ld_ret_8);
}

double MaxHighPast(int ai_0, int ai_4) {
double ld_ret_8 = 0.0;
for (int l_count_16 = 0; l_count_16 < ai_4; l_count_16++) ld_ret_8 = MathMax(ld_ret_8, iHigh(NULL, 0, ai_0 + l_count_16));
return (ld_ret_8);
}

double MinLowPres(int ai_0, int ai_4) {
double ld_ret_8 = 10000000000000000.0;
for (int l_count_16 = 0; l_count_16 < ai_4; l_count_16++) ld_ret_8 = MathMin(ld_ret_8, iLow(NULL, 0, ai_0 – l_count_16));
return (ld_ret_8);
}

double MinLowPast(int ai_0, int ai_4) {
double ld_ret_8 = 10000000000000000.0;
for (int l_count_16 = 0; l_count_16 < ai_4; l_count_16++) ld_ret_8 = MathMin(ld_ret_8, iLow(NULL, 0, ai_0 + l_count_16));
return (ld_ret_8);
}

void CleanUp() {
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesh1”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesh2”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesh3”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesh4”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesh5”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesl1”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesl2”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesl3”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesl4”));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavesl5”));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesmh1”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesmh2”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesmh3”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesmh4”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesmh5”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesml1”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesml2”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesml3”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesml4”, Symbol(), Period()));
ObjectDelete(StringConcatenate(“Small”, “ibfxwavesml5”, Symbol(), Period()));
ObjectDelete(StringConcatenate(Symbol(), Period(), “ibfxwavestarget”));
Comment(“”);
}

double CalcAdjust(bool ai_0) {
double ld_ret_4 = 0;
int li_12 = 1;
if (ai_0) li_12 = 2;
switch (Period()) {
case PERIOD_M1:
ld_ret_4 = 3 * li_12 * Point;
break;
case PERIOD_M5:
ld_ret_4 = 10 * li_12 * Point;
break;
case PERIOD_M15:
ld_ret_4 = 15 * li_12 * Point;
break;
case PERIOD_M30:
ld_ret_4 = 20 * li_12 * Point;
break;
case PERIOD_H1:
ld_ret_4 = 25 * li_12 * Point;
break;
case PERIOD_H4:
ld_ret_4 = 30 * li_12 * Point;
break;
case PERIOD_D1:
ld_ret_4 = 60 * li_12 * Point;
break;
case PERIOD_W1:
ld_ret_4 = 80 * li_12 * Point;
break;
case PERIOD_MN1:
ld_ret_4 = 120 * li_12 * Point;
}
return (ld_ret_4);
}

int CalculateSignals(double ad_0, double ad_8, double ad_16, double ad_24, double ad_32, double ad_40, double ad_48, double ad_56, double ad_64, double ad_72) {
if (ad_0 > 0.0 && ad_8 > 0.0 && ad_16 > 0.0 && ad_24 > 0.0 && ad_32 > 0.0 && ad_40 > 0.0 && ad_48 > 0.0 && ad_56 > 0.0 && ad_64 > 0.0 && ad_72 > 0.0) {
if (ad_32 < ad_24 – (ad_24 – ad_16) / 2.0 && ad_32 >= ad_16 && ad_16 < ad_0 && ad_56 < ad_48 && ad_64 > ad_56 && ad_64 < ad_48 && ad_72 < ad_56) return (1);
else {
if (ad_32 > ad_24 – (ad_24 – ad_16) / 2.0 && ad_32 <= ad_16 && ad_16 > ad_0 && ad_56 > ad_48 && ad_64 < ad_56 && ad_64 > ad_48 && ad_72 > ad_56) return (-1);
else {
if (ad_8 > ad_0 && ad_16 > ad_0 && ad_16 < ad_8 && ad_24 > ad_16 && ad_24 > ad_8 && ad_32 < ad_24 && ad_32 > ad_16 && ad_24 – ad_16 > ad_8 – ad_0 && ad_32 > (ad_8 +
ad_16) / 2.0) return (2);
else {
if (ad_8 < ad_0 && ad_16 < ad_0 && ad_16 > ad_8 && ad_24 < ad_16 && ad_24 < ad_8 && ad_32 > ad_24 && ad_32 < ad_16 && ad_24 – ad_16 < ad_8 – ad_0 && ad_32 < (ad_8 +
ad_16) / 2.0) return (-2);
else {
if (ad_8 < ad_0 && ad_16 > ad_8 && ad_16 < ad_0 && ad_24 < ad_16 && ad_24 >= ad_8 && ad_32 >= ad_16 && ad_32 < ad_0 && ad_24 – ad_32 > 1.3 * (ad_8 – ad_16)) return (3);
else {
if (ad_8 > ad_0 && ad_16 < ad_8 && ad_16 > ad_0 && ad_24 > ad_16 && ad_24 <= ad_8 && ad_32 <= ad_16 && ad_32 > ad_0 && ad_24 – ad_32 < 1.3 * (ad_8 – ad_16)) return (-3);
else return (0);
}
}
}
}
}
}
return (0);
}

void CustomInit() {
if (!IsConnected() || AccountNumber() == 0) return;
// if (StringFind(AccountServer(), “”, 0) == -1 && StringFind(AccountServer(), “IBFX”, 0) == -1) Alert(“InterbankFX users Only!!!”);
}

如果你对文件有了解,请帮助投票!

If you are familiar with the file, please help vote!

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位投票人。

相关资源

暂无评论

none
暂无评论...