编码帮助 - 页 555 1...548549550551552553554555556557558559560561562...786 新评论 Mladen Rakic 2015.10.14 16:03 #5541 mntiwana: 最亲爱的MLADEN。谢谢老板,那么在这种情况下,代码可能是这样的? 请纠正我。 问候 =================================================================== 原始的 "简单MA交叉EA "代码 // #define _doNothing 0 #define _doBuy 1 #define _doSell 2 int start() { int doWhat = _doNothing; double diffc = iMA(NULL,0,Ma1Period,0,Ma1Method,Ma1Price,BarToUse) -iMA(NULL,0,Ma2Period,0,Ma2Method,Ma2Price,BarToUse) 。 double diffp = iMA(NULL,0,Ma1Period,0,Ma1Method,Ma1Price,BarToUse+1)-iMA(NULL,0,Ma2Period,0,Ma2Method,Ma2Price,BarToUse+1) 。 如果((diffc*diffp)<0) 如果(diffc>0) doWhat = _doBuy; 否则 doWhat = _doSell; 如果(doWhat==_doNothing)返回(0)。 // ================================================ 这样改一下 #define _doNothing 0 #define _doBuy 1 #define _doSell 2 int start() { int doWhat = _doNothing; double diffc = iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse) -iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse)。 double diffp = iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse==2) -iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse==2) 。 如果 ((diffc*diffp)<0) 如果(diffc>0) doWhat = _doBuy; 否则 doWhat = _doSell; 如果(doWhat==_doNothing)返回(0)。 // ===================================== mntiwana 替换这个: double diffp = iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse==2) -iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse==2);[/PHP] with this : [PHP]double diffp = iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse+1) -iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse+1); tfi_markets 2015.10.14 16:05 #5542 ADX过滤器的帮助 嗨,专业编码人员。 我想实现一个ADX过滤器,它将过滤横盘震荡的市场状况。 如果ADX低于25,就不应该开仓交易,我已经编码了这个简单的过滤器。 extern int ADXPeriod=14; double CurrentADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,0); double PreviousADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,1); bool ADXfilter=false; if(CurrentADX>25&&PreviousADX<25) { ADXfilter=true; } if(ADXfilter=true) { BUY(); . . SELL(); } [/CODE] For some reason the filer is not working. I have put the ADX filter before placing the buy / sell order. Also putting it to the entry conditions signal is not working. [CODE] if(ADXfilter=true && MAFIB=="true" && BUY=="true") 谁能告诉我?谢谢你的建议。 Coding help PipsChart iADX scripting question Mladen Rakic 2015.10.14 16:10 #5543 tfi_markets: 嗨,专业编码人员。我想实现一个ADX过滤器,它将过滤横盘震荡的市场状况。 如果ADX指数低于25,它就不应该打开交易,我已经编码了这个简单的过滤器。 extern int ADXPeriod=14; double CurrentADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,0); double PreviousADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,1); bool ADXfilter=false; if(CurrentADX>25&&PreviousADX<25) { ADXfilter=true; } if(ADXfilter=true) { BUY(); . . SELL(); } [/CODE] For some reason the filer is not working. I have put the ADX filter before placing the buy / sell order. Also putting it to the entry conditions signal is not working. [CODE] if(ADXfilter=true && MAFIB=="true" && BUY=="true") 谁能提供建议?谢谢你的建议! tfi_markets 你的条件只有在adx在当前条形上越过25水平时才会起作用。 请用这个简单的方法代替。 if(CurrentADX>25) ADXfilter=true; mntiwana 2015.10.14 16:46 #5544 mladen: mntiwana替换掉这个: double diffp = iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse==2) -iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse==2);[/PHP] with this : [PHP]double diffp = iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse+1) -iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse+1); 亲爱的MLADEN, 再次感谢您的帮助,这部分已经完成,请您告诉我在图片中指出的EXTERN(MA1,MA2方法)中添加/替换什么。 问候 附加的文件: 10.png 128 kb Mladen Rakic 2015.10.14 16:48 #5545 mntiwana: 亲爱的MLADEN,再次感谢您,在您的帮助下,这部分已经完成了,请您告诉我在图片中指出的EXTERN(MA1,MA2方法)中应该添加/替换什么。 问候 mntiwana 你可以从那里删除MA方法。它们完全不需要了。 mntiwana 2015.10.14 17:00 #5546 mladen: mntiwana 你可以从那里删除ma方法。它们完全不需要了。 亲爱的MLADEN, 非常感谢BOSS,今天的课程和改进是远远不够的。 问候 nevar 2015.10.14 22:20 #5547 亲爱的各位。 我正在寻找mql4中的sigmoid函数。这是我目前找到的东西。 //--------------------------- sigmoid() --------------------------------- // 1/(1+exp(-x)) double sigmoid(double x) { 如果(x>50)返回(1)。 如果(x<-50)返回(0)。 返回(1.0/(1.0+MathExp(-x)))。 }//sigmoid() https://www.mql5.com/en/code/9002 和这个辩论神经网络 - 快速sigmoid算法 - Stack Overflow 谁能帮帮我?谢谢。 Mladen Rakic 2015.10.15 04:19 #5548 nevar: 亲爱的各位。我正在寻找mql4中的sigmoid函数。这是我目前找到的东西。 //--------------------------- sigmoid() --------------------------------- // 1/(1+exp(-x)) double sigmoid(double x) { 如果(x>50)返回(1)。 如果(x<-50)返回(0)。 返回(1.0/(1.0+MathExp(-x)))。 }//sigmoid() https://www.mql5.com/en/code/9002 和这个辩论神经网络 - 快速sigmoid算法 - Stack Overflow 有谁能帮忙吗? nevar 这里用了一个:https://www.mql5.com/en/forum/179686/page13 aras2580 2015.10.15 08:33 #5549 hi mladen ....wowww它比我的指标.....,你是最好的。非常感谢你的帮助.....,许多人非常感谢你.....,真诚地... [删除] 2015.10.16 04:02 #5550 HI mladen, 你们找到我代码中的错误了吗? 谢谢 1...548549550551552553554555556557558559560561562...786 新评论 原因: 取消 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
最亲爱的MLADEN。
谢谢老板,那么在这种情况下,代码可能是这样的? 请纠正我。
问候
===================================================================
原始的 "简单MA交叉EA "代码
//
#define _doNothing 0
#define _doBuy 1
#define _doSell 2
int start()
{
int doWhat = _doNothing;
double diffc = iMA(NULL,0,Ma1Period,0,Ma1Method,Ma1Price,BarToUse) -iMA(NULL,0,Ma2Period,0,Ma2Method,Ma2Price,BarToUse) 。
double diffp = iMA(NULL,0,Ma1Period,0,Ma1Method,Ma1Price,BarToUse+1)-iMA(NULL,0,Ma2Period,0,Ma2Method,Ma2Price,BarToUse+1) 。
如果((diffc*diffp)<0)
如果(diffc>0)
doWhat = _doBuy;
否则 doWhat = _doSell;
如果(doWhat==_doNothing)返回(0)。
//
================================================
这样改一下
#define _doNothing 0
#define _doBuy 1
#define _doSell 2
int start()
{
int doWhat = _doNothing;
double diffc = iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse)
-iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse)。
double diffp = iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse==2)
-iCustom(NULL,0, "Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse==2) 。
如果 ((diffc*diffp)<0)
如果(diffc>0)
doWhat = _doBuy;
否则 doWhat = _doSell;
如果(doWhat==_doNothing)返回(0)。
//
=====================================mntiwana
替换这个:
-iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse==2);[/PHP]
with this :
[PHP]double diffp = iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse+1)
-iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse+1);ADX过滤器的帮助
嗨,专业编码人员。
我想实现一个ADX过滤器,它将过滤横盘震荡的市场状况。
如果ADX低于25,就不应该开仓交易,我已经编码了这个简单的过滤器。
extern int ADXPeriod=14;
double CurrentADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,0);
double PreviousADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,1);
bool ADXfilter=false;
if(CurrentADX>25&&PreviousADX<25)
{
ADXfilter=true;
}
if(ADXfilter=true)
{
BUY();
.
.
SELL();
}
[/CODE]
For some reason the filer is not working. I have put the ADX filter before placing the buy / sell order.
Also putting it to the entry conditions signal is not working.
[CODE]
if(ADXfilter=true && MAFIB=="true" && BUY=="true")
谁能告诉我?谢谢你的建议。
嗨,专业编码人员。
我想实现一个ADX过滤器,它将过滤横盘震荡的市场状况。
如果ADX指数低于25,它就不应该打开交易,我已经编码了这个简单的过滤器。
extern int ADXPeriod=14;
double CurrentADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,0);
double PreviousADX = iADX(Symbol(),0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,1);
bool ADXfilter=false;
if(CurrentADX>25&&PreviousADX<25)
{
ADXfilter=true;
}
if(ADXfilter=true)
{
BUY();
.
.
SELL();
}
[/CODE]
For some reason the filer is not working. I have put the ADX filter before placing the buy / sell order.
Also putting it to the entry conditions signal is not working.
[CODE]
if(ADXfilter=true && MAFIB=="true" && BUY=="true")
tfi_markets
你的条件只有在adx在当前条形上越过25水平时才会起作用。
请用这个简单的方法代替。
if(CurrentADX>25) ADXfilter=true;
mntiwana
替换掉这个:
-iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse==2);[/PHP]
with this :
[PHP]double diffp = iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,2,0 ,0,BarToUse+1)
-iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma2Period,Ma2Price,2,0 ,0,BarToUse+1);亲爱的MLADEN,
再次感谢您的帮助,这部分已经完成,请您告诉我在图片中指出的EXTERN(MA1,MA2方法)中添加/替换什么。
问候
亲爱的MLADEN,
再次感谢您,在您的帮助下,这部分已经完成了,请您告诉我在图片中指出的EXTERN(MA1,MA2方法)中应该添加/替换什么。
问候mntiwana
你可以从那里删除MA方法。它们完全不需要了。
mntiwana 你可以从那里删除ma方法。它们完全不需要了。
亲爱的MLADEN,
非常感谢BOSS,今天的课程和改进是远远不够的。
问候
亲爱的各位。
我正在寻找mql4中的sigmoid函数。这是我目前找到的东西。
//--------------------------- sigmoid() ---------------------------------
// 1/(1+exp(-x))
double sigmoid(double x)
{
如果(x>50)返回(1)。
如果(x<-50)返回(0)。
返回(1.0/(1.0+MathExp(-x)))。
}//sigmoid()
https://www.mql5.com/en/code/9002 和这个辩论神经网络 - 快速sigmoid算法 - Stack Overflow
谁能帮帮我?谢谢。
亲爱的各位。
我正在寻找mql4中的sigmoid函数。这是我目前找到的东西。
//--------------------------- sigmoid() ---------------------------------
// 1/(1+exp(-x))
double sigmoid(double x)
{
如果(x>50)返回(1)。
如果(x<-50)返回(0)。
返回(1.0/(1.0+MathExp(-x)))。
}//sigmoid()
https://www.mql5.com/en/code/9002 和这个辩论神经网络 - 快速sigmoid算法 - Stack Overflow
有谁能帮忙吗?nevar
这里用了一个:https://www.mql5.com/en/forum/179686/page13
hi mladen ....wowww它比我的指标.....,你是最好的。非常感谢你的帮助.....,许多人非常感谢你.....,真诚地...
HI mladen,
你们找到我代码中的错误了吗?
谢谢