Disable ModifyInsteadOfReplacing when using ATM

I found SQX's EA will put tons of stop orders for my entry, which will cause a lot of adding orders if triggered.


Actually all of my strategies (build from entry type=stop orders) will cause this problem, they are not trigger at the same time.

In such case the behavior is totally different to the backtesting.

So I think it is a fundamental strategy problem instead of bug.


I guess they are triggered by the signal, but the main problem is that the strategy will not cancel previous stop orders it put.
Presumably it will trade only single trade at a time.

Attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

WC
#1

Waid

25.12.2020 05:42

Task created

Attachment GBPJPY_H1_14117.mq4 added

Attachment EURUSD_H1_211114.sqx added

Attachment GBPJPY_H1_14117.mq4 deleted

Attachment EURUSD_H1_121138.sqx added

EURUSD_H1_121138.sqx
(105.44 KiB)
EURUSD_H1_211114.sqx
(119.25 KiB)
Here are few strategies of them. But actually ALL of the strategy that generate from stop order entry will happen this way.
WC
#2

Waid

25.12.2020 17:38
Also I think this problem is critical, since it will be out of control. 

Why? Because it will likely happen that the EA will add thousands of orders that will blow your account in a few seconds.

This problem will not only happen on my strategy but I believe everyone's EA that generated by SQX will be the same. (I'd tested it on MAC, WIN, the results are the same)

I use my real money account to test.


Again, this is very fundamental problem, if you really care about your account, then you should check it out. 

b
#3

bentra

25.12.2020 20:39
Is there any clues in the mt4 journal? Maybe your broker is giving errors and blocking some requests. It's very fishy to have an mt4 backtest to behave so wildly different than the mt4 real account. 
WC
#4

Waid

26.12.2020 01:29
Don't know, since I've flatted all of the orders due to Xmas, so I cannot show the screenshot right now. But currently I have 2 brokers, and indeed they both show me tons of pending stopping orders for same chart, same EA. I wonder if other people out there see the same problem. But since I'd posted my strategy here, the problem can be easily reproduced by directly running them on mt4. I did not manually change any code of them.
TB
#5

Tomas Brynda

05.01.2021 16:29

Status changed from New to Waiting for information

Hi Waid,

the behaviour you describe is very strange. 

Please attach a screenshot and a log from your MT4, I'll investigate it.


Best regards,

Tomas

h
#6

hankeys

05.01.2021 17:08
i am afraid, that he is playing with ATM
WC
#7

Waid

06.01.2021 00:50

Attachment IMG_6575.png added

Attachment IMG_6580.png added

Attachment IMG_6579.png added

Attachment IMG_6578.png added

Attachment IMG_6577.png added

Attachment IMG_6576.png added

Attachment EURCAD_H1_164195.mq4 added

Attachment EURCAD_H1_164195.sqx added

Attachment Screen Shot 2021-01-06 at 075042.png added

Attachment Screen Shot 2021-01-06 at 075042.png deleted

Attachment Screen Shot 2021-01-06 at 075429.png added

IMG_6575.png
(399.35 KiB)
IMG_6578.png
(395.90 KiB)
IMG_6580.png
(396.76 KiB)
IMG_6577.png
(397.42 KiB)
Screen Shot 2021-01-06 at 075429.png
(977.71 KiB)
IMG_6576.png
(398.93 KiB)
IMG_6579.png
(390.67 KiB)
EURCAD_H1_164195.mq4
(230.08 KiB)
EURCAD_H1_164195.sqx
(97.27 KiB)
Lets explain why there are 9 pending orders (I only split ATM by 3 orders, then there should only be 3)

And you can even see that they are in different entry prices.

Also I add my ea screenshot to prove that I only run 1 EA on that terminal, so it is irrelevant to duplicated EAs or same magic number things.

TB
#8

Tomas Brynda

06.01.2021 07:47
Hi Waid,

thank you for the attachments.


Can you check the parameter ModifyInsteadOfReplacing in your EA parameters?

If it is set to true, please try disabling it by setting to false.


WC
#9

Waid

06.01.2021 11:51
Yes, it is True. So is this a bug or common case?

If this is common case, can it be set(or be an option) on SQX's UI? Since it is not common behaviour to place lot of orders, so presumably it should not happen

TB
#10

Tomas Brynda

06.01.2021 12:01
So disabling the ModifyInsteadOfReplacing function helped?


It is a nice feature that can rapidly fasten backtests, but it can cause problems when using ATM in the strategy.

WC
#11

Waid

06.01.2021 12:14
Not sure if it works since after I change the variable, it deleted all my orders. So I need to wait and see if it still triggers lot of orders or not.

I did not look into the EA code, but from the naming of the variable, it should modify the open orders instead of replacing. 


If so, then obviously it actually does not behave as expected. 


And also I don't think this problem is due to ATM since I also see the same behaviour on non-ATM strategies(I saw them in version V129). So it is a fundamental bug, I suggest take it seriously since it shall not only happen on my case(I'd already saw lots of my strategies behaves the same problem), but should be universal to all people who use EAs that generated by SQX. 

WC
#12

Waid

08.01.2021 12:14

Attachment Screen Shot 2021-01-08 at 191225.png added

Screen Shot 2021-01-08 at 191225.png
(3.94 MiB)
Looks normal now. Please see the attachment.


But this should be fixed, not the workaround way like what I am doing (change every EA's ModifyInsteadOfReplacing).

TB
#13

Tomas Brynda

11.01.2021 11:32

Subject changed from Pending stop orders to Disable ModifyInsteadOfReplacing when using ATM

Status changed from Waiting for information to New

Ok I will improve the code so the ModifyInsteadOfReplacing parameter is ignored when using ATM.


Thank you


Tomas

TB
#14

Tomas Brynda

12.01.2021 09:26

Status changed from New to Fixed


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