如何编码? - 页 209 1...202203204205206207208209210211212213214215216...347 新评论 kessing 2009.10.11 04:39 #2081 大家好... 谁能告诉我如何开始编码指标和EA? InTrance 2009.10.11 07:04 #2082 kessing: 大家好...谁能告诉我如何开始编码指标和EA? 你好。 看这里:https://www.mql5.com/en/forum/172969/page2 Sergey Golubev 2009.10.11 07:31 #2083 kessing: 大家好...谁能告诉我如何开始编码指标和EA? 阅读这个主题(第一篇):https://www.mql5.com/en/forum/178706 和这个主题:https://www.mql5.com/en/forum/173290 luxinterior 2009.10.11 19:14 #2084 kessing: 大家好......谁能告诉我如何开始编码指标和EA? 这里和FF上都有大量的信息。你也可以在谷歌上进行搜索。 关于EA编程的简单介绍,请 看我签名中的链接。对于一个新手来说,这是一个很好的开始。 祝您好运! 拉克斯 Chee Chua 2009.10.13 12:35 #2085 sparow21 2009.10.13 15:32 #2086 指示器到EA 大家好。 我想请任何能将Waddah Attar Explosion附件做成EA的人帮忙。 期待听到大家的答复。 谢谢你。 -s- 附加的文件: waddah_attar_explosion.mq4 8 kb drhouse7 2009.10.14 11:56 #2087 ea万能的马2十字架 大家好! 我正在寻找修改这个Firedave的EA(来自这个论坛)。 该EA被称为 "通用马氏交叉EA" 我想创建的是一个在2个交叉点确认的EA(例如,几个EMA 2和4,另几个EMA 5和20)。 这是主要的代码,我应该怎么做? //----------------------- 设置变量的值if(ConfirmedOnEntry==true){ if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL, TimeFrame,0); FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,1)。 SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,1); } 否则 { FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,0); SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,0); } CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent)。 我已经尝试了所有的方法,但是我没有找到解决方案......为了这个社区的健康,请帮助我 ,我想要类似于这样的东西。 //----------------------- 设置变量的值如果(ConfirmedOnEntry==true) { if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL, TimeFrame,0); FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift,FastMAType,FastMAPrice,1)。 SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,1); FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,1); SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,1); } 否则 { FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift, FastMAType,FastMAPrice,0); SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,0); FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,0); SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,0); } CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent && FastMACurrent2, SlowMACurrent2); 附加的文件: universalmacrossea.mq4 33 kb sunshineh 2009.10.15 17:42 #2088 我的指标有什么问题?错误信息 你好。 以下是我的指标的代码。 #property indicator_separate_window #属性 indicator_buffers 2 #属性 indicator_color1 LightSeaGreen #属性 indicator_color2 蓝色 extern string Timeframe_Momentum = "PERIOD_H1"; extern int Periode_Momentum = 500; Extern int Periode_MA_Momentum = 8; double Buffer_Mom[]; double Buffer_Ma[]。 int init() { //---- 指标 SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(0,Buffer_Mom); SetIndexBuffer(1,Buffer_Ma); //---- SetIndexEmptyValue(0,0.0)。 SetIndexEmptyValue(1,0.0); SetIndexDrawBegin(0,100); SetIndexDrawBegin(1,100); //---- 返回(0)。 } int deinit() { //---- return(0); } 空白启动() { int counted_bars=IndicatorCounted(); int limit=Bars-counted_bars; 如果(counted_bars>0) limit++; //---- for(int i=0; i<limit; i++) { Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i)。 Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i); } return(0); } 下面是我在主程序中使用的代码。 double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1)。 double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2); 现在我的问题是。 我得到这个错误信息。 EURUSD,M5: 指标调用函数 的参数2是无效的整数 而且在我的图表中没有Buffer_Ma!我的代码有什么问题吗? How to code? Whats wrong with my [警告关闭!]任何新手问题,为了不给论坛添乱。专业人士,不要走过。没有你,哪里都不能去。 Beno 2009.10.15 17:43 #2089 你好 如何计算开盘价和上一交易日的最高价之间的标准差? 任何帮助都将是巨大的。 谢谢 贝诺 cockeyedcowboy 2009.10.15 21:31 #2090 PERIOD_H1是一个互斥宏,请将这一行改为 extern int TimeFrame_Momentum = PERIOD_H1; 或者将PERIOD_H1替换为60,然后尝试一下 sunshineh: 你好。以下是我的指标的代码。 #property indicator_separate_window #属性 indicator_buffers 2 #属性 indicator_color1 LightSeaGreen #属性 indicator_color2 蓝色 extern string Timeframe_Momentum = "PERIOD_H1"; extern int Periode_Momentum = 500; Extern int Periode_MA_Momentum = 8; double Buffer_Mom[]; double Buffer_Ma[]。 int init() { //---- 指标 SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(0,Buffer_Mom); SetIndexBuffer(1,Buffer_Ma); //---- SetIndexEmptyValue(0,0.0)。 SetIndexEmptyValue(1,0.0); SetIndexDrawBegin(0,100); SetIndexDrawBegin(1,100); //---- 返回(0)。 } int deinit() { //---- return(0); } 空白启动() { int counted_bars=IndicatorCounted(); int limit=Bars-counted_bars; 如果(counted_bars>0) limit++; //---- for(int i=0; i<limit; i++) { Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i)。 Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i); } return(0); } 下面是我在主程序中使用的代码。 double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1)。 double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2); 现在我的问题是。 我得到这个错误信息。EURUSD,M5: 指标调用函数的参数2是无效的整数 而且我的图表中没有Buffer_Ma!我的代码有什么问题吗? 1...202203204205206207208209210211212213214215216...347 新评论 原因: 取消 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
大家好...
谁能告诉我如何开始编码指标和EA?
大家好...谁能告诉我如何开始编码指标和EA?
你好。
看这里:https://www.mql5.com/en/forum/172969/page2
大家好...谁能告诉我如何开始编码指标和EA?
阅读这个主题(第一篇):https://www.mql5.com/en/forum/178706
和这个主题:https://www.mql5.com/en/forum/173290
大家好......谁能告诉我如何开始编码指标和EA?
这里和FF上都有大量的信息。你也可以在谷歌上进行搜索。
关于EA编程的简单介绍,请 看我签名中的链接。对于一个新手来说,这是一个很好的开始。
祝您好运!
拉克斯
指示器到EA
大家好。
我想请任何能将Waddah Attar Explosion附件做成EA的人帮忙。
期待听到大家的答复。
谢谢你。
-s-
ea万能的马2十字架
大家好!
我正在寻找修改这个Firedave的EA(来自这个论坛)。
该EA被称为 "通用马氏交叉EA"
我想创建的是一个在2个交叉点确认的EA(例如,几个EMA 2和4,另几个EMA 5和20)。
这是主要的代码,我应该怎么做?
if(ConfirmedOnEntry==true)
{
if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL, TimeFrame,0);
FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,1)。
SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,1);
}
否则
{
FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,0);
SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,0);
}
CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent)。我已经尝试了所有的方法,但是我没有找到解决方案......为了这个社区的健康,请帮助我 ,我想要类似于这样的东西。
如果(ConfirmedOnEntry==true)
{
if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL, TimeFrame,0);
FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift,FastMAType,FastMAPrice,1)。
SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,1);
FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,1);
SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,1);
}
否则
{
FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift, FastMAType,FastMAPrice,0);
SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,0);
FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,0);
SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,0);
}
CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent && FastMACurrent2, SlowMACurrent2);我的指标有什么问题?错误信息
你好。
以下是我的指标的代码。
#property indicator_separate_window
#属性 indicator_buffers 2
#属性 indicator_color1 LightSeaGreen
#属性 indicator_color2 蓝色
extern string Timeframe_Momentum = "PERIOD_H1";
extern int Periode_Momentum = 500;
Extern int Periode_MA_Momentum = 8;
double Buffer_Mom[];
double Buffer_Ma[]。
int init()
{
//---- 指标
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(0,Buffer_Mom);
SetIndexBuffer(1,Buffer_Ma);
//----
SetIndexEmptyValue(0,0.0)。
SetIndexEmptyValue(1,0.0);
SetIndexDrawBegin(0,100);
SetIndexDrawBegin(1,100);
//----
返回(0)。
}
int deinit()
{
//----
return(0);
}
空白启动()
{
int counted_bars=IndicatorCounted();
int limit=Bars-counted_bars;
如果(counted_bars>0) limit++;
//----
for(int i=0; i<limit; i++)
{
Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i)。
Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i);
}
return(0);
}
下面是我在主程序中使用的代码。
double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1)。
double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2);
现在我的问题是。
我得到这个错误信息。 EURUSD,M5: 指标调用函数 的参数2是无效的整数
而且在我的图表中没有Buffer_Ma!我的代码有什么问题吗?
你好
如何计算开盘价和上一交易日的最高价之间的标准差?
任何帮助都将是巨大的。
谢谢
贝诺
PERIOD_H1是一个互斥宏,请将这一行改为
extern int TimeFrame_Momentum = PERIOD_H1;
或者将PERIOD_H1替换为60,然后尝试一下
你好。
以下是我的指标的代码。
#property indicator_separate_window
#属性 indicator_buffers 2
#属性 indicator_color1 LightSeaGreen
#属性 indicator_color2 蓝色
extern string Timeframe_Momentum = "PERIOD_H1";
extern int Periode_Momentum = 500;
Extern int Periode_MA_Momentum = 8;
double Buffer_Mom[];
double Buffer_Ma[]。
int init()
{
//---- 指标
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(0,Buffer_Mom);
SetIndexBuffer(1,Buffer_Ma);
//----
SetIndexEmptyValue(0,0.0)。
SetIndexEmptyValue(1,0.0);
SetIndexDrawBegin(0,100);
SetIndexDrawBegin(1,100);
//----
返回(0)。
}
int deinit()
{
//----
return(0);
}
空白启动()
{
int counted_bars=IndicatorCounted();
int limit=Bars-counted_bars;
如果(counted_bars>0) limit++;
//----
for(int i=0; i<limit; i++)
{
Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i)。
Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i);
}
return(0);
}
下面是我在主程序中使用的代码。
double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1)。
double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2);
现在我的问题是。
我得到这个错误信息。EURUSD,M5: 指标调用函数的参数2是无效的整数
而且我的图表中没有Buffer_Ma!我的代码有什么问题吗?