问吧! - 页 3

 

一旦击中就禁用警报。

一个重要的问题。

如果是EA的警报,我们可以标记 "一旦击中就禁用警报"。

我们怎样才能在指标警报上做到这一点?

预先感谢。

 
hua:
有一个重要的问题。

如果是EA的警报,我们可以标记 "一旦击中就禁用警报"。

我们怎样才能在指标警报上做到这一点?

预先感谢。

华。

请参考我在这里 的回答

如果你愿意,我可以为你做一个演示,请告诉我你想把哪个指标添加到 "一旦击中就禁用警报"。

 

你好 - 一个简单的问题(我希望...)。

我怎样才能编写一个基于时间的出场命令?

我想知道一个未结头寸的持续时间,用该头寸已开的条数 表示。

实际上,我想在30个柱子后自动平仓(在我的专家顾问中)。

我怎样才能在mql4中编码?

10X !

 

BarsCountDown函数(by codersguru)

yaniv_av:
我如何编写一个基于时间的退出命令?

我想知道一个未结头寸的持续时间,用该头寸已开的条数表示。

实际上,我想在30个柱子后自动关闭一个头寸(在我的专家顾问中)。

我怎样才能在mql4中编写代码?

10X !

嗨,yanuv_av,

很抱歉延迟给你回放;我花了一整天的时间修理我那该死的车,才到达我的办公室并回答你的问题

现在你有一个EA,想在30个柱子(或任何你想要的计数)后关闭订单,对吗?

那么

把这个函数放在start() 函数的顶部。

bool BarsCountDown(int count)

{

static bool first_call = true;

static int start_bar = 0;

if(first_call)

{

start_bar=Bars;

first_call=false;

}

if(Bars == (start_bar+count))

{

Print("(TRUE) Bars= " + Bars + " : start_bars = " + start_bar);

first_call=true;

return (true);

}

else

{

Print("(FALSE) Bars= " + Bars + " : start_bars = " + start_bar);

return (false);

}

}[/PHP]

How to use this function:

bool BarsCountDown(30);

The line above returns false if the current bar hasn't exceeded the number 30 from the first call of the function (the 30 bars not yet counted)

And returns true if the current bar has exceeded the 30 bars

So, when you get true, close the position

In your start() function you may use code like this:

[PHP]start()

{

....

if(BarsCountDwon(30))

OrderClose(OrderTicket(),OrderLots(),Bid,3,Red); // close position

.....

}

我希望你已经明白了。

 

工作了吗?

codersguru:
嗨,yanuv_av。

我很抱歉延迟给你复盘;我花了一整天时间修理我那该死的车,以到达我的办公室并回答你的问题

现在你有一个EA,想在30个柱子(或任何你想要的计数)后关闭订单,对吗?

那么

把这个函数放在start() 函数的顶部。

bool BarsCountDown(int count)

{

static bool first_call = true;

static int start_bar = 0;

if(first_call)

{

start_bar=Bars;

first_call=false;

}

if(Bars == (start_bar+count))

{

Print("(TRUE) Bars= " + Bars + " : start_bars = " + start_bar);

first_call=true;

return (true);

}

else

{

Print("(FALSE) Bars= " + Bars + " : start_bars = " + start_bar);

return (false);

}

}[/PHP]

How to use this function:

bool BarsCountDown(30);

The line above returns false if the current bar hasn't exceeded the number 30 from the first call of the function (the 30 bars not yet counted)

And returns true if the current bar has exceeded the 30 bars

So, when you get true, close the position

In your start() function you may use code like this:

[PHP]start()

{

....

if(BarsCountDwon(30))

OrderClose(OrderTicket(),OrderLots(),Bid,3,Red); // close position

.....

}
我希望你已经得到了它。

yanuv_av。

这对你有用吗?

 

埃马-克罗斯

你好。

首先,我对这个网站很感兴趣,也对正在帮助我们测试和制作不同代码的编码员很感兴趣。

我希望有一个代码来打开和关闭我的头寸,具体内容如下

ema = 3

ema = 13

当ema 3向下交叉到ema 13,再加上向上移动5个点,订单就会自动打开,比如欧元/美元的ema 3和ema 13在1.1705交叉,我的订单就会在1.1710打开,这是类似bunnygirl系统的东西,但我不知道如何制作专家,请帮助我。

同样的卖出技术,但所有的技术都是相反的

谢谢

 

触发线警报

亲爱的CodersGuru,当这个指标改变颜色时,我们能不能有一个提示?

附加的文件:
 
 
 

找不到第2课

嗨,Codesguru。

你在课程部分提供的第1课和第2课的链接无法使用。 我找到了线程中的第1课(welcome.pdf),但找不到第2课....,你能不能把这个信息和线程贴出来?

谢谢。

Maratha.