116; Strategy tried to place stop/limit order at incorrect price. BUG

Hi i found a strategy and setup with this problem. in sqx it has excellent results in mt4 it is not possible to make any trade



2018.12.30 00:02:51.974 2018.11.30 16:45:00  3GU_15_1215_Strategy 1.13.52Int GBPUSD,M15: Strategy tried to place stop/limit order at incorrect price. Market price: 1.275, min. price allowed: 1.275, stop/limit order price: 1.2749

Attachments
3GU_15_1215_Strategy 11352Int.mq4
(196.63 KiB)
15IntBug.cfx
(3.28 KiB)
GU_15_1215_Strategy 3251Int.sqx
(52.00 KiB)
  • Votes +15
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

IH
#1

clonex / Ivan Hudec

30.12.2018 00:06

Task created

IH
#2

clonex / Ivan Hudec

30.12.2018 00:34
Voted for this task.
KW
#3

Sean

30.12.2018 04:33
Voted for this task.
g
#4

geektrader

30.12.2018 07:19
Voted for this task.
h
#5

hankeys

30.12.2018 08:48
Voted for this task.
DR
#6

mentaledge

30.12.2018 11:05
Voted for this task.
o
#7

Enric

30.12.2018 12:58
Voted for this task.
m
#8

mabi

31.12.2018 00:44
Voted for this task.
KL
#9

kainc301

01.01.2019 20:31
Voted for this task.
k
#10

kleva

02.01.2019 22:20
Voted for this task.
AC
#11

AC1962

03.01.2019 10:04
Voted for this task.
TB
#12

Tomas Brynda

03.01.2019 10:43

Status changed from New to Refused

I backtested the strategy in MT4 and SQ and got matching results but very little trades. 

I think that the problem here is with the market prices in strategy conditions. It uses bid for long orders and ask for short orders, which is the opposite. 

The number of trades then strongly depends on spread and min distance of your broker.


If you set spread and min. distance in SQ data settings to the same value your broker has, the results should be matching.


You can also try to edit the strategy prices to use ask for long and bid for short orders.


If there's any other problem, let me know.



g
#13

geektrader

03.01.2019 21:03
I confirm your findings, Tomas. Clonex, it´s best if you exclude bid / ask from the building blocks, because this always creates spread dependent strategies, based on a FIXED spread that you´ve used during backtesting. However, during real trading, there is no fixed spread (except with ugly MM brokers, haha) and hence such strategies are prone to trade very differently to their backtests most of the time. Best avoid creating such in the first place by disabling bid / ask (so it will just use Close instead).
IH
#14

clonex / Ivan Hudec

03.01.2019 21:39
Great! thanks for the idea Gentlemans!
e
#15

eowithrand

05.01.2019 16:07
Voted for this task.
JF
#16

Honzik

08.01.2019 15:23
Voted for this task.
MG
#17

maegop

23.01.2019 04:08
Voted for this task.
AA
#18

echelon

03.07.2019 15:05
Voted for this task.
Fb
#19

FX_barcelona

20.11.2019 12:11
Voted for this task.

Votes: +15

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please