"整数划线"指标问题
我在论坛下载了个 整数划线 的指标,很是喜欢.显示也没问题,在metaEditou里面按 编写 ,是0错误,0警告.但 智能交易 信息窗口里一直不停的提示
整数划线 EURUSD,M15: invalid time value for ObjectMove function
请版主或熟悉指标的朋友帮忙解答,如何修改这个问题.谢谢!
源码如下:
//+------------------------------------------------------------------+
//| 整数划线.mq4 |
//| Copyright ?2010, metaQuotes Software Corp. |
//| |
//+------------------------------------------------------------------+
#property indicator_chart_window
extern int LinesAboveBelow = 10;
extern color LineColorMain = LightGray;
extern color LineColorSub = Gray;
int gi_88 = 0;
int gi_92 = 0;
int init() {
return (0);
}
int deinit() {
string l_name_8;
int l_objs_total_0 = ObjectsTotal();
for (int l_objs_total_4 = l_objs_total_0; l_objs_total_4 l_objs_total_4--) {
l_name_8 = ObjectName(l_objs_total_4);
if (StringSubstr(l_name_8, 0, 11) == [SweetSpot] ) ObjectDelete(l_name_8);
}
return (0);
}
int start() {
int li_8;
int li_12;
double ld_16;
int l_color_24;
if (TimeCurrent() - gi_88 600 Period() == gi_92) return (0);
int li_4 = Bid / Point;
li_4 -= li_4 % 500;
for (int li_0 = -LinesAboveBelow; li_0 LinesAboveBelow; li_0++) {
li_12 = li_4 + 500 * li_0;
if (li_12 % 1000 == 0) {
li_8 = 0;
l_color_24 = LineColorMain;
} else {
li_8 = 2;
l_color_24 = LineColorSub;
}
ld_16 = li_12 * Point;
SetLevel(DoubleToStr(ld_16, Digits), ld_16, l_color_24, li_8, Time[10]);
}
return (0);
}
void SetLevel(string as_0, double a_price_8, color a_color_16, int a_style_20, int ai_unused_24) {
string ls_unused_40;
int li_unused_28 = Digits;
string l_name_32 = [SweetSpot] + as_0 + Line
if (ObjectFind(l_name_32) != 0) {
ObjectCreate(l_name_32, OBJ_HLINE, 0, 0, a_price_8);
ObjectSet(l_name_32, OBJPROP_STYLE, a_style_20);
ObjectSet(l_name_32, OBJPROP_COLOR, a_color_16);
return;
}
ObjectMove(l_name_32, 0, 0, a_price_8);
}
整数划线 EURUSD,M15: invalid time value for ObjectMove function
请版主或熟悉指标的朋友帮忙解答,如何修改这个问题.谢谢!
源码如下:
//+------------------------------------------------------------------+
//| 整数划线.mq4 |
//| Copyright ?2010, metaQuotes Software Corp. |
//| |
//+------------------------------------------------------------------+
#property indicator_chart_window
extern int LinesAboveBelow = 10;
extern color LineColorMain = LightGray;
extern color LineColorSub = Gray;
int gi_88 = 0;
int gi_92 = 0;
int init() {
return (0);
}
int deinit() {
string l_name_8;
int l_objs_total_0 = ObjectsTotal();
for (int l_objs_total_4 = l_objs_total_0; l_objs_total_4 l_objs_total_4--) {
l_name_8 = ObjectName(l_objs_total_4);
if (StringSubstr(l_name_8, 0, 11) == [SweetSpot] ) ObjectDelete(l_name_8);
}
return (0);
}
int start() {
int li_8;
int li_12;
double ld_16;
int l_color_24;
if (TimeCurrent() - gi_88 600 Period() == gi_92) return (0);
int li_4 = Bid / Point;
li_4 -= li_4 % 500;
for (int li_0 = -LinesAboveBelow; li_0 LinesAboveBelow; li_0++) {
li_12 = li_4 + 500 * li_0;
if (li_12 % 1000 == 0) {
li_8 = 0;
l_color_24 = LineColorMain;
} else {
li_8 = 2;
l_color_24 = LineColorSub;
}
ld_16 = li_12 * Point;
SetLevel(DoubleToStr(ld_16, Digits), ld_16, l_color_24, li_8, Time[10]);
}
return (0);
}
void SetLevel(string as_0, double a_price_8, color a_color_16, int a_style_20, int ai_unused_24) {
string ls_unused_40;
int li_unused_28 = Digits;
string l_name_32 = [SweetSpot] + as_0 + Line
if (ObjectFind(l_name_32) != 0) {
ObjectCreate(l_name_32, OBJ_HLINE, 0, 0, a_price_8);
ObjectSet(l_name_32, OBJPROP_STYLE, a_style_20);
ObjectSet(l_name_32, OBJPROP_COLOR, a_color_16);
return;
}
ObjectMove(l_name_32, 0, 0, a_price_8);
}
打赏
最新创建圈子
- 新闻EA运行效果图圈 2020-01-02
圈主:admin 帖子:1