火鸟EA - 页 58

 
 

你好,Rbchapin。

也许你是对的。但 "疯狂的一天 "不仅仅是星期五。它可能是其他任何一天。

我查看了设置文件中的设置,其中写有以下设置。

extern int MAtype=0;//0=close, 1=HL

extern int TradeOnFriday =0; // >0 trades on friday[/CODE]

But inside the code I found the following:

if(MAtype==0)

{

double myMA =iMA(NULL,MA_timeframe,MA_length,0,MODE_SMA,PRICE_OPEN,0);[/CODE]

So, according to my limited programming knowledge, if MAtype=0 so EA is using MA indicator on open price for current open bar.

And some other codes:

[CODE]KeepStopLoss=OrderStopLoss();

And more:

[CODE]if(KeepStopLoss!=0)

{

spread=MathAbs(KeepAverage-KeepStopLoss)/2;

dummy=(Bid+Ask)/2;

if (KeepStopLoss(dummy-spread))

{

// a stoploss was hit

if(Direction==1) Direction=11;// no more longs

if(Direction==2) Direction=22;// no more shorts

}

KeepStopLoss=0;

}

方向==1是长线;方向==11不再是长线。

方向==2是短;方向==22不再是短。

 

再看看这段代码

if((myMA*(1+Percent/100))<Bid && Direction!=22 && (Bid>=(LastPrice+(CurrentPipStep*Point)) || myTotal==0) )[/CODE]

So, it is not surprise when EA is openning too many orders sometimes. It is open price and when market is moving very quickly so we may have condition for open the order 100 times on open bar.

May be it should be && instead of or (||) here?

[CODE]....|| myTotal==0) )
 

因此,非常好的是,至少我们知道EA将在哪一天飞行:可能是每个月的5号。

 

但也许你是对的。

因为我们可以 "翻译 "这个代码

if (Day()!=5 || TradeOnFriday >0)[/CODE]

as the following:

"if it is not 5th of the month, or if we are trading on Friday."

And int Day( ) is the following:

Returns the current day of the month, i.e., the day of month of the last known server time.

So, EA will trade is it is not 5th of the month (5th of October for example) or TradeOnFriday>0 (we are having TradeOnFriday=0).

I think it should be DayOfWeek( ) instead of Day( ):

[CODE]int DayOfWeek( )

Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time.
 

套期保值

大家好。

我有一个关于Firebird v3.2的问题。

我一直在观察它是如何工作的,我看到它在走错路的情况下对它所做的头寸进行对冲。 但是,当对冲关闭并获利时,它将其他交易留在桌面上。

当它的一个头寸关闭时,不是应该关闭所有头寸吗?

如果价格在很长一段时间内没有回到未平仓的位置怎么办?

rbc

 
newdigital:
但可能你是对的。

因为我们可以 "翻译 "这个代码

if (Day()!=5 || TradeOnFriday >0)[/CODE]

as the following:

"if it is not 5th of the month, or if we are trading on Friday."

And int Day( ) is the following:

Returns the current day of the month, i.e., the day of month of the last known server time.

So, EA will trade is it is not 5th of the month (5th of October for example) or TradeOnFriday>0 (we are having TradeOnFriday=0).

I think it should be DayOfWeek( ) instead of Day( ):

[CODE]int DayOfWeek( )

Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time.

你好,newdigital。

事实上,这有点糟糕,因为EA继续交易,但它有一个冻结的LastPrice和Myorders,这两个都是后来用来管理你的风险。 在它们被冻结的情况下,将产生以下结果。 1.如果价格漂移到执行范围内,它将继续在那里出手,因为Lastprice不会跟随最后的订单

我检查过了,Lastprice在交易时没有更新,所以它必须进入if语句下的循环才能更新。

我认为应该删除If(Day())语句,整个周五块逻辑应该放在时间过滤逻辑的位置。(不确定是否有,但V3.2有)。 如果它看起来不赚钱,那么你可以提高风险,因为资金管理将一直在工作。

rbc

 

嗨,Rbchapin。

非常感谢。

我去年就想停止测试这个EA,但我收到了很多PM信息,似乎很多人都喜欢那些 "疯狂的日子"。我想这些会员不明白,真实账户不可能在1分钟内开出100笔订单......

我将继续测试这个EA,并将更新文件的主题https://www.mql5.com/en/forum/176044/page2,并附上 "发现错误的信息"。

 

火鸟昨天再次飞起来了。

附加的文件:
firebird065.zip  546 kb