OrderModify error 130 mt4 for many strats.

Back test produces errors in mt4 on EURUSD and XAUUSD with code as is.

OrderModify error 130


Attachments
Strategy 01826.sqx
(105.79 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

b
#1

bentra

21.07.2019 09:09

Task created

b
#2

bentra

21.07.2019 10:09

Attachment Strategy 01283.sqx added

This one gives some 130 and also some error 1 in tester on GBPUSD:

b
#3

bentra

21.07.2019 11:20

Attachment Strategy 0225.sqx added

GBPUSD giving some 130.

All of these strategies are testing wildly different from sqx because of these errors btw especially the first two get stuck in a trade and cant exit.


b
#4

bentra

21.07.2019 18:26

Subject changed from OrderModify error 130 mt4 to OrderModify error 130 mt4 for many strats.

MF
#5

Mark Fric

22.07.2019 14:08

Status changed from New to Fixed

ok, I found the problem - it was that all these strategies try to place Stop orders according to some indicators, for example:
Open Long order at ParabolicSAR(Main chart,0.11, 0.18)[1] Stop;

and this error 130 means that it was not possible to move order to a new price because it was incorrect one - for example below current Bid for Long Stop.


Set the EA parameter modifyInsteadOfReplacing = false and the price will be checked for every placed order.
b
#6

bentra

22.07.2019 17:21

Attachment Annotation 2019-07-22 111759.png added

Thanks for the reply Mark. It's true error 130 is solved by changing modifyInsteadOfReplacing . But still strat 01826 on tickmil demo data and also TDS data mt4 GBPUSD H4 terminal gets stuck in a trade and can't ever exit until 5 years later at the end of the test. (This doesn't happen in SQX)


Shall I open a new ticket as it's not related to the 130 errors after all?

MF
#7

Mark Fric

23.07.2019 09:38

Attachment sl_level.jpg added

the explanation is simple, and it is not a bug.


Since 2014 GBPUSD was in downfall. Your strategy uses only Stop loss, no Profit target, trailing stop or other exit.


It was a short order and because the market was going down it never hit your SL - hence it lasted for 5 years.


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please