[MT4指标]千点指标系统
#property copyright "Copyright ?2009, Oasis WealthBuilders."
#property link "www.oasiswealthbuilders.com"
#property indicator_chart_window
extern bool Show_Currency_Meter_Strength = TRUE;
extern bool Show_Statistic = TRUE;
extern bool Show_CS_Position = TRUE;
extern bool Show_SnR_Distance = TRUE;
extern bool Show_Candle_Direction = TRUE;
extern bool Show_Candle_Time = TRUE;
extern bool Draw_Fibo_Pivot = TRUE;
extern bool USD_JPY_alert = TRUE;
extern string weak_alert_file = "alert2.wav";
extern string strong_alert_file = "alert2.wav";
extern double StrengthGap = 3.0;
string gsa_132 = {"USD", "EUR", "GBP", "JPY", "CHF", "CAD", "NZD", "AUD"};
string gsa_136 = {"EURUSD", "GBPUSD", "AUDUSD", "USDJPY", "USDCHF", "USDCAD", "EURAUD", "EURCAD", "EURCHF", "EURGBP", "EURJPY", "GBPJPY", "GBPCHF", "NZDUSD", "AUDCAD", "AUDJPY", "CHFJPY", "AUDNZD", "NZDJPY", "NZDCAD", "NZDCHF", "GBPNZD", "EURNZD", "GBPCAD", "GBPAUD", "AUDCHF", "CADCHF", "CADJPY"};
string gsa_140 = {"GBPJPY", "AUDJPY", "EURJPY", "USDJPY", "NZDJPY", "CHFJPY", "GBPUSD", "AUDUSD", "EURUSD", "NZDUSD", "USDCAD", "USDCHF"};
double gd_144;
double gd_152;
double gd_160;
double gd_168;
double gd_176;
double gd_184;
double gd_192;
string gs_200 = "";
bool gi_unused_208 = FALSE;
int init() {
ObjectsDeleteAll(0, OBJ_LABEL);
ObjectsDeleteAll(0, OBJ_TEXT);
Comment("");
return (0);
}
int deinit() {
ObjectsDeleteAll(0, OBJ_LABEL);
ObjectsDeleteAll(0, OBJ_TEXT);
ObjectDelete("S1");
ObjectDelete("S2");
ObjectDelete("S3");
ObjectDelete("R1");
ObjectDelete("R2");
ObjectDelete("R3");
ObjectDelete("PIVOT");
ObjectDelete("Support 1");
ObjectDelete("Support 2");
ObjectDelete("Support 3");
ObjectDelete("Piviot level");
ObjectDelete("Resistance 1");
ObjectDelete("Resistance 2");
ObjectDelete("Resistance 3");
Comment("");
return (0);
}
int start() {
gs_200 = StringSubstr(Symbol(), 6, 1);
RefreshRates();
if (Show_Currency_Meter_Strength) displayMeter();
if (Show_Statistic) displayHiLo();
if (Show_CS_Position) showCSLocation();
if (Show_SnR_Distance) showSnRDist();
if (Show_Candle_Direction) displayCandleDirection();
if (Show_Candle_Time) displayCandleTime();
if (Draw_Fibo_Pivot) drawFiboPiv();
if (USD_JPY_alert) {
if (currency_strength("JPY") <= 2.0 || currency_strength("USD") <= 2.0) PlaySound(weak_alert_file);
if (currency_strength("JPY") >= 8.0 || currency_strength("USD") >= 8.0) PlaySound(strong_alert_file);
}
return (0);
}
double currency_strength(string as_0) {
int li_8;
string ls_12;
double ld_20;
double ld_28;
double ld_ret_36 = 0;
int l_count_44 = 0;
for (int l_index_48 = 0; l_index_48 < ArraySize(gsa_136); l_index_48++) {
li_8 = 0;
ls_12 = gsa_136[l_index_48];
if (as_0 == StringSubstr(ls_12, 0, 3) || as_0 == StringSubstr(ls_12, 3, 3)) {
ls_12 = ls_12 + gs_200;
ld_20 = (MarketInfo(ls_12, MODE_HIGH) - MarketInfo(ls_12, MODE_LOW)) * MarketInfo(ls_12, MODE_POINT);
if (ld_20 != 0.0) {
ld_28 = 100.0 * ((MarketInfo(ls_12, MODE_BID) - MarketInfo(ls_12, MODE_LOW)) / ld_20 * MarketInfo(ls_12, MODE_POINT));
if (ld_28 > 3.0) li_8 = 1;
if (ld_28 > 10.0) li_8 = 2;
if (ld_28 > 25.0) li_8 = 3;
if (ld_28 > 40.0) li_8 = 4;
if (ld_28 > 50.0) li_8 = 5;
if (ld_28 > 60.0) li_8 = 6;
if (ld_28 > 75.0) li_8 = 7;
if (ld_28 > 90.0) li_8 = 8;
if (ld_28 > 97.0) li_8 = 9;
l_count_44++;
if (as_0 == StringSubstr(ls_12, 3, 3)) li_8 = 9 - li_8;
ld_ret_36 += li_8;
}
}
}
ld_ret_36 /= l_count_44;
return (ld_ret_36);
}
void displayMeter() {
color l_color_0;
string l_name_4;
string ls_12 = "Meter";
double ld_20 = 0;
int l_x_28 = 220;
for (int l_index_32 = 0; l_index_32 < ArraySize(gsa_132); l_index_32++) {
ld_20++;
l_name_4 = ls_12 + DoubleToStr(ld_20, 0);
ObjectCreate(l_name_4, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_4, gsa_132[l_index_32], 9, "Arial Bold", DimGray);
ObjectSet(l_name_4, OBJPROP_CORNER, 3);
ObjectSet(l_name_4, OBJPROP_XDISTANCE, l_x_28);
ObjectSet(l_name_4, OBJPROP_YDISTANCE, 30);
l_x_28 -= 30;
}
l_x_28 = 221;
for (l_index_32 = 0; l_index_32 < ArraySize(gsa_132); l_index_32++) {
ld_20++;
l_name_4 = ls_12 + DoubleToStr(ld_20, 0);
l_color_0 = symcolor(currency_strength(gsa_132[l_index_32]));
ObjectCreate(l_name_4, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_4, DoubleToStr(currency_strength(gsa_132[l_index_32]), 2), 9, "Arial Bold", l_color_0);
ObjectSet(l_name_4, OBJPROP_CORNER, 3);
ObjectSet(l_name_4, OBJPROP_XDISTANCE, l_x_28);
ObjectSet(l_name_4, OBJPROP_YDISTANCE, 17);
l_x_28 -= 30;
}
ObjectCreate("Sym Line1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Sym Line1", "__________________________________", 10, "Arial Bold", White);
ObjectSet("Sym Line1", OBJPROP_CORNER, 3);
ObjectSet("Sym Line1", OBJPROP_XDISTANCE, 10);
ObjectSet("Sym Line1", OBJPROP_YDISTANCE, 45);
ObjectCreate("Sym Line2", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Sym Line2", "__________________________________", 10, "Arial Bold", White);
ObjectSet("Sym Line2", OBJPROP_CORNER, 3);
ObjectSet("Sym Line2", OBJPROP_XDISTANCE, 10);
ObjectSet("Sym Line2", OBJPROP_YDISTANCE, 16);
ObjectCreate("Copyright", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Copyright", "1000pips Club ?www.oasiswealthbuilders.com", 7, "Arial Bold", Yellow);
ObjectSet("Copyright", OBJPROP_CORNER, 3);
ObjectSet("Copyright", OBJPROP_XDISTANCE, 13);
ObjectSet("Copyright", OBJPROP_YDISTANCE, 5);
}
int symcolor(double ad_0) {
int li_ret_8;
if (ad_0 <= 2.0) li_ret_8 = 3937500;
if (ad_0 > 2.0) li_ret_8 = 16777215;
if (ad_0 >= 7.0) li_ret_8 = 65280;
return (li_ret_8);
}
void displayHiLo() {
string l_text_0;
string l_name_8;
string l_symbol_16;
double ld_24;
color l_color_32;
color l_color_36;
int l_y_40 = 47;
for (int l_index_44 = 0; l_index_44 < ArraySize(gsa_140); l_index_44++) {
l_symbol_16 = gsa_140[l_index_44];
l_symbol_16 = l_symbol_16 + gs_200;
l_name_8 = "Symbol " + gsa_140[l_index_44];
l_text_0 = gsa_140[l_index_44];
ObjectCreate(l_name_8, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_8, l_text_0, 8, "Arial Bold", Gray);
ObjectSet(l_name_8, OBJPROP_CORNER, 3);
ObjectSet(l_name_8, OBJPROP_XDISTANCE, 157);
ObjectSet(l_name_8, OBJPROP_YDISTANCE, l_y_40);
l_name_8 = "Spread " + l_symbol_16;
l_text_0 = DoubleToStr(MarketInfo(l_symbol_16, MODE_SPREAD), 0);
ObjectCreate(l_name_8, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_8, l_text_0, 8, "Arial", Yellow);
ObjectSet(l_name_8, OBJPROP_CORNER, 3);
ObjectSet(l_name_8, OBJPROP_XDISTANCE, 125);
ObjectSet(l_name_8, OBJPROP_YDISTANCE, l_y_40);
l_name_8 = "StrengthGap " + l_symbol_16;
ld_24 = MathAbs(currency_strength(StringSubstr(gsa_140[l_index_44], 0, 3)) - currency_strength(StringSubstr(gsa_140[l_index_44], 3, 3)));
if (ld_24 >= StrengthGap) l_color_32 = Lime;
else l_color_32 = Red;
l_text_0 = DoubleToStr(ld_24, 2);
ObjectCreate(l_name_8, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_8, l_text_0, 8, "Arial", l_color_32);
ObjectSet(l_name_8, OBJPROP_CORNER, 3);
ObjectSet(l_name_8, OBJPROP_XDISTANCE, 75);
ObjectSet(l_name_8, OBJPROP_YDISTANCE, l_y_40);
l_name_8 = "HiLo " + l_symbol_16;
l_text_0 = DoubleToStr((iHigh(l_symbol_16, PERIOD_D1, 0) - iLow(l_symbol_16, PERIOD_D1, 0)) / MarketInfo(l_symbol_16, MODE_POINT), 0);
if (Daily_AVG(l_symbol_16) > (iHigh(l_symbol_16, PERIOD_D1, 0) - iLow(l_symbol_16, PERIOD_D1, 0)) / MarketInfo(l_symbol_16, MODE_POINT)) l_color_36 = Lime;
else l_color_36 = Crimson;
ObjectCreate(l_name_8, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_8, l_text_0, 8, "Arial", l_color_36);
ObjectSet(l_name_8, OBJPROP_CORNER, 3);
ObjectSet(l_name_8, OBJPROP_XDISTANCE, 41);
ObjectSet(l_name_8, OBJPROP_YDISTANCE, l_y_40);
l_name_8 = "HiLo-AV " + l_symbol_16;
l_text_0 = DoubleToStr(Daily_AVG(l_symbol_16), 0);
ObjectCreate(l_name_8, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_8, l_text_0, 8, "Arial", White);
ObjectSet(l_name_8, OBJPROP_CORNER, 3);
ObjectSet(l_name_8, OBJPROP_XDISTANCE, 10);
ObjectSet(l_name_8, OBJPROP_YDISTANCE, l_y_40);
l_y_40 += 12;
}
ObjectCreate("HiLo Line", OBJ_LABEL, 0, 0, 0);
ObjectSetText("HiLo Line", "________________________________", 8, "Arial Bold", White);
ObjectSet("HiLo Line", OBJPROP_CORNER, 3);
ObjectSet("HiLo Line", OBJPROP_XDISTANCE, 10);
ObjectSet("HiLo Line", OBJPROP_YDISTANCE, l_y_40 + 1);
ObjectCreate("HiLo Title", OBJ_LABEL, 0, 0, 0);
ObjectSetText("HiLo Title", "PAIRS SPREAD RANGE HiLo D-Av", 8, "Arial Bold", White);
ObjectSet("HiLo Title", OBJPROP_CORNER, 3);
ObjectSet("HiLo Title", OBJPROP_XDISTANCE, 10);
ObjectSet("HiLo Title", OBJPROP_YDISTANCE, l_y_40 + 2);
}
int Daily_AVG(string a_symbol_0) {
int li_8 = 0;
int li_12 = 0;
int li_16 = 0;
int li_20 = 0;
int li_ret_24 = 0;
int li_28 = 0;
li_8 = (iHigh(a_symbol_0, PERIOD_D1, 1) - iLow(a_symbol_0, PERIOD_D1, 1)) / MarketInfo(a_symbol_0, MODE_POINT);
for (li_28 = 1; li_28 <= 5; li_28++) li_12 = li_12 + (iHigh(a_symbol_0, PERIOD_D1, li_28) - iLow(a_symbol_0, PERIOD_D1, li_28)) / MarketInfo(a_symbol_0, MODE_POINT);
for (li_28 = 1; li_28 <= 10; li_28++) li_16 = li_16 + (iHigh(a_symbol_0, PERIOD_D1, li_28) - iLow(a_symbol_0, PERIOD_D1, li_28)) / MarketInfo(a_symbol_0, MODE_POINT);
for (li_28 = 1; li_28 <= 20; li_28++) li_20 = li_20 + (iHigh(a_symbol_0, PERIOD_D1, li_28) - iLow(a_symbol_0, PERIOD_D1, li_28)) / MarketInfo(a_symbol_0, MODE_POINT);
li_12 /= 5;
li_16 /= 10;
li_20 /= 20;
li_ret_24 = (li_8 + li_12 + li_16 + li_20) / 4;
return (li_ret_24);
}
void showCSLocation() {
string l_text_0;
string l_name_8;
double l_iopen_16;
double l_iclose_24;
color l_color_32;
string l_symbol_36;
int l_y_44 = 47;
for (int l_index_48 = 0; l_index_48 < ArraySize(gsa_140); l_index_48++) {
l_symbol_36 = gsa_140[l_index_48];
l_symbol_36 = l_symbol_36 + gs_200;
l_iopen_16 = iOpen(l_symbol_36, PERIOD_M15, 0);
l_iclose_24 = iClose(l_symbol_36, PERIOD_M15, 0);
SymFiboPivot(l_symbol_36);
if (l_iclose_24 > gd_192) {
l_text_0 = ">R3";
l_color_32 = Lime;
}
if (l_iclose_24 < gd_192) {
l_text_0 = "R2-R3";
l_color_32 = Green;
}
if (l_iclose_24 < gd_184) {
l_text_0 = "R1-R2";
l_color_32 = DarkGreen;
}
if (l_iclose_24 < gd_176) {
l_text_0 = "Piv-R1";
l_color_32 = DimGray;
}
if (l_iclose_24 < gd_144) {
l_text_0 = "S1-Piv";
l_color_32 = DimGray;
}
if (l_iclose_24 < gd_152) {
l_text_0 = "S2-S1";
l_color_32 = Maroon;
}
if (l_iclose_24 < gd_160) {
l_text_0 = "S3-S2";
l_color_32 = Crimson;
}
if (l_iclose_24 < gd_168) {
l_text_0 = "= gd_192) {
l_text_0 = "X R3";
l_color_32 = Fuchsia;
}
if (l_iopen_16 < gd_184 && l_iclose_24 >= gd_184) {
l_text_0 = "X R2";
l_color_32 = Fuchsia;
}
if (l_iopen_16 < gd_176 && l_iclose_24 >= gd_176) {
l_text_0 = "X R1";
l_color_32 = Fuchsia;
}
if (l_iopen_16 > gd_152 && l_iclose_24 <= gd_152) {
l_text_0 = "X S1";
l_color_32 = Fuchsia;
}
if (l_iopen_16 > gd_160 && l_iclose_24 <= gd_160) {
l_text_0 = "X S2";
l_color_32 = Fuchsia;
}
if (l_iopen_16 > gd_168 && l_iclose_24 <= gd_168) {
l_text_0 = "X S3";
l_color_32 = Fuchsia;
}
l_name_8 = "Status " + l_symbol_36;
ObjectCreate(l_name_8, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_8, l_text_0, 8, "Arial Bold", l_color_32);
ObjectSet(l_name_8, OBJPROP_CORNER, 3);
ObjectSet(l_name_8, OBJPROP_XDISTANCE, 210);
ObjectSet(l_name_8, OBJPROP_YDISTANCE, l_y_44);
l_y_44 += 12;
}
ObjectCreate("StatusTitle", OBJ_LABEL, 0, 0, 0);
ObjectSetText("StatusTitle", "M15", 8, "Arial Bold", White);
ObjectSet("StatusTitle", OBJPROP_CORNER, 3);
ObjectSet("StatusTitle", OBJPROP_XDISTANCE, 210);
ObjectSet("StatusTitle", OBJPROP_YDISTANCE, l_y_44);
}
void SymFiboPivot(string a_symbol_0) {
double lda_8[1][6];
double ld_12;
double ld_20;
double ld_28;
ArrayCopyRates(lda_8, a_symbol_0, PERIOD_D1);
if (DayOfWeek() == 1) {
if (TimeDayOfWeek(iTime(a_symbol_0, PERIOD_D1, 1)) == 5) {
ld_12 = lda_8[1][4];
ld_20 = lda_8[1][3];
ld_28 = lda_8[1][2];
} else {
for (int li_36 = 5; li_36 >= 0; li_36--) {
if (TimeDayOfWeek(iTime(a_symbol_0, PERIOD_D1, li_36)) == 5) {
ld_12 = lda_8[li_36][4];
ld_20 = lda_8[li_36][3];
ld_28 = lda_8[li_36][2];
}
}
}
} else {
ld_12 = lda_8[1][4];
ld_20 = lda_8[1][3];
ld_28 = lda_8[1][2];
}
double ld_40 = ld_20 - ld_28;
gd_144 = (ld_20 + ld_28 + ld_12) / 3.0;
gd_192 = gd_144 + 1.0 * ld_40;
gd_184 = gd_144 + 0.618 * ld_40;
gd_176 = gd_144 + ld_40 / 2.0;
gd_152 = gd_144 - ld_40 / 2.0;
gd_160 = gd_144 - 0.618 * ld_40;
gd_168 = gd_144 - 1.0 * ld_40;
}
void showSnRDist() {
string l_text_0;
string l_text_8;
double ld_16;
double ld_24;
color l_color_32;
string l_symbol_36;
double l_iclose_44;
string l_name_52;
string lsa_60 = {"GBPJPY", "GBPUSD", "EURJPY"};
int l_y_64 = 30;
RefreshRates();
for (int l_index_68 = 0; l_index_68 < ArraySize(lsa_60); l_index_68++) {
l_symbol_36 = lsa_60[l_index_68];
l_symbol_36 = l_symbol_36 + gs_200;
l_iclose_44 = iClose(l_symbol_36, 0, 0);
SymFiboPivot(l_symbol_36);
if (l_iclose_44 >= gd_192) {
ld_16 = (l_iclose_44 - gd_192) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips > R3";
l_text_8 = "";
}
if (l_iclose_44 < gd_192 && l_iclose_44 >= gd_184) {
ld_16 = (gd_192 - l_iclose_44) / MarketInfo(l_symbol_36, MODE_POINT);
ld_24 = (l_iclose_44 - gd_184) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < R3";
l_text_8 = DoubleToStr(ld_24, 0) + "pips > R2";
}
if (l_iclose_44 < gd_184 && l_iclose_44 >= gd_176) {
ld_16 = (gd_184 - l_iclose_44) / MarketInfo(l_symbol_36, MODE_POINT);
ld_24 = (l_iclose_44 - gd_176) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < R2";
l_text_8 = DoubleToStr(ld_24, 0) + "pips > R1";
}
if (l_iclose_44 < gd_176 && l_iclose_44 >= gd_144) {
ld_16 = (gd_176 - l_iclose_44) / MarketInfo(l_symbol_36, MODE_POINT);
ld_24 = (l_iclose_44 - gd_144) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < R1";
l_text_8 = DoubleToStr(ld_24, 0) + "pips > Piv";
}
if (l_iclose_44 < gd_144 && l_iclose_44 >= gd_152) {
ld_16 = (gd_144 - l_iclose_44) / MarketInfo(l_symbol_36, MODE_POINT);
ld_24 = (l_iclose_44 - gd_152) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < Piv";
l_text_8 = DoubleToStr(ld_24, 0) + "pips > S1";
}
if (l_iclose_44 < gd_152 && l_iclose_44 >= gd_160) {
ld_16 = (gd_152 - l_iclose_44) / MarketInfo(l_symbol_36, MODE_POINT);
ld_24 = (l_iclose_44 - gd_160) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < S1";
l_text_8 = DoubleToStr(ld_24, 0) + "pips > S2";
}
if (l_iclose_44 < gd_160 && l_iclose_44 >= gd_168) {
ld_16 = (gd_160 - l_iclose_44) / MarketInfo(l_symbol_36, MODE_POINT);
ld_24 = (l_iclose_44 - gd_168) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < S2";
l_text_8 = DoubleToStr(ld_24, 0) + "pips > S3";
}
if (l_iclose_44 < gd_168) {
ld_16 = (l_iclose_44 - gd_168) / MarketInfo(l_symbol_36, MODE_POINT);
l_text_0 = DoubleToStr(ld_16, 0) + "pips < S3";
l_text_8 = "";
}
l_name_52 = "SnRPairName" + l_symbol_36;
ObjectCreate(l_name_52, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_52, l_symbol_36, 8, "Arial Bold", Gray);
ObjectSet(l_name_52, OBJPROP_CORNER, 1);
ObjectSet(l_name_52, OBJPROP_XDISTANCE, 170);
ObjectSet(l_name_52, OBJPROP_YDISTANCE, l_y_64);
l_name_52 = "SnRDist1" + l_symbol_36;
l_color_32 = SnRDistColor(ld_16);
ObjectCreate(l_name_52, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_52, l_text_0, 8, "Arial Bold", l_color_32);
ObjectSet(l_name_52, OBJPROP_CORNER, 1);
ObjectSet(l_name_52, OBJPROP_XDISTANCE, 90);
ObjectSet(l_name_52, OBJPROP_YDISTANCE, l_y_64);
l_color_32 = SnRDistColor(ld_24);
l_name_52 = "SnRDist2" + l_symbol_36;
ObjectCreate(l_name_52, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_52, l_text_8, 8, "Arial Bold", l_color_32);
ObjectSet(l_name_52, OBJPROP_CORNER, 1);
ObjectSet(l_name_52, OBJPROP_XDISTANCE, 10);
ObjectSet(l_name_52, OBJPROP_YDISTANCE, l_y_64);
l_y_64 += 10;
}
}
int SnRDistColor(int ai_0) {
int li_ret_4;
if (ai_0 > 10) li_ret_4 = 16777215;
if (ai_0 < 11) li_ret_4 = 13688896;
return (li_ret_4);
}
void displayCandleDirection() {
color l_color_0;
color l_color_4;
string l_text_8;
string l_text_16;
string l_symbol_24;
double l_iopen_32;
double l_iclose_40;
double l_iopen_48;
double l_iclose_56;
string l_name_64;
int l_y_72 = 85;
for (int li_76 = ArraySize(gsa_140) - 1; li_76 > -1; li_76--) {
l_symbol_24 = gsa_140[li_76];
l_symbol_24 = l_symbol_24 + gs_200;
l_iopen_32 = iOpen(l_symbol_24, PERIOD_M15, 0);
l_iclose_40 = iClose(l_symbol_24, PERIOD_M15, 0);
l_iopen_48 = iOpen(l_symbol_24, PERIOD_H1, 0);
l_iclose_56 = iClose(l_symbol_24, PERIOD_H1, 0);
if (l_iopen_32 < l_iclose_40) {
l_text_8 = "?;
l_color_0 = Lime;
} else {
l_text_8 = "?;
l_color_0 = Red;
}
if (l_iopen_48 < l_iclose_56) {
l_text_16 = "?;
l_color_4 = Lime;
} else {
l_text_16 = "?;
l_color_4 = Red;
}
l_name_64 = "CandleDirection " + gsa_140[li_76];
ObjectCreate(l_name_64, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_64, gsa_140[li_76], 8, "Arial Bold", Gray);
ObjectSet(l_name_64, OBJPROP_CORNER, 1);
ObjectSet(l_name_64, OBJPROP_XDISTANCE, 55);
ObjectSet(l_name_64, OBJPROP_YDISTANCE, l_y_72);
l_name_64 = "Candle_M15 " + gsa_140[li_76];
ObjectCreate(l_name_64, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_64, l_text_8, 8, "Wingdings", l_color_0);
ObjectSet(l_name_64, OBJPROP_CORNER, 1);
ObjectSet(l_name_64, OBJPROP_XDISTANCE, 30);
ObjectSet(l_name_64, OBJPROP_YDISTANCE, l_y_72);
l_name_64 = "Candle_H1" + gsa_140[li_76];
ObjectCreate(l_name_64, OBJ_LABEL, 0, 0, 0);
ObjectSetText(l_name_64, l_text_16, 8, "Wingdings", l_color_4);
ObjectSet(l_name_64, OBJPROP_CORNER, 1);
ObjectSet(l_name_64, OBJPROP_XDISTANCE, 10);
ObjectSet(l_name_64, OBJPROP_YDISTANCE, l_y_72);
l_y_72 += 12;
}
ObjectCreate("CandleDirection", OBJ_LABEL, 0, 0, 0);
ObjectSetText("CandleDirection", "M15 H1", 8, "Arial Bold", White);
ObjectSet("CandleDirection", OBJPROP_CORNER, 1);
ObjectSet("CandleDirection", OBJPROP_XDISTANCE, 5);
ObjectSet("CandleDirection", OBJPROP_YDISTANCE, 72);
}
void displayCandleTime() {
int li_0 = Time[0] + 60 * Period() - TimeCurrent();
double ld_4 = li_0 / 60.0;
int li_12 = li_0 % 60;
li_0 = (li_0 - li_0 % 60) / 60;
ObjectDelete("CandleClock");
if (ObjectFind("CandleClock") != 0) {
ObjectCreate("CandleClock", OBJ_TEXT, 0, Time[0], Close[0] + 0.0005);
ObjectSetText("CandleClock", " < " + li_0 + ":" + li_12, 10, "Comic Sans MS", Yellow);
return;
}
ObjectMove("CandleClock", 0, Time[0], Close[0] + 0.0005);
}
void drawFiboPiv() {
SymFiboPivot(Symbol());
drawLine(gd_192, "R3", Lime, 0);
drawLabel("Resistance 3", gd_192, Lime);
drawLine(gd_184, "R2", Green, 0);
drawLabel("Resistance 2", gd_184, Green);
drawLine(gd_176, "R1", DarkGreen, 0);
drawLabel("Resistance 1", gd_176, DarkGreen);
drawLine(gd_144, "PIVOT", Blue, 1);
drawLabel("Pivot level", gd_144, Blue);
drawLine(gd_152, "S1", Maroon, 0);
drawLabel("Support 1", gd_152, Maroon);
drawLine(gd_160, "S2", Crimson, 0);
drawLabel("Support 2", gd_160, Crimson);
drawLine(gd_168, "S3", Red, 0);
drawLabel("Support 3", gd_168, Red);
}
void drawLabel(string a_name_0, double a_price_8, color a_color_16) {
if (ObjectFind(a_name_0) != 0) {
ObjectCreate(a_name_0, OBJ_TEXT, 0, Time[10], a_price_8);
ObjectSetText(a_name_0, a_name_0, 8, "Arial", CLR_NONE);
ObjectSet(a_name_0, OBJPROP_COLOR, a_color_16);
return;
}
ObjectMove(a_name_0, 0, Time[10], a_price_8);
}
void drawLine(double a_price_0, string a_name_8, color a_color_16, int ai_20) {
if (ObjectFind(a_name_8) != 0) {
ObjectCreate(a_name_8, OBJ_HLINE, 0, Time[0], a_price_0, Time[0], a_price_0);
if (ai_20 == 1) ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_SOLID);
else ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(a_name_8, OBJPROP_COLOR, a_color_16);
ObjectSet(a_name_8, OBJPROP_WIDTH, 1);
return;
}
ObjectDelete(a_name_8);
ObjectCreate(a_name_8, OBJ_HLINE, 0, Time[0], a_price_0, Time[0], a_price_0);
if (ai_20 == 1) ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_SOLID);
else ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(a_name_8, OBJPROP_COLOR, a_color_16);
ObjectSet(a_name_8, OBJPROP_WIDTH, 1);
}
1000pips%20Dashboard.jpg
发表于:2015-07-05 10:12只看该作者
2楼
感谢分享
韬客社区www.talkfx.co
发表于:2015-07-07 05:22只看该作者
3楼
谢谢分享。。。。
韬客社区www.talkfx.co
发表于:2015-10-31 22:44只看该作者
4楼
听名字好牛*
韬客社区www.talkfx.co
发表于:2016-12-07 10:19只看该作者
5楼
谢楼主的分享
韬客社区www.talkfx.co
发表于:2017-06-19 01:26只看该作者
6楼
99999999999
韬客社区www.talkfx.co
发表于:2017-06-19 04:47只看该作者
7楼
666666
韬客社区www.talkfx.co
发表于:2017-08-07 07:08只看该作者
9楼
谢谢分享~~~~~~~~~~~
发表于:2017-11-25 02:57只看该作者
10楼
谢谢分享
韬客社区www.talkfx.co
发表于:2018-01-05 15:46只看该作者
11楼
谢谢分享
韬客社区www.talkfx.co
发表于:2018-01-14 04:32只看该作者
12楼
感谢分享
韬客社区www.talkfx.co
发表于:2018-02-12 10:32只看该作者
13楼
极速版本
韬客社区www.talkfx.co