Working with several MT4 Platforms (Forex.com, FXDD, PFG: all 4 decimal quotes) with a newly downloaded platform, i'm getting OrderSend Error 4107 starting March 23rd 2009 when I back test SEVERAL Expert Advisors (including MACD Sample and Moving Average).
The price it references in the journal is 8 digits after the decimal. For example 1.36084000, the price is extended out 5 digits and for whatever reason there are an extra three 000s on the end of the price quote (see bottom for actual journal entry).
Again, this is on newly downloaded platforms, my old ones work fine, I'm just wondering if anyone has seen this and please someone else try this and see what the problem is.
2009.07.02 09:05:37 2009.05.13 18:00 IVY_EUR_USD_B_FINAL EURUSD,H1: OrderSend error 4107
2009.07.02 09:05:37 2009.05.13 18:00 IVY_EUR_USD_B_FINAL EURUSD,H1: invalid price 1.36084000 for OrderSend function
NormalizeDouble?
I'm just wondering why this has never happened before and all of a sudden with new downloads, this error is coming up and with multiple EAs. I'll try it though thank you.
I'm just wondering why this has never happened before and all of a sudden with new downloads, this error is coming up and with multiple EAs. I'll try it though thank you.
I am also having the similar problem, it is really affecting logic testing of EA to the extent that we can not rely our backtesting.
I have tried even NormalizeDouble with ASK/BID price either, it does not work the way it should. Also all other suggestions of how to update History data gone in vain.
Today, I have decided to purchase forex-history-data from a 3rd party, http://disktrading.is99.com/disktrading/. We need authentic data to test our EA logic.
Kind Regards
ForexZak
I have had the same problem.
The fix that I have done for stability is declare 3 new static variables at the start....
static int myDigits = 4;
static double thisAsk;
static double thisBid;
Then in the init part of my Experts I read the length of Point and set myDigits to the number.
if ( Point == 0.01 ) {
myDigits = 2;
} else if ( Point == 0.001 ) {
myDigits = 3;
} else if ( Point == 0.00001 ) {
myDigits = 5;
}
Then whenever I call Ask or Bid I use.....
thisAsk = NormalizeDouble(Ask,myDigits);
Then in my OrderSend command etc, I use thisAsk and not Ask anymore.
Now I am sure that someone else out there is better than me at this and I look forward to their solution, but this worked for me and I am up and running stable again.
Gavin.
History Center gives us 5digits Historical Data .So, 4digits-broker's MT4 has this trouble.
Solution is here.
1. Export Historical data to CSV data.
2. Shutdown MT4.
3. Delete *.hst data
4. Boot MT4
5. Import CSV data to Historical data.
Worked great! Thank you. But this means that history center is not handling price feed properly. We see 4 digits but it represents internally with 5 or more (not always, just every now and then, generating random errors). Annoying.
plz do below
NormalizeDouble(Ask, Digits)
History Center gives us 5digits Historical Data .So, 4digits-broker's MT4 has this trouble.
Solution is here.
1. Export Historical data to CSV data.
2. Shutdown MT4.
3. Delete *.hst data
4. Boot MT4
5. Import CSV data to Historical data.
how to do it please? export to CSV data
i trade on demo account,not in test mode .
thanks

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Working with several MT4 Platforms (Forex.com, FXDD, PFG: all 4 decimal quotes) with a newly downloaded platform, i'm getting OrderSend Error 4107 starting March 23rd 2009 when I back test SEVERAL Expert Advisors (including MACD Sample and Moving Average).
The price it references in the journal is 8 digits after the decimal. For example 1.36084000, the price is extended out 5 digits and for whatever reason there are an extra three 000s on the end of the price quote (see bottom for actual journal entry).
Again, this is on newly downloaded platforms, my old ones work fine, I'm just wondering if anyone has seen this and please someone else try this and see what the problem is.
2009.07.02 09:05:37 2009.05.13 18:00 IVY_EUR_USD_B_FINAL EURUSD,H1: OrderSend error 4107
2009.07.02 09:05:37 2009.05.13 18:00 IVY_EUR_USD_B_FINAL EURUSD,H1: invalid price 1.36084000 for OrderSend function