Hi all !!
next code is just a sample to check deal history.
Backtesting an Ea including this code should Print "magic ok", but journal shows both "magic ok" and "magic". Hmm... so whats wrong ?
In tester journal log, first deal entry is "deal #2". So with this for() loop, you will scan deal #0 and deal #1 that may not reference EA generated order.
for(uint i=0;i<total; i++)
Try this to see if this is correct.
if(magic==MagicNumber) { Print("magic ok"," Ticket # ",ticket); } if(magic!=MagicNumber) { Print("magic"," Ticket # ",ticket); }
In tester journal log, first deal entry is "deal #2". So with this for() loop, you will scan deal #0 and deal #1 that may not reference EA generated order.
Try this to see if this is correct.
Im checking #1 and #2 deals, and is correct.
I didn´t realize that deal #1 is the first deposit into account. Now i understand how it works.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all !!
next code is just a sample to check deal history.
Backtesting an Ea including this code should Print "magic ok", but journal shows both "magic ok" and "magic". Hmm... so whats wrong ?