通用MA交叉EA - 页 90

 

额外的过滤器

你好,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。

如果这些头寸在正常的止损上被平仓,那么结果将是非常好的。

附加的文件:
chart.gif  40 kb
 
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;//原为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

 

编辑:我也是。

忘了发帖,有东西要发,但没发到这个地方,对不起。

谢谢。

 

现在正在测试,并将报告结果,我的朋友