Firebird EA - sayfa 58

 
 

Merhaba rbchapin,

Belki de haklısın. Ama "çılgın gün" sadece Cuma değil. Herhangi bir gün olabilir.

Set dosyasındaki ayarların içine baktım ve aşağıdaki ayarlar yazılmış:

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;

}

yön==1 uzun; Direction==11 artık uzun değil.

Yön==2 kısadır; Yön==22 artık kısa değil.

 

Ve şu koda bak

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

Bu yüzden en azından EA'nın uçacağı günü bilmemiz çok iyi: Her ayın 5'i olabilir.

 

Ama belki haklısın.

Çünkü bu kodu "çevirebiliriz"

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.
 

riskten korunma

Herkese selam,

Firebird v3.2 hakkında bir sorum var.

Nasıl çalıştığını izliyorum ve yanlış yöne giderse aldığı pozisyona karşı önlem aldığını görüyorum. Ancak hedge kârla kapandığında, diğer işlemleri masada bırakır.

Pozisyonlarından biri kapandığında tüm pozisyonları kapatması gerekmez mi?

Ya fiyat çok uzun bir süre açık pozisyona gelmezse?

rbc

 
newdigital:
Ama belki haklısın.

Çünkü bu kodu "çevirebiliriz"

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.

Merhaba yenidijital,

aslında EA ticaret yapmaya devam ettiği için biraz daha kötü ama her ikisi de daha sonra riskinizi yönetmek için kullanılan donmuş bir LastPrice ve Myorders'a sahip. Onlarla dondurulduğunda aşağıdakiler ortaya çıkacaktır. 1. Alınan emir sayısında sınır yoktur ve 2. Fiyat kullanım aralığına düşerse, orada vurmaya devam eder çünkü Lastprice son emri takip etmeyecektir.

Kontrol ettim ve Lastprice işlem gördüğü için güncellenmiyor, bu yüzden güncellenmesi için if ifadesinin altındaki döngüye girmesi gerekiyor.

Bence If (Day()) deyimi kaldırılmalı ve tüm Friday blok mantığı, zaman filtresi mantığının yerleştirildiği yere yerleştirilmelidir. (buna sahip olup olmadığından emin değilim ama V3.2'de var). Kârlı görünmüyorsa, para yönetimi her zaman işe yarayacağından riski artırabilirsiniz.

rbc

 

Merhaba rbchapin,

Çok teşekkürler.

Geçen yıl bu EA'yı test etmeyi bırakmak istedim ama birçok PM mesajı alıyorum ve birçok insan bu "çılgın günleri" seviyor gibi görünüyor. Sanırım üyeler, gerçek hesabın 1 dakikalığına 100 sipariş açmasının imkansız olduğunu anlamıyorlar...

Bu EA'yı test etmeye devam edeceğim ve dosyaların başlığını https://www.mql5.com/en/forum/176044/page2 "hata bulundu mesajı" ile güncelleyeceğim.

 

Firebird dün bir kez daha uçuyordu.

Dosyalar:
firebird065.zip  546 kb