molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Fri May 17, 2024 8:09 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: EA buying where price hasn't even been
PostPosted: Sat Mar 08, 2014 11:30 am 
Offline

Joined: Wed Jul 18, 2012 11:06 pm
Posts: 78
Back testing an EA and it is buying GBPJPY about 18 pips above where it should be most of the time, and there are a couple other instances where it is roughly 40 and 60 pips. The sells seem OK.

Any idea why it's doing this? In some instances the price hasn't even been there.


Attachments:
molanis.jpg
molanis.jpg [ 46.92 KiB | Viewed 3350 times ]
Top
 Profile  
 
 Post subject: Re: EA buying where price hasn't even been
PostPosted: Sat Mar 08, 2014 8:18 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
If you trade bars and use bar 0 (shift = 0) the chart plots the close price so any indicators are plotted using a different value than the one used for trading. Check the logs, it tells you when and why the trade took place and at what price. To review further we need to check you ea and the mt4 logs.


Top
 Profile  
 
 Post subject: Re: EA buying where price hasn't even been
PostPosted: Sun Mar 09, 2014 8:27 am 
Offline

Joined: Wed Jul 18, 2012 11:06 pm
Posts: 78
Hmmm, I think this is what the problem is... it's the weekend! Any idea how I can change the spread easily? I've had a bit of a look around and found this spread generator script but I can't get it to work. Looks like the best option is to copy the symbols.sel file from the history folder to another location (when the market is open), and copy it back (whilst disconnected from the broker) to reinstate the spreads.

2014.03.09 22:53:35.476 TestGenerator: current spread 178 used


Top
 Profile  
 
 Post subject: Re: EA buying where price hasn't even been
PostPosted: Mon Mar 10, 2014 7:01 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Not sure how to do that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009