SimpleDailyRangeBreakExpert - page 11

 

I ask myself for this "3600" value added to start time. It makes this time shift thing not clear to me. May be Igorad could help.

string TimeTrade = "00:00";

StartTime = StrToTime(TimeTrade) + TimeShift*3600;

if(CurTime() >= StartTime && CurTime() <= StartTime+3600)

{

if ( OrderOpenDate() < StrToTime(TimeToStr( StartTime,TIME_DATE)))

{

if( ScanTrades()>0 && !BuyInTrade && !SellInTrade) PendOrdDel();

Today = StrToTime(TimeToStr( StartTime,TIME_DATE));

if (Today != PrevDay )

{ DaysInTrade = DaysInTrade+1;

//Print(" Days=",DaysInTrade,"Today=",TimeToStr(Today,TIME_DATE),"PrevDay=", TimeToStr(PrevDay,TIME_DATE)) ;

}

if( TradePeriod > 0 )CloseOrdbyTime();

}

if(ScanTrades()<1 && Today != PrevDay )

{

spread= MarketInfo(Symbol(),MODE_SPREAD)*Point;

digit = MarketInfo(Symbol(),MODE_DIGITS);

Lotsi = MoneyManagement ( MM, Lots, MMRisk, LossMax);

//if (TrailingStop > 0) InitialStop=true;

ArrayCopyRates(rates_h1, Symbol(), PERIOD_H1);

open = rates_h1[0][1];

high=0; low=10000000;

for (i=24;i>=1;i--)

{

high = MathMax( high, rates_h1[3]);

low = MathMin( low , rates_h1[2]);

}

range =(high-low);

if ( Monday == 1 ) if(DayOfWeek()==1){BuyOrdOpen(); SellOrdOpen();}

if ( Tuesday == 1 ) if(DayOfWeek()==2){BuyOrdOpen(); SellOrdOpen();}

if ( Wednesday== 1 ) if(DayOfWeek()==3){BuyOrdOpen(); SellOrdOpen();}

if ( Thursday == 1 ) if(DayOfWeek()==4){BuyOrdOpen(); SellOrdOpen();}

if ( Friday == 1 ) if(DayOfWeek()==5){BuyOrdOpen(); SellOrdOpen();}

DaysInTrade = 0;

}

}
 

This 3600 value seems to be the conversion of hours in seconds. That it means for me that i start @ 09:00 broker time (gmt+0). my problem is elsewhere.

 

Hi Flytox,

I will look at this EA now (usually i am taking the statements once per day posting something inyeresting). I will open this EA with metaEditor to see:

- may be this Ea is using some Tracert file;

- or may be some pairs mentioned inside the code as EURUSD inmstead of EURUSDm for IBFX.

Anyway, if you set time for 9 so EA should close all profitable orders at 9 and open new pending orders (at 9 as well).

I will look at this now.

 

I closed other EA's on the same account (TPE, TS,) and SBS placed finally pending orders at 9:00 (broker time). The EAs i removed were with different magic numbers. Is there any known incompatibility between SBS123 and other EA's??

 

I looked inside the code of this 1.23 and did not see any problem: this EA is not using any file from outside and no any indicatr. So, it must work wioth IBFX.

I am using this EA/setting (default setting (see this post). It is the setting for GMT+3 broker. And I have EURUSD and GBPUSD with TimeShift=9 (09 am for LiteForex server time which is GMT+3 now), USDJPY with TimeShift=10 and USDCHF with TimeShift=7. It is for GMT+3.

If IBFX is having GMT+0 so it may be the following:

EURUSD and GBPUSD with TimeShift=6 and so on.

 

Hello ND,

did you see my previous post concerning possible conflict when other EA's are on the same MT4 (same account).

 
Flytox:
I closed other EA's on the same account (TPE, TS,) and SBS placed finally pending orders at 9:00 (broker time). The EAs i removed were with different magic numbers. Is there any known incompatibility between SBS123 and other EA's??

Incompatibility? No.

It may be the case when 2 EAs want to modify the order, or to close/open the order exact in the same time in munites and seconds. But it is not usual case. Basicly It is impossible to use more than 3 EAs in one copy of Metatrader because of that (EAs may "interrupt" each other). 1 or 2 , or may be 3 EAs in one copy of Metatrader may be fine but it is also related to the timeframes: for example we may use some scalper on M5 together with EA working on D1 timeframe and so on. Because Metatrader as a program can not do 2 things simultaniously: can not modify one order and delete the other pending order exact in the same time in minutes/seconds.

As to this SBS_V1.23 so EA will try to delete pending order and open new one many times untill it will be done. SBS_V1.21 is the same: if metatrader can not delete pending order now, so Metatrader will try to do it 1 minutes later, if failure - 1 minutes later once again untill the job will be done. So I think no any Incompatibility.

Similar EAs are SBS_v1.21 and TPE EA.

Less of risky is SBS_v1.21, more risky is TPE and more risky than TPE is SBS_v1.23 (just sorting according to the riks for traders related to starting deposit size).

If you use different magic number for every EAs so no any conflict.

Of course if you are testing 5 EAs in one copy of Metatrader so it may be everything even with different magic number. 5 EAs in one Metatrader is too much.

Files:
sbs121.zip  18 kb
tpe12.zip  17 kb
 

Thanks for your answers ND.

 

Please find updated statements for 2 versions.

See this post and excel file for the statements from the beginning of the testing period https://www.mql5.com/en/forum/173383/page79

Files:
sbs121_1.zip  18 kb
sbs123.zip  50 kb
 

Please find updated statement for SBS 1.23 version.

Files:
sbs23.zip  35 kb
Reason: