Market order strategies and Spread

When using spread Market order strategies take up to 3 times fewer trades. I get the same differences trading them aswell comparing with backtest they trade alot more. Thats why we cant find market order strategies when generating since the spread settings makes them not trade wile they do not care in reality they just enter. Their result are also then ofcourse totally diffrent depending on what spread you are using when testing.
Attachments
  • Votes +4
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

m
#1

mabi

17.06.2020 09:11

Task created

KL
#2

kainc301

17.06.2020 09:50
I don't necessarily know that this is a bug. Market order strategies are typically harder to find from my experience. If the spread is added in then a high amount of trades will result in the spread eating into a lot of net P/L which can tank your results and thus SQ doesn't produce strategies with more trades. I would just use a custom fitness and weight a high number of trades if you want to get more trades out of the generation process.
MF
#3

Mark Fric

18.06.2020 11:09

Status changed from New to Waiting for information

please attach your buid configs with and without spread, so I can reproduce it. 


As Khari Lane says, spread makes results worse, so it could be the reason.

m
#4

mabi

18.06.2020 16:27
They were build on 126 and i retested them on 128 Automatic this i forgott .Retest this gave the diffrence not the spread. This is not good either i suppose. Do you reccomend to retest all strategies and exchange all indicators in portfolios after each release ?  I mean i lost 1/3 of the strategies atleast doing this retest and 1/3 probably if i check my 31 portfolios made from 126.


MF
#5

Mark Fric

19.06.2020 12:26
it is hard to say without seeing the configs or some the strategies that passed in 126, but not in 128.


There are some bugs fixed in each build, so it is possible that your strategies worked in SQ 126 because of a bug there.


It is generally good to retest your strategies with a new build.

E
#6

Emmanuel

22.06.2020 09:23

I agree, there are much lesser strategies with a little spread :


For exemple :

with 1 pip spread I may have 58 accepted stratégies per hour .

with 2 pip spread, I may have 8 accepted stratgies per hour.


This is why I am searching stratégies with 1 pip spread only, otherwise I will not have enough stratégies



E
#7

Emmanuel

22.06.2020 09:32
Voted for this task.
m
#8

mabi

23.06.2020 05:48
I get very different performance in regards to evrything, number of trades, result on some types of strategies depending on settings in regards to Spread and distance to price. I do not see the need for distance to price if the strategy from beginning for example a limit order of 5 pip distance if the strategy places an order even if the distance is only 2 pip since there seems to be no rule to place it 5 pip from price in the code and having a setting when testing that has no function in reality seems unnecessary it should probably be connected to real tick test with spread instead to calculate if you got filled or not. I wondered why the limit strategies fails placing orders when i had set distance to 5 pip and still i have alot of failed limit orders placements. So the difference can be huge only by this feature both in regards to trades and result. So the best thing might be is to have 0 spread and alot of slippage and 0 distance to price and let montecarlo simulate spread and distance to price to delete the bad ones.
E
#9

Emmanuel

23.06.2020 06:36

The results are really different for me too only with one pip !


is it because of the tic size ? When I look to the multicharts source code of one strategie , the ticksize =minmove/pricescale.

This is not correct, I had to replace it Inside the source with ticksize =0.0001. and here I could get the same results as SQ.


Maybe this is not related, but it look like the multiplier of the spread is too large :


with 1 I am getting 58 accepted strategie per hour , 

with 2 I am getting only 8 accepted stratégies per hour

with 3, I would probably have no strategie


there is too much difference

h
#10

hankeys

23.06.2020 07:12
MABI is right, there is missing the MIN. DISTANCE in the MQL code, if i remove the min. distance from the strats, the backtest is accurate - https://roadmap.strategyquant.com/tasks/sq4_6555
E
#11

Emmanuel

23.06.2020 10:08

hankeys,


As I am using multicharts engine, I don't have the min distance option and I still have this big difference

MF
#12

Mark Fric

23.06.2020 11:11
distance from price is a feature that is used by MetaTrader brokers, I'm not aware that it is used by Tradestation. 

And it is not something that should be simulated or supported in EA, it is simplky a property of a broker how close he allows the price to be to actual Bid/Ask.


Mabi - if your strategies don't match between SQ and MultiCharts then there must be some other reason for it. If you';ll create a task for it and attach a few examples we can look at it.


PH
#13

PhoebeHe

23.06.2020 14:25
Voted for this task.
h
#14

hankeys

23.06.2020 17:55
min. distance is the setting in the SQX itself - so the strategies should behave as we have set


for market orders the min. distance is totally nonsense, because market order is market order, so when marker building blocks are selected, the min. distance should be hidden or set to 0


for limit and stop strats - the min. distance could have logical use - if i dont want to set my pending orders too close to the price, i could use some min. distance setting


its true, that min. distance was usefull many times age, when brokers dont allow to place pending orders too close to the current price, now the limitation are over and i dont any broker which is the min. distance using for pending orders


but if we have this setting in SQX, the backtest need to be accurate and min. distance need to be solved by MQL code

o
#15

Enric

23.06.2020 20:04
Voted for this task.
E
#16

Emmanuel

27.06.2020 15:20


When I set 0 $ slippage, I have 60 accepted stratgies per hour


When I set only 1 $ slippage, I have only 12 accepted stratgies per hour. This is 5 times less stratégies !


It is a big drop with for a 1$ slippage as well. .

Dw
#17

Diwi

27.06.2020 17:03
Voted for this task.
h
#18

hankeys

27.06.2020 20:50
slippage is in pips, not USD - and what have this setting to do with some number of accepted strats?


yes, with slippage you will get worse backtest, so by your ranking criteria could lead, that accpeted strats will be lower

E
#19

Emmanuel

28.06.2020 14:19

Attachment slippage.png added

slippage.png
(5.36 KiB)


Usually yes the slippage is in pips, but it can be in $ as well . (see capture attached)


It depend if you choose Metatrader engine or Tradestation/Multicharts engine.


(It would be helpful to have it in pips with Multicharts/Tradestation engine.)





MF
#20

Mark Fric

29.06.2020 08:28

Status changed from Waiting for information to Fixed

I'm closing this task, there is nothing to be done. YOu'll have less accepted strategies with slippage. Slippage can be in pips or $ dependig on the engine, and it is configured the same way as in the target trading platform.


We added handling of min distance from price into the strategy code as well.


Votes: +4

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please