编码帮助 - 页 139 1...132133134135136137138139140141142143144145146...786 新评论 Aki Miu 2013.09.09 05:50 #1381 有什么办法可以正确发布代码吗?空格键不起作用,我不知道为什么。 Mladen Rakic 2013.09.09 05:58 #1382 RyuShin: 有什么办法可以正确地发布代码吗?空格键不起作用,我不知道为什么。 你可以像图片上显示的那样做(简单地将代码粘贴到php框中)。 或者你可以用普通的附件来附上代码 附加的文件: code_example.gif 32 kb Aki Miu 2013.09.09 06:09 #1383 mladen: 你可以按照图片上的方法(简单地将代码粘贴在php框中),或者你可以用普通的附件将代码附在上面。 问题是我没有看到这个盒子。我不知道为什么。我使用了Firefox和internet explorer,但它们都没有显示这个盒子 :/ 总之,我将使用另一台电脑再试一次。 Aki Miu 2013.09.09 06:19 #1384 好了,这里是指标的代码。 每周 #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectDelete("WS1"); ObjectDelete("WS2"); ObjectDelete("WS3"); ObjectDelete("WR1"); ObjectDelete("WR2"); ObjectDelete("WR3"); ObjectDelete("WEEKLY PIVOT"); ObjectDelete("Weekly Support 1"); ObjectDelete("Weekly 2"); ObjectDelete("Weekly 3"); ObjectDelete("Weekly Pivot level"); ObjectDelete("Weekly Resistance 1"); ObjectDelete("Weekly Resistance 2"); ObjectDelete("Weekly Resistance 3"); Comment(" "); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- double rates[1][6],weekly_close,weekly_high,weekly_low; ArrayCopyRates(rates, Symbol(), PERIOD_W1); if(DayOfWeek() == 1) { if(TimeDayOfWeek(iTime(Symbol(),PERIOD_W1,1)) == 5) { weekly_close = rates[1][4]; weekly_high = rates[1][3]; weekly_low = rates[1][2]; } else { for(int d = 5;d>=0;d--) { if(TimeDayOfWeek(iTime(Symbol(),PERIOD_W1,d)) == 5) { weekly_close = rates[d][4]; weekly_high = rates[d][3]; weekly_low = rates[d][2]; } } } } else { weekly_close = rates[1][4]; weekly_high = rates[1][3]; weekly_low = rates[1][2]; } //---- Calculate Pivots Comment("\nWeekly quotations:\nH ",weekly_high,"\nL ",weekly_low, "\nC ",weekly_close); double R = weekly_high - weekly_low;//range double wp = (weekly_high + weekly_low + weekly_close)/3;// Standard Pivot double wr3 = wp + (R * 1.000); double wr2 = wp + (R * 0.618); double wr1 = wp + (R * 0.382); double ws1 = wp - (R * 0.382); double ws2 = wp - (R * 0.618); double ws3 = wp - (R * 1.000); drawLine(wr3,"WR3", LimeGreen,0); drawLabel(" WR 3",wr3,LimeGreen); drawLine(wr2,"WR2", LimeGreen,0); drawLabel(" WR 2",wr2,LimeGreen); drawLine(wr1,"WR1", LimeGreen,0); drawLabel(" WR 1",wr1,LimeGreen); drawLine(wp,"WEEKLY PIVOT",Black,1); drawLabel(" WP",wp,Black); drawLine(ws1,"WS1",Crimson,0); drawLabel(" WS 1",ws1,Crimson); drawLine(ws2,"WS2",Crimson,0); drawLabel(" WS 2",ws2,Crimson); drawLine(ws3,"WS3",Crimson,0); drawLabel(" WS 3",ws3,Crimson); //---- return(0); } //+------------------------------------------------------------------+ void drawLabel(string name,double lvl,color Color) { if(ObjectFind(name) != 0) { ObjectCreate(name, OBJ_TEXT, 0, Time[10], lvl); ObjectSetText(name, name, 8, "Arial", EMPTY); ObjectSet(name, OBJPROP_COLOR, Color); } else { ObjectMove(name, 0, Time[10], lvl); } } void drawLine(double lvl,string name, color Col,int type) { if(ObjectFind(name) != 0) { ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl); if(type == 1) ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID); else ObjectSet(name, OBJPROP_STYLE, STYLE_DOT); ObjectSet(name, OBJPROP_COLOR, Col); ObjectSet(name,OBJPROP_WIDTH,1); } else { ObjectDelete(name); ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl); if(type == 1) ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID); else ObjectSet(name, OBJPROP_STYLE, STYLE_DOT); ObjectSet(name, OBJPROP_COLOR, Col); ObjectSet(name,OBJPROP_WIDTH,1); } }[/PHP] Monthly [PHP]//+------------------------------------------------------------------+ #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectDelete("MS1"); ObjectDelete("MS2"); ObjectDelete("MS3"); ObjectDelete("MR1"); ObjectDelete("MR2"); ObjectDelete("MR3"); ObjectDelete("MONTHLY PIVOT"); ObjectDelete("Monthly Support 1"); ObjectDelete("Monthly 2"); ObjectDelete("Monthly 3"); ObjectDelete("Monthly Pivot level"); ObjectDelete("Monthly Resistance 1"); ObjectDelete("Monthly Resistance 2"); ObjectDelete("Monthly Resistance 3"); Comment(" "); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- double rates[1][6],monthly_close,monthly_high,monthly_low; ArrayCopyRates(rates, Symbol(), PERIOD_MN1); if(DayOfWeek() == 1) { if(TimeDayOfWeek(iTime(Symbol(),PERIOD_MN1,1)) == 5) { monthly_close = rates[1][4]; monthly_high = rates[1][3]; monthly_low = rates[1][2]; } else { for(int d = 5;d>=0;d--) { if(TimeDayOfWeek(iTime(Symbol(),PERIOD_MN1,d)) == 5) { monthly_close = rates[d][4]; monthly_high = rates[d][3]; monthly_low = rates[d][2]; } } } } else { monthly_close = rates[1][4]; monthly_high = rates[1][3]; monthly_low = rates[1][2]; } //---- Calculate Pivots Comment("\nMonthly quotations:\nH ",monthly_high,"\nL ",monthly_low, "\nC ",monthly_close); double R = monthly_high - monthly_low;//range double mp = (monthly_high + monthly_low + monthly_close)/3;// Standard Pivot double mr3 = mp + (R * 1.000); double mr2 = mp + (R * 0.618); double mr1 = mp + (R * 0.382); double ms1 = mp - (R * 0.382); double ms2 = mp - (R * 0.618); double ms3 = mp - (R * 1.000); drawLine(mr3,"MR3", Lime,0); drawLabel(" MR 3",mr3,Lime); drawLine(mr2,"MR2", Lime,0); drawLabel(" MR 2",mr2,Lime); drawLine(mr1,"MR1", Lime,0); drawLabel(" MR 1",mr1,Lime); drawLine(mp,"MONTHLY PIVOT",Black,1); drawLabel(" MP",mp,Black); drawLine(ms1,"MS1",Red,0); drawLabel(" MS 1",ms1,Red); drawLine(ms2,"MS2",Red,0); drawLabel(" MS 2",ms2,Red); drawLine(ms3,"MS3",Red,0); drawLabel(" MS 3",ms3,Red); //---- return(0); } //+------------------------------------------------------------------+ void drawLabel(string name,double lvl,color Color) { if(ObjectFind(name) != 0) { ObjectCreate(name, OBJ_TEXT, 0, Time[10], lvl); ObjectSetText(name, name, 8, "Arial", EMPTY); ObjectSet(name, OBJPROP_COLOR, Color); } else { ObjectMove(name, 0, Time[10], lvl); } } void drawLine(double lvl,string name, color Col,int type) { if(ObjectFind(name) != 0) { ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl); if(type == 1) ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID); else ObjectSet(name, OBJPROP_STYLE, STYLE_DOT); ObjectSet(name, OBJPROP_COLOR, Col); ObjectSet(name,OBJPROP_WIDTH,1); } else { ObjectDelete(name); ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl); if(type == 1) ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID); else ObjectSet(name, OBJPROP_STYLE, STYLE_DOT); ObjectSet(name, OBJPROP_COLOR, Col); ObjectSet(name,OBJPROP_WIDTH,1); } } Coding help Harmonic Analysis 支点指标 Mladen Rakic 2013.09.09 06:20 #1385 RyuShin: 问题是我没有看到这个盒子。我不知道为什么。我使用了Firefox和Internet explorer,但它们都没有显示这个盒子 :/ 总之,我将使用另一台电脑再试一次。 龙信 你不会看到一个盒子,你会看到像这样的东西。 并会产生这样的结果。 paste your code here 附加的文件: code_2.gif 35 kb yuhu 2013.09.09 14:47 #1386 嗨,伙计们。 它非常简单,但我不知道为什么它不能按照我想要的方式工作。基本上我想检查 一个指标的两个连续值。如果它们是相同的,就在蜡烛收盘时画一个箭头。 now=iCustom(NULL,0,"Stoch",period,5,i+1); previous=iCustom(NULL,0,"Stoch",period,5,i+2); if ( (now==previous)) { CrossUp=previous; } [/CODE] The code above is not showing any arrows when it should (I checked in data window) The parameters, indicators name is all working fine because with the following code, it is showing arrows [CODE] now=iCustom(NULL,0,"Stoch",period,5,i+1); previous=iCustom(NULL,0,"Stoch",period,5,i+1); if ( (now==previous)) { CrossUp=previous; } 谁能帮帮我,为什么第一组代码是不一样的? 数据窗口中的值是一样的!... 谢谢你的帮助! Coding help Stochastic Oscillator value invalid integer number as Mladen Rakic 2013.09.09 15:00 #1387 yuhu: 嗨,伙计们。它非常简单,但我不知道为什么它不能按照我想要的方式工作。基本上我想检查一个指标的两个连续值。如果它们是相同的,就在蜡烛收盘时画一个箭头。 now=iCustom(NULL,0,"Stoch",period,5,i+1); previous=iCustom(NULL,0,"Stoch",period,5,i+2); if ( (now==previous)) { CrossUp=previous; } [/CODE] The code above is not showing any arrows when it should (I checked in data window) The parameters, indicators name is all working fine because with the following code, it is showing arrows [CODE] now=iCustom(NULL,0,"Stoch",period,5,i+1); previous=iCustom(NULL,0,"Stoch",period,5,i+1); if ( (now==previous)) { CrossUp=previous; } 谁能帮帮我,为什么第一组代码是不一样的? 数据窗口中的值是一样的!... 提前感谢您! yuhu 如果没有用IndicatorDigits()函数进行不同的定义,数据窗口中的指标数据只显示为4位数的精度。没有显示的东西是导致你没有得到相等条件的原因。使用NormalizeDouble(),那么它应该更经常发生。 使用类似这样的东西。 if ( (NormalizeDouble(now,4)==NormalizeDouble(previous,4))) 或者使用一些其他的数字来代替4,你希望这些值被四舍五入到。 metrus 2013.09.09 15:26 #1388 CSM的客观措施 你好 谁能帮我完成以下的编码。 在以下情况下提供一个警报 1 - 一种货币(例如下图中的欧元)在几个时间段内具有持续的高价值,并且 2 - 第二种货币(如图中的日元)在相同的时间段内有持续的低值。 例如,如果指定M15、M30、H1和H4(用户选择的时间段),警报将显示。 1 - 欧元的所有四个读数都是HiScore(一个变量,默认为70)或以上,并且 2 - 日元的所有四个读数均为LowScore(一个变量,默认为35)或更少。 ("hanover --- 可扩展函数.mgh "和 "hanover --- 函数头.mgh "必须放在experts/include文件夹中才能正确看到图表。 我想它还需要在windows中安装 "PLCC___"字体,但我在这里没有成功上传该字体)。 谢谢你!"。 附加的文件: csm_pin.png 34 kb csm.ex4 35 kb hanover_---_function_header.mqh 12 kb csm.mq4 13 kb hanover_---_extensible_functions.mqh 93 kb yuhu 2013.09.09 15:26 #1389 非常感谢姆拉登,你是个英雄 保重!! Aki Miu 2013.09.09 19:09 #1390 mladen,在我的metatrader过了0点之后,周线和月线中枢指标又开始工作了。我不知道为什么它们在星期一 不工作 :/ 无论如何,谢谢你的关注。 1...132133134135136137138139140141142143144145146...786 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
有什么办法可以正确发布代码吗?空格键不起作用,我不知道为什么。
有什么办法可以正确地发布代码吗?空格键不起作用,我不知道为什么。
你可以像图片上显示的那样做(简单地将代码粘贴到php框中)。
或者你可以用普通的附件来附上代码
你可以按照图片上的方法(简单地将代码粘贴在php框中)
问题是我没有看到这个盒子。我不知道为什么。我使用了Firefox和internet explorer,但它们都没有显示这个盒子 :/ 总之,我将使用另一台电脑再试一次。
好了,这里是指标的代码。
每周
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectDelete("WS1");
ObjectDelete("WS2");
ObjectDelete("WS3");
ObjectDelete("WR1");
ObjectDelete("WR2");
ObjectDelete("WR3");
ObjectDelete("WEEKLY PIVOT");
ObjectDelete("Weekly Support 1");
ObjectDelete("Weekly 2");
ObjectDelete("Weekly 3");
ObjectDelete("Weekly Pivot level");
ObjectDelete("Weekly Resistance 1");
ObjectDelete("Weekly Resistance 2");
ObjectDelete("Weekly Resistance 3");
Comment(" ");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//----
double rates[1][6],weekly_close,weekly_high,weekly_low;
ArrayCopyRates(rates, Symbol(), PERIOD_W1);
if(DayOfWeek() == 1)
{
if(TimeDayOfWeek(iTime(Symbol(),PERIOD_W1,1)) == 5)
{
weekly_close = rates[1][4];
weekly_high = rates[1][3];
weekly_low = rates[1][2];
}
else
{
for(int d = 5;d>=0;d--)
{
if(TimeDayOfWeek(iTime(Symbol(),PERIOD_W1,d)) == 5)
{
weekly_close = rates[d][4];
weekly_high = rates[d][3];
weekly_low = rates[d][2];
}
}
}
}
else
{
weekly_close = rates[1][4];
weekly_high = rates[1][3];
weekly_low = rates[1][2];
}
//---- Calculate Pivots
Comment("\nWeekly quotations:\nH ",weekly_high,"\nL ",weekly_low, "\nC ",weekly_close);
double R = weekly_high - weekly_low;//range
double wp = (weekly_high + weekly_low + weekly_close)/3;// Standard Pivot
double wr3 = wp + (R * 1.000);
double wr2 = wp + (R * 0.618);
double wr1 = wp + (R * 0.382);
double ws1 = wp - (R * 0.382);
double ws2 = wp - (R * 0.618);
double ws3 = wp - (R * 1.000);
drawLine(wr3,"WR3", LimeGreen,0);
drawLabel(" WR 3",wr3,LimeGreen);
drawLine(wr2,"WR2", LimeGreen,0);
drawLabel(" WR 2",wr2,LimeGreen);
drawLine(wr1,"WR1", LimeGreen,0);
drawLabel(" WR 1",wr1,LimeGreen);
drawLine(wp,"WEEKLY PIVOT",Black,1);
drawLabel(" WP",wp,Black);
drawLine(ws1,"WS1",Crimson,0);
drawLabel(" WS 1",ws1,Crimson);
drawLine(ws2,"WS2",Crimson,0);
drawLabel(" WS 2",ws2,Crimson);
drawLine(ws3,"WS3",Crimson,0);
drawLabel(" WS 3",ws3,Crimson);
//----
return(0);
}
//+------------------------------------------------------------------+
void drawLabel(string name,double lvl,color Color)
{
if(ObjectFind(name) != 0)
{
ObjectCreate(name, OBJ_TEXT, 0, Time[10], lvl);
ObjectSetText(name, name, 8, "Arial", EMPTY);
ObjectSet(name, OBJPROP_COLOR, Color);
}
else
{
ObjectMove(name, 0, Time[10], lvl);
}
}
void drawLine(double lvl,string name, color Col,int type)
{
if(ObjectFind(name) != 0)
{
ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl);
if(type == 1)
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
else
ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(name, OBJPROP_COLOR, Col);
ObjectSet(name,OBJPROP_WIDTH,1);
}
else
{
ObjectDelete(name);
ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl);
if(type == 1)
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
else
ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(name, OBJPROP_COLOR, Col);
ObjectSet(name,OBJPROP_WIDTH,1);
}
}[/PHP]
Monthly
[PHP]//+------------------------------------------------------------------+
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectDelete("MS1");
ObjectDelete("MS2");
ObjectDelete("MS3");
ObjectDelete("MR1");
ObjectDelete("MR2");
ObjectDelete("MR3");
ObjectDelete("MONTHLY PIVOT");
ObjectDelete("Monthly Support 1");
ObjectDelete("Monthly 2");
ObjectDelete("Monthly 3");
ObjectDelete("Monthly Pivot level");
ObjectDelete("Monthly Resistance 1");
ObjectDelete("Monthly Resistance 2");
ObjectDelete("Monthly Resistance 3");
Comment(" ");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//----
double rates[1][6],monthly_close,monthly_high,monthly_low;
ArrayCopyRates(rates, Symbol(), PERIOD_MN1);
if(DayOfWeek() == 1)
{
if(TimeDayOfWeek(iTime(Symbol(),PERIOD_MN1,1)) == 5)
{
monthly_close = rates[1][4];
monthly_high = rates[1][3];
monthly_low = rates[1][2];
}
else
{
for(int d = 5;d>=0;d--)
{
if(TimeDayOfWeek(iTime(Symbol(),PERIOD_MN1,d)) == 5)
{
monthly_close = rates[d][4];
monthly_high = rates[d][3];
monthly_low = rates[d][2];
}
}
}
}
else
{
monthly_close = rates[1][4];
monthly_high = rates[1][3];
monthly_low = rates[1][2];
}
//---- Calculate Pivots
Comment("\nMonthly quotations:\nH ",monthly_high,"\nL ",monthly_low, "\nC ",monthly_close);
double R = monthly_high - monthly_low;//range
double mp = (monthly_high + monthly_low + monthly_close)/3;// Standard Pivot
double mr3 = mp + (R * 1.000);
double mr2 = mp + (R * 0.618);
double mr1 = mp + (R * 0.382);
double ms1 = mp - (R * 0.382);
double ms2 = mp - (R * 0.618);
double ms3 = mp - (R * 1.000);
drawLine(mr3,"MR3", Lime,0);
drawLabel(" MR 3",mr3,Lime);
drawLine(mr2,"MR2", Lime,0);
drawLabel(" MR 2",mr2,Lime);
drawLine(mr1,"MR1", Lime,0);
drawLabel(" MR 1",mr1,Lime);
drawLine(mp,"MONTHLY PIVOT",Black,1);
drawLabel(" MP",mp,Black);
drawLine(ms1,"MS1",Red,0);
drawLabel(" MS 1",ms1,Red);
drawLine(ms2,"MS2",Red,0);
drawLabel(" MS 2",ms2,Red);
drawLine(ms3,"MS3",Red,0);
drawLabel(" MS 3",ms3,Red);
//----
return(0);
}
//+------------------------------------------------------------------+
void drawLabel(string name,double lvl,color Color)
{
if(ObjectFind(name) != 0)
{
ObjectCreate(name, OBJ_TEXT, 0, Time[10], lvl);
ObjectSetText(name, name, 8, "Arial", EMPTY);
ObjectSet(name, OBJPROP_COLOR, Color);
}
else
{
ObjectMove(name, 0, Time[10], lvl);
}
}
void drawLine(double lvl,string name, color Col,int type)
{
if(ObjectFind(name) != 0)
{
ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl);
if(type == 1)
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
else
ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(name, OBJPROP_COLOR, Col);
ObjectSet(name,OBJPROP_WIDTH,1);
}
else
{
ObjectDelete(name);
ObjectCreate(name, OBJ_HLINE, 0, Time[0], lvl,Time[0],lvl);
if(type == 1)
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
else
ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(name, OBJPROP_COLOR, Col);
ObjectSet(name,OBJPROP_WIDTH,1);
}
}问题是我没有看到这个盒子。我不知道为什么。我使用了Firefox和Internet explorer,但它们都没有显示这个盒子 :/ 总之,我将使用另一台电脑再试一次。
龙信
你不会看到一个盒子,你会看到像这样的东西。
并会产生这样的结果。
嗨,伙计们。
它非常简单,但我不知道为什么它不能按照我想要的方式工作。基本上我想检查 一个指标的两个连续值。如果它们是相同的,就在蜡烛收盘时画一个箭头。
now=iCustom(NULL,0,"Stoch",period,5,i+1);
previous=iCustom(NULL,0,"Stoch",period,5,i+2);
if ( (now==previous))
{
CrossUp=previous;
}
[/CODE]
The code above is not showing any arrows when it should (I checked in data window)
The parameters, indicators name is all working fine because with the following code, it is showing arrows
[CODE]
now=iCustom(NULL,0,"Stoch",period,5,i+1);
previous=iCustom(NULL,0,"Stoch",period,5,i+1);
if ( (now==previous))
{
CrossUp=previous;
}
谁能帮帮我,为什么第一组代码是不一样的?
数据窗口中的值是一样的!...
谢谢你的帮助!
嗨,伙计们。
它非常简单,但我不知道为什么它不能按照我想要的方式工作。基本上我想检查一个指标的两个连续值。如果它们是相同的,就在蜡烛收盘时画一个箭头。
now=iCustom(NULL,0,"Stoch",period,5,i+1);
previous=iCustom(NULL,0,"Stoch",period,5,i+2);
if ( (now==previous))
{
CrossUp=previous;
}
[/CODE]
The code above is not showing any arrows when it should (I checked in data window)
The parameters, indicators name is all working fine because with the following code, it is showing arrows
[CODE]
now=iCustom(NULL,0,"Stoch",period,5,i+1);
previous=iCustom(NULL,0,"Stoch",period,5,i+1);
if ( (now==previous))
{
CrossUp=previous;
}
谁能帮帮我,为什么第一组代码是不一样的?
数据窗口中的值是一样的!...
提前感谢您!yuhu
如果没有用IndicatorDigits()函数进行不同的定义,数据窗口中的指标数据只显示为4位数的精度。没有显示的东西是导致你没有得到相等条件的原因。使用NormalizeDouble(),那么它应该更经常发生。
使用类似这样的东西。
或者使用一些其他的数字来代替4,你希望这些值被四舍五入到。
CSM的客观措施
你好
谁能帮我完成以下的编码。
在以下情况下提供一个警报
1 - 一种货币(例如下图中的欧元)在几个时间段内具有持续的高价值,并且
2 - 第二种货币(如图中的日元)在相同的时间段内有持续的低值。
例如,如果指定M15、M30、H1和H4(用户选择的时间段),警报将显示。
1 - 欧元的所有四个读数都是HiScore(一个变量,默认为70)或以上,并且
2 - 日元的所有四个读数均为LowScore(一个变量,默认为35)或更少。
("hanover --- 可扩展函数.mgh "和 "hanover --- 函数头.mgh "必须放在experts/include文件夹中才能正确看到图表。 我想它还需要在windows中安装 "PLCC___"字体,但我在这里没有成功上传该字体)。
谢谢你!"。
非常感谢姆拉登,你是个英雄![](https://c.mql5.com/forextsd/smiles/smile.png)
保重!!
mladen,在我的metatrader过了0点之后,周线和月线中枢指标又开始工作了。我不知道为什么它们在星期一 不工作 :/ 无论如何,谢谢你的关注。