I'm new to programming and have been working on creating my first EA. The latest problem I am having is that when back testing it through the strategy tester I am getting the following messages in the journal:
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: OrderSend error 4107
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: invalid price for OrderSend function
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: Error opening BUY order : 4107
Although the messages say that the price is invalid, I think it's actually a time issue. The EA should only trade during the week with all trades being closed out on Friday's at 19.00, but these messages are appearing on every Friday, sometime after 19.00 throughout the whole back test. During normal trading times, from Monday 7.00 - Friday 19.00 the back test results work perfectly with no errors. So it's as if the the EA is trying to put orders in after Friday 19.00, when it shouldn't be, but then is getting a load of errors.
Hope that makes sense. Any ideas what the problem could be?
Here is what I have so far related to the time:
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: invalid price for OrderSend function
#define ERR_INVALID_PRICE_PARAM 4107
the messages say that the price is invalid OrderSend error
What is your OrderSend function doing you don't show
I'm new to programming and have been working on creating my first EA. The latest problem I am having is that when back testing it through the strategy tester I am getting the following messages in the journal:
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: OrderSend error 4107
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: invalid price for OrderSend function
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: Error opening BUY order : 4107
Although the messages say that the price is invalid, I think it's actually a time issue.
Thank you both for your quick responses. I've actually managed to solve the problem. As I thought it was a time issue with some of the code I posted above as opposed to a problem with the OrderSend function.
No idea why it gave that particular error code but at least it's fixed! :-)
Thank you both for your quick responses. I've actually managed to solve the problem. As I thought it was a time issue with some of the code I posted above as opposed to a problem with the OrderSend function.
No idea why it gave that particular error code but at least it's fixed! :-)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm new to programming and have been working on creating my first EA. The latest problem I am having is that when back testing it through the strategy tester I am getting the following messages in the journal:
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: OrderSend error 4107
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: invalid price for OrderSend function
2013.04.18 12:00:05 2013.01.25 21:59 Flat Line Strategy EA Changes EURUSD,H1: Error opening BUY order : 4107
Although the messages say that the price is invalid, I think it's actually a time issue. The EA should only trade during the week with all trades being closed out on Friday's at 19.00, but these messages are appearing on every Friday, sometime after 19.00 throughout the whole back test. During normal trading times, from Monday 7.00 - Friday 19.00 the back test results work perfectly with no errors. So it's as if the the EA is trying to put orders in after Friday 19.00, when it shouldn't be, but then is getting a load of errors.
Hope that makes sense. Any ideas what the problem could be?
Here is what I have so far related to the time: