[B135] 'Cannot modify PT, it cannot be closer than minimum allowed' error appears during backtesting.

This is a backtest result on Metatrader4, EURUSD, H1.
The backtest data is imported by 'Data Manager', 'Export to MT4' function.


Environment:
MetaTrader4 version 4.00 build 1353 16 Dec 2021



Error Log1:
2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 Order modified successfuly
2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 Opening order type SELL STOP with price 1.28558000. Current market prices: 1.33857000 / 1.33840000
2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 ----------------------------------
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Moving trailing stop for order with ticket: 794 to :1.34754000
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Modifying order with ticket: 794, SL: 1.34754000 and PT: 1.33320000
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Cannot modify PT, it cannot be closer than minimum allowed: 1.33320000 > 1.33302000
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Failed, error: 0 - no error, Ask: 1.33342000, Bid: 1.33325000 Current SL: 1.35265000
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Opening order type SELL STOP with price 1.27902000. Current market prices: 1.33342000 / 1.33325000
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 ----------------------------------
2009.01.06 12:26:14  Tester: take profit #794 at 1.33320 (1.33300 / 1.33317)




Error Log2:
2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 Order modified successfuly
2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 Opening order type BUY STOP with price 1.38231000. Current market prices: 1.37786000 / 1.37769000
2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 ----------------------------------
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Moving trailing stop for order with ticket: 1447 to :1.37470000
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Modifying order with ticket: 1447, SL: 1.37470000 and PT: 1.37891000
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Cannot modify PT, it cannot be closer than minimum allowed: 1.37891000 < 1.37916000
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Failed, error: 0 - no error, Ask: 1.37893000, Bid: 1.37876000 Current SL: 1.37363000
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Opening order type BUY STOP with price 1.38501000. Current market prices: 1.37893000 / 1.37876000
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 ----------------------------------
2013.10.22 17:20:27  Tester: take profit #1447 at 1.37891 (1.37891 / 1.37908)




Error Log3:
2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 Order modified successfuly
2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 Opening order type BUY STOP with price 1.09555000. Current market prices: 1.07759000 / 1.07742000
2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 ----------------------------------
2017.03.17 04:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 04:00 Opening order type BUY STOP with price 1.09534000. Current market prices: 1.07743000 / 1.07726000
2017.03.17 04:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 04:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2017.03.17 04:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 04:00 ----------------------------------
2017.03.17 05:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 05:00 Opening order type BUY STOP with price 1.09513000. Current market prices: 1.07729000 / 1.07712000
2017.03.17 05:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 05:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2017.03.17 05:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 05:00 ----------------------------------
2017.03.17 06:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 06:00 Opening order type BUY STOP with price 1.09500000. Current market prices: 1.07730000 / 1.07713000
2017.03.17 06:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 06:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...
2017.03.17 06:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 06:00 ----------------------------------
2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Moving trailing stop for order with ticket: 1965 to :1.07411000
2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Modifying order with ticket: 1965, SL: 1.07411000 and PT: 1.07840000
2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Cannot modify PT, it cannot be closer than minimum allowed: 1.07840000 < 1.07849000
2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Failed, error: 0 - no error, Ask: 1.07826000, Bid: 1.07809000 Current SL: 1.07336000

Attachments
log.txt
(11.56 KiB)
Strategy 158110.sqx
(1.78 MiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Waiting for information
  • Priority Normal
  • Assignee tmatejka.
  • Category Backend

History

HS
#1

NAPA

16.04.2022 11:22

Task created

HS
#2

NAPA

16.04.2022 11:35

Description changed:

This is a backtest result on Metatrader4, EURUSD, H1.
The backtest data is imported by 'Data Manager', 'Export to MT4' function.


Environment:
MetaTrader4 version 4.00 build 1353 16 Dec 2021


Error Log1:

2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 Order modified successfuly

2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 Opening order type SELL STOP with price 1.28558000. Current market prices: 1.33857000 / 1.33840000

2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2009.01.06 11:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 11:00 ----------------------------------

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Moving trailing stop for order with ticket: 794 to :1.34754000

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Modifying order with ticket: 794, SL: 1.34754000 and PT: 1.33320000

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Cannot modify PT, it cannot be closer than minimum allowed: 1.33320000 > 1.33302000

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Failed, error: 0 - no error, Ask: 1.33342000, Bid: 1.33325000 Current SL: 1.35265000

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Opening order type SELL STOP with price 1.27902000. Current market prices: 1.33342000 / 1.33325000

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2009.01.06 12:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2009.01.06 12:00 ----------------------------------

2009.01.06 12:26:14  Tester: take profit #794 at 1.33320 (1.33300 / 1.33317)



Error Log2:

2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 Order modified successfuly

2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 Opening order type BUY STOP with price 1.38231000. Current market prices: 1.37786000 / 1.37769000

2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2013.10.22 16:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 16:00 ----------------------------------

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Moving trailing stop for order with ticket: 1447 to :1.37470000

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Modifying order with ticket: 1447, SL: 1.37470000 and PT: 1.37891000

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Cannot modify PT, it cannot be closer than minimum allowed: 1.37891000 < 1.37916000

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Failed, error: 0 - no error, Ask: 1.37893000, Bid: 1.37876000 Current SL: 1.37363000

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Opening order type BUY STOP with price 1.38501000. Current market prices: 1.37893000 / 1.37876000

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2013.10.22 17:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2013.10.22 17:00 ----------------------------------

2013.10.22 17:20:27  Tester: take profit #1447 at 1.37891 (1.37891 / 1.37908)



Error Log3:

2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 Order modified successfuly

2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 Opening order type BUY STOP with price 1.09555000. Current market prices: 1.07759000 / 1.07742000

2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2017.03.17 03:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 03:00 ----------------------------------

2017.03.17 04:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 04:00 Opening order type BUY STOP with price 1.09534000. Current market prices: 1.07743000 / 1.07726000

2017.03.17 04:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 04:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2017.03.17 04:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 04:00 ----------------------------------

2017.03.17 05:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 05:00 Opening order type BUY STOP with price 1.09513000. Current market prices: 1.07729000 / 1.07712000

2017.03.17 05:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 05:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2017.03.17 05:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 05:00 ----------------------------------

2017.03.17 06:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 06:00 Opening order type BUY STOP with price 1.09500000. Current market prices: 1.07730000 / 1.07713000

2017.03.17 06:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 06:00 Order with these parameters already exists and duplicate trades are not allowed. Canceling order...

2017.03.17 06:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 06:00 ----------------------------------

2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Moving trailing stop for order with ticket: 1965 to :1.07411000

2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Modifying order with ticket: 1965, SL: 1.07411000 and PT: 1.07840000

2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Cannot modify PT, it cannot be closer than minimum allowed: 1.07840000 < 1.07849000

2017.03.17 07:00:00  Strategy 1.58.110 EURUSD,H1: - SQ LOG 2017.03.17 07:00 Failed, error: 0 - no error, Ask: 1.07826000, Bid: 1.07809000 Current SL: 1.07336000


E
#3

Emmanuel

16.04.2022 13:11
Voted for this task.
TT
#4

Tamas

31.08.2022 14:31

Assignee changed from Tomas Vanek to Tomas Vanek

Milestone changed from None to Build 136 Dev 3

Category changed from None to Backend

MF
#5

Mark Fric

05.09.2022 16:01

Milestone changed from Build 136 Dev 3 to Build 136 Dev 4

MF
#6

Mark Fric

14.11.2022 10:58

Milestone changed from Build 136 Dev 4 to Build 136 RC 1

TT
#7

Tamas

18.11.2022 11:26

Assignee changed from Tomas Vanek to tmatejka

Milestone changed from Build 136 RC 1 to Build 137

TM
#8

tmatejka.

18.11.2022 21:08
Unfortunately I cannot reproduce the issue reported. Please try to download the latest development version using this link https://strategyquant.com/download/#tab-dev and export the EURUSD data using that. Also export a new MT4 properties file using the ExportProperties.mq4 script from the newer SQ (dev) version
TM
#9

tmatejka.

18.11.2022 21:09

Status changed from New to Waiting for information

MF
#10

Mark Fric

04.04.2023 11:08

Milestone changed from Build 137 to Build 138

MF
#11

Mark Fric

08.12.2023 08:59

Milestone changed from Build 138 to None


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please