forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Forex Strategy Builder Professional → Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 16

Topic: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Dear forexsb community,

I created an MT5 EA via the FSB Pro software and was eager to backtest it. However when trying to test my EA in MT5, I got the following error:

"2022.07.06 10:45:59.876    Core 1    2021.02.12 00:00:00   Error: ActionTrade5::ManageOrderSend(): OrderCheck(): Invalid price in the request"

Why is this happening and how can I fix this issue? I have uploaded my mq5 code so you can check for yourself.

2 (edited by Grifter 2022-07-06 18:33:02)

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Do you have the currency pair set correctly? this error can happen when you have a 5 decimal order set on a 4 decimal broker. So you get an error, could be something else though

Also could be an issue with the SL/TP, some brokers only allow you to set this after the trade has executed. I'm not sure how FSB handles opening positions in this manner but I remember glancing over the code and seeing a footnote beside where you can switch this

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

I have to say that I find this extremely infuriating. I purchased a piece of very expensive software that was being advertised as a tool to create EAs out-of-box without any coding experience. Now that I have tried backtesting the ex5 file I find out that I need to poke around in the source code and try to find the needle in the haystack and fix this shit manually (which I can't as I'm not a programmer).

To give some more info: i have tried testing it on an ICMarkets Demo account which is a 5 decimal broker. Would be nice if the devs could help me out with this...

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

I think that might be a bug specific to MT5

https://www.mql5.com/en/forum/259922

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Problems usually came from mt5, please test it with lower TF such as M1 or M5, also you can try to remove SL and TP from forexsb and then export and test the EA again

do or do not there is no try

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Attach the EA!

Common problem with MT5 hedging accounts, especially demo accounts, hedging accounts are not supported by Pro experts, you have to use netting account.

How does it perform live?

7 (edited by Mr. Question 2022-07-07 16:45:11)

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

yonkuro wrote:

Problems usually came from mt5, please test it with lower TF such as M1 or M5, also you can try to remove SL and TP from forexsb and then export and test the EA again

Are you saying I should create the EA without SL and TP? I can't do that as SL and TP is part of the strategy's profitability. I already tried out all TFs and they all give the same error.

footon wrote:

Attach the EA!

Common problem with MT5 hedging accounts, especially demo accounts, hedging accounts are not supported by Pro experts, you have to use netting account.

How does it perform live?

It would have been nice if the product description mentioned this little but important detail. Is there a way to code the support of hedging accounts into the mq5 source code? If not then I have to go the tedious route and ask each one of the major FX brokers whether they even offer netting accounts. In case most of them don't, I'll have no option but to contact my cc provider and revert the payment I made. It would be a real shame because FSB Pro is an otherwise awesome software with lots of potential that unfortunately is left unused.

Addendum: was my mq5 file uploaded correctly? I can't see the file being attached in my original post.

Addendum #2: the EA hasn't performed live yet, as it is based on the daily TF and trades maybe twice a month.

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Well, for testing purposes you don't need to put it on the intended timeframe (on demo account), drop it at M1 and see what's what. There have been cases where demo accounts are non-functional in some brokers, live trade works; at the same time if this occurs then it's better to ditch the broker, who knows what problems are there.

9 (edited by Grifter 2022-07-07 19:02:03)

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Why not try using MT4?

And no the strategy was not uploaded, you need to select the file then click "ADD FILE" to the right.

10 (edited by Mr. Question 2022-07-07 20:44:00)

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Grifter wrote:

Why not try using MT4?

Because my client base increasingly uses MT5 and wants custom tailored EAs for the MT5 platform. The turnover for MT4 products is rapidly deteriorating since 2019 and is commercially not viable anymore from a Benefit-Cost-Ratio perspective.

Post's attachments

EURUSD_1D.mq5 273.87 kb, 1 downloads since 2022-07-07 

You don't have the permssions to download the attachments of this post.

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Mr. Question wrote:

Are you saying I should create the EA without SL and TP? I can't do that as SL and TP is part of the strategy's profitability. I already tried out all TFs and they all give the same error.

No, removing SL and TP is for backtest only

do or do not there is no try

12 (edited by Mr. Question 2022-07-08 12:25:50)

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

yonkuro wrote:
Mr. Question wrote:

Are you saying I should create the EA without SL and TP? I can't do that as SL and TP is part of the strategy's profitability. I already tried out all TFs and they all give the same error.

No, removing SL and TP is for backtest only

Ok I'll try it out later when I'm back home.

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

@yonkuro

It seems you were right after all. When I removed SL and TP the error didn't pop up again. However, now the problem is that the backtester doesn't trigger any orders. The graph remains linear throughout the entire testing period.

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

And here is another weird thing: I sent my source code to a professional mql5 programmer on Fiverr and he said that he ran the EA on a hedging account without errors.

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Mr. Question wrote:

And here is another weird thing: I sent my source code to a professional mql5 programmer on Fiverr and he said that he ran the EA on a hedging account without errors.

Same broker or not?

do or do not there is no try

Re: Getting Error Message when backtesting EA: OrderCheck(): Invalid price

yonkuro wrote:
Mr. Question wrote:

And here is another weird thing: I sent my source code to a professional mql5 programmer on Fiverr and he said that he ran the EA on a hedging account without errors.

Same broker or not?

No different broker.

Posts: 16

Pages 1

You must login or register to post a reply

Forex Forum → Forex Strategy Builder Professional → Getting Error Message when backtesting EA: OrderCheck(): Invalid price

Similar topics in this forum