Firebird EA - página 58

 
 

Olá rbchapin,

Talvez você esteja certo. Mas "dia louco" não é apenas sexta-feira. Pode ser em qualquer outro dia.

Eu olhei dentro das configurações no arquivo set e está escrito as seguintes configurações:

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;

}

Direction===1 é longo; Direction===11 não é mais longo.

Direction===2 é curto; Direction===22 não é mais curto.

 

E olhe para este código

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) )
 

Assim, é muito bom que pelo menos saibamos o dia em que a EA vai voar: pode ser o 5º de cada mês.

 

Mas talvez você esteja certo.

Porque nós podemos "traduzir" este código

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.
 

Hedging

Olá a todos,

Tenho uma pergunta sobre o Firebird v3.2.

Tenho observado como ele funciona e vejo que ele se sebe contra uma posição que tomou se ele seguir o caminho errado. Mas quando a sebe fecha com lucro, ela deixa os outros negócios em cima da mesa.

Ela não deveria fechar todas as posições quando uma de suas posições se fecha?

E se o preço não voltar à posição aberta por um longo período de tempo?

rbc

 
newdigital:
Mas talvez você esteja certo.

Porque nós podemos "traduzir" este código

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.

Olá newdigital,

Na verdade, é um pouco pior desde que a EA continua a negociar, mas tem um LastPrice e Myorders congelados, ambos usados mais tarde para gerenciar seu risco. Com eles congelados, o resultado será o seguinte. 1. Sem limite no número de ordens tomadas e 2. se o preço for desviado para a faixa de greve, ele continuará a atacar porque a Lastprice não estará seguindo a última ordem.

Eu verifiquei e a Lastprice não está atualizada, já que ela negocia, portanto deve entrar no laço sob a declaração de se a ser atualizada.

Acho que a declaração If (Day()) deve ser removida e toda a lógica do bloco de sexta-feira deve ser colocada onde a lógica do filtro de tempo foi colocada. (não tenho certeza se ela a tem, mas a V3.2 a tem). Se não parecer lucrativo, então você poderia aumentar o risco, uma vez que a administração do dinheiro estaria sempre funcionando.

rbc

 

Olá rbchapin,

Muito obrigado.

Eu já queria parar de testar esta EA no ano passado, mas já estou recebendo muitas mensagens PM e parece que muitas pessoas gostam desses "dias loucos". Acho que os membros não entendem que é impossível para uma conta real abrir 100 pedidos apenas por 1 minuto ...

Continuarei testando esta EA e atualizarei o tópico dos arquivos https://www.mql5.com/en/forum/176044/page2 com "bug found message".

 

O Firebird estava voando mais uma vez ontem.

Arquivos anexados:
firebird065.zip  546 kb
 
Razão: