通用MA交叉EA - 页 90 1...838485868788899091929394959697...127 新评论 [删除] 2013.04.14 14:52 #891 额外的过滤器 你好,mladen 我试着用附件中的 "BuySel Alert "指标来代替 "第三条移动平均线"。 当 "x "表示 "买入 "时,我只去买入。 当 "x "表示 "卖 "时,我只去卖。 但没有成功。 请帮助验证。 以下是 "Buysel Alert "指标。 #property indicator_chart_window #属性 indicator_buffers 1 #属性 indicator_color1 White #属性 indicator_width1 10 //---- 输入参数 extern int barn=300; Extern int Length=30;//原为19 double prev; double last; double alertBar; extern int SoundAlertMode = 1; extern int Soundonly = 1; extern bool targets = false; //---- 缓冲区 double ExtMapBuffer1[]; //double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //|自定义指标 初始化函数| //+------------------------------------------------------------------+ int init() { //---- 指标 SetIndexEmptyValue(0,0.0); SetIndexDrawBegin(0, barn); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,251); SetIndexBuffer(0,ExtMapBuffer1)。 IndicatorShortName("DIN")。 所以我用 "iCustom() "来代替 "iMA()"。 //|第三条移动平均线| //+------------------------------------------------------------------+ 如果(UseThirdMA==true) { ThirdMAValue = iCustom(NULL,0, "BuySel Alert",0,0)。 如果(UseCounterTrend==false) { if(BuyCondition==true && SlowMACurrent>ThirdMAValue) BuyCondition = true; else BuyCondition = false; if(SellCondition==true && SlowMACurrent<ThirdMAValue) SellCondition = true; else SellCondition = false; } 否则 { 如果((BuyCondition==true && FastMACurrent<ThirdMAValue) || (SellCondition==true && FastMACurrent>ThirdMAValue))CounterTrend = true; else CounterTrend = false; 谢谢你 附加的文件: eurjpym-m5-exness-ltd.png 70 kb buysel_alert.mq4 7 kb Universal MA Cross EA 编码帮助 如何编码? texastdi 2013.04.15 11:26 #892 嘿。 我没有看到StopAndReverse和ExitOnCross有什么不同,还是我错了? Chee Peng Pang 2013.04.17 07:08 #893 如何在原来的universalMACross EA中真正设置一个追踪利润,因为它总是击中我的利润,而不是让利润运行。 dave fransman 2013.04.18 09:55 #894 大家好。 在最后的UniversalMAcross中,谁能在X小时后增加一个close_losing_position? 我一直有一些交易没有用serten设置关闭:没有添加stoplos。 我在使用UseCounterTrend true时也有这个问题。 使用第三个MA为真。 请分享一个好的设置文件! dave fransman 2013.04.18 17:57 #895 将分享一个好的设置文件! 我发现我的问题出在CT_stop上。 是否有可能给所有的头寸提供相同的止损、止盈和追踪规则? 我有一个很好的设置文件,但我认为这些仓位不会被平仓并导致DD。 如果这些头寸在正常的止损上被平仓,那么结果将是非常好的。 附加的文件: chart.gif 40 kb testergraph_1.gif 17 kb Mladen Rakic 2013.04.18 18:07 #896 star821: 你好,mladen 我试图用附件中的 "BuySel Alert "指标来代替 "第三条移动平均线"。当 "x "表示 "买 "时,我只去买。当 "x "表示 "卖 "时,我只去卖。但没有成功。请帮助验证。以下是 "Buysel Alert "指标。#property indicator_chart_window#属性 indicator_buffers 1#属性 indicator_color1 White#属性 indicator_width1 10//---- 输入参数extern int barn=300;Extern int Length=30;//原为19double prev;double last;double alertBar;extern int SoundAlertMode = 1;extern int Soundonly = 1;extern bool targets = false;//---- 缓冲区double ExtMapBuffer1[];//double ExtMapBuffer2[];//+------------------------------------------------------------------+//| 自定义指标初始化函数|//+------------------------------------------------------------------+int init(){//---- 指标SetIndexEmptyValue(0,0.0);SetIndexDrawBegin(0, barn);SetIndexStyle(0,DRAW_ARROW);SetIndexArrow(0,251);SetIndexBuffer(0,ExtMapBuffer1)。IndicatorShortName("DIN")。所以我用 "iCustom() "来代替 "iMA()"。//|第三条移动平均线|//+------------------------------------------------------------------+如果(UseThirdMA==true){ThirdMAValue = iCustom(NULL,0, "BuySel Alert",0,0)。如果(UseCounterTrend==false){if(BuyCondition==true && SlowMACurrent>ThirdMAValue) BuyCondition = true; else BuyCondition = false;if(SellCondition==true && SlowMACurrent<ThirdMAValue) SellCondition = true; else SellCondition = false;}否则{如果((BuyCondition==true && FastMACurrent<ThirdMAValue) ||(SellCondition==true && FastMACurrent>ThirdMAValue))CounterTrend = true; else CounterTrend = false; 谢谢你 星星821 现在才看到你的帖子:你不能将BuySell警报指标与普通的移动平均线 进行比较,因为大多数时候BuySell警报的缓冲区内的值为0,即使它的值不同于0,它也不能以正常的方式与平均线进行比较。某种程度上说,它们不属于同一个指标系列,这就是为什么你不能比较它们的原因。 [删除] 2013.04.20 04:12 #897 注意到了,谢谢你mladen。 cookiechan 2013.04.26 14:40 #898 嗨;mladen 谢谢你的帮助和改进的EA。 paulc cookiechan 2013.04.26 21:24 #899 编辑:我也是。 忘了发帖,有东西要发,但没发到这个地方,对不起。 谢谢。 Sir 2013.04.27 08:24 #900 现在正在测试,并将报告结果,我的朋友 1...838485868788899091929394959697...127 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
额外的过滤器
你好,mladen
我试着用附件中的 "BuySel Alert "指标来代替 "第三条移动平均线"。
当 "x "表示 "买入 "时,我只去买入。
当 "x "表示 "卖 "时,我只去卖。
但没有成功。
请帮助验证
。以下是 "Buysel Alert "指标。
#property indicator_chart_window
#属性 indicator_buffers 1
#属性 indicator_color1 White
#属性 indicator_width1 10
//---- 输入参数
extern int barn=300;
Extern int Length=30;//原为19
double prev;
double last;
double alertBar;
extern int SoundAlertMode = 1;
extern int Soundonly = 1;
extern bool targets = false;
//---- 缓冲区
double ExtMapBuffer1[];
//double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//|自定义指标 初始化函数|
//+------------------------------------------------------------------+
int init()
{
//---- 指标
SetIndexEmptyValue(0,0.0);
SetIndexDrawBegin(0, barn);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,251);
SetIndexBuffer(0,ExtMapBuffer1)。
IndicatorShortName("DIN")。
所以我用 "iCustom() "来代替 "iMA()"。
//|第三条移动平均线|
//+------------------------------------------------------------------+
如果(UseThirdMA==true)
{
ThirdMAValue = iCustom(NULL,0, "BuySel Alert",0,0)。
如果(UseCounterTrend==false)
{
if(BuyCondition==true && SlowMACurrent>ThirdMAValue) BuyCondition = true; else BuyCondition = false;
if(SellCondition==true && SlowMACurrent<ThirdMAValue) SellCondition = true; else SellCondition = false;
}
否则
{
如果((BuyCondition==true && FastMACurrent<ThirdMAValue) ||
(SellCondition==true && FastMACurrent>ThirdMAValue))CounterTrend = true; else CounterTrend = false;
谢谢你
嘿。
我没有看到StopAndReverse和ExitOnCross有什么不同,还是我错了?
如何在原来的universalMACross EA中真正设置一个追踪利润,因为它总是击中我的利润,而不是让利润运行。
大家好。
在最后的UniversalMAcross中,谁能在X小时后增加一个close_losing_position?
我一直有一些交易没有用serten设置关闭:没有添加stoplos。
我在使用UseCounterTrend true时也有这个问题。
使用第三个MA为真。
请分享一个好的设置文件!
将分享一个好的设置文件!
我发现我的问题出在CT_stop上。
是否有可能给所有的头寸提供相同的止损、止盈和追踪规则?
我有一个很好的设置文件,但我认为这些仓位不会被平仓并导致DD。
如果这些头寸在正常的止损上被平仓,那么结果将是非常好的。
你好,mladen
我试图用附件中的 "BuySel Alert "指标来代替 "第三条移动平均线"。
当 "x "表示 "买 "时,我只去买。
当 "x "表示 "卖 "时,我只去卖。
但没有成功。
请帮助验证
。以下是 "Buysel Alert "指标。
#property indicator_chart_window
#属性 indicator_buffers 1
#属性 indicator_color1 White
#属性 indicator_width1 10
//---- 输入参数
extern int barn=300;
Extern int Length=30;//原为19
double prev;
double last;
double alertBar;
extern int SoundAlertMode = 1;
extern int Soundonly = 1;
extern bool targets = false;
//---- 缓冲区
double ExtMapBuffer1[];
//double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| 自定义指标初始化函数|
//+------------------------------------------------------------------+
int init()
{
//---- 指标
SetIndexEmptyValue(0,0.0);
SetIndexDrawBegin(0, barn);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,251);
SetIndexBuffer(0,ExtMapBuffer1)。
IndicatorShortName("DIN")。
所以我用 "iCustom() "来代替 "iMA()"。
//|第三条移动平均线|
//+------------------------------------------------------------------+
如果(UseThirdMA==true)
{
ThirdMAValue = iCustom(NULL,0, "BuySel Alert",0,0)。
如果(UseCounterTrend==false)
{
if(BuyCondition==true && SlowMACurrent>ThirdMAValue) BuyCondition = true; else BuyCondition = false;
if(SellCondition==true && SlowMACurrent<ThirdMAValue) SellCondition = true; else SellCondition = false;
}
否则
{
如果((BuyCondition==true && FastMACurrent<ThirdMAValue) ||
(SellCondition==true && FastMACurrent>ThirdMAValue))CounterTrend = true; else CounterTrend = false;
谢谢你星星821
现在才看到你的帖子:你不能将BuySell警报指标与普通的移动平均线 进行比较,因为大多数时候BuySell警报的缓冲区内的值为0,即使它的值不同于0,它也不能以正常的方式与平均线进行比较。某种程度上说,它们不属于同一个指标系列,这就是为什么你不能比较它们的原因。
注意到了,谢谢你mladen。
嗨;mladen 谢谢你的帮助和改进的EA。
paulc
编辑:我也是。
忘了发帖,有东西要发,但没发到这个地方,对不起。
谢谢。
现在正在测试,并将报告结果,我的朋友