two ea two chart

 
i use two ea with different two 5m chart. both of them eur/usd. but second isn't work. i use diffent magic number. please help me :/ can i use different ea's in the same metatrader ?
 
yilmazkahya:
i use two ea with different two 5m chart. both of them eur/usd. but second isn't work. i use diffent magic number. please help me :/ can i use different ea's in the same metatrader ?
Yes you can . . .
 

first ea is ok. second ea is working on back tests but it isn't work in real. what is wrong ? how can i fix this problem ?

 
yilmazkahya:

first ea is ok. second ea is working on back tests but it isn't work in real. what is wrong ? how can i fix this problem ?

How on earth do you expect anyone to give an answer . . . you haven't shown any code. Did you write the EA? does it handle 4 and 5 digits properly ? does it handle ECN vs non ECN correctly ?
 

it's codes. i use this ea at nights. it's no problem ecn because i use ordermodify for add tp or sl. i want use my first ea on day. and use this at nights. but second isn't work. it works in backtests.

 
yilmazkahya:

it's codes. i use this ea at nights. it's no problem ecn because i use ordermodify for add tp or sl. i want use my first ea on day. and use this at nights. but second isn't work. it works in backtests.


OK, you need to add error checking to your code . . . you have none, it's a very bad idea, you should read and implement this: What are Function return values ? How do I use them ?

Does Hour() work correctly for you ? other people have had problems with it . .

if (SirtlanType==1 && sirtlanalis<1 && sirtlansatis<1 && (SpreadSiniri/10000)>=spred && (  Hour() <3 || Hour()  >22))
{
OrderSend(Symbol(),OP_BUY ,Lots,Ask,0,0,0,"Buy ",Magic5,0,Green); 
}

if (SirtlanType==2 && sirtlanalis<1 && sirtlansatis<1 && (SpreadSiniri/10000)>=spred && (  Hour() <3 || Hour()  >22))
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,0,0,0,"Sell",Magic6,0,Green); 
}

instead use . . .

if (SirtlanType==1 && sirtlanalis<1 && sirtlansatis<1 && (SpreadSiniri/10000)>=spred && (  TimeHour(TimeCurrent()) < 3 || TimeHour(TimeCurrent()) > 22))
{
OrderSend(Symbol(),OP_BUY ,Lots,Ask,0,0,0,"Buy ",Magic5,0,Green); 
}

if (SirtlanType==2 && sirtlanalis<1 && sirtlansatis<1 && (SpreadSiniri/10000)>=spred && (  TimeHour(TimeCurrent()) < 3 || TimeHour(TimeCurrent()) > 22))
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,0,0,0,"Sell",Magic6,0,Green); 
}
 
i thinks i solved this with your contribution. it was about magicnumber problem. thank you raptor. always you answer me and i m learing something.
 
yilmazkahya:
i thinks i solved this with your contribution. it was about magicnumber problem. thank you raptor. always you answer me and i m learing something.
Glad to have helped . . . please read about What are Function return values ? How do I use them ? it's important and most useful just when you need it the most.
Reason: