- General EA Questions
- Two EAs on the same Pair
- Two EA with same parameters and only one working
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 ?
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 ?
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 ?
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.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use