MM does not work in MT4 BT

After optimizing and saving a strategy to .mq4 (then obviously compiling to make a ex4), I load into MT4 to run a BT.  I created the strategy in SQX with MM and risk 5 (for example).   Size of decimals is 2, max lots is 50 and size if no MM is .01.  In SQX, this works as expected.  But, when performing a BT in MT4, the risk size multiplier is not working.  I would need to put in risk 50 or 99 for the lot size to increase when balance is going up.  If I just leave at 5 or 10 on a $1000 starting balance, lot size stays at .01 for a long time (on a 10 year).  Please test the attached for yourself.  Thanks.
Attachments
12-2-20aStrategy 133116 - Optimization 010776.ex4
(231.62 KiB)
12-2-20aStrategy 133116 - Optimization 010776.mq4
(226.00 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

W
#1

WJPII

05.12.2020 02:19

Task created

Attachment 12-2-20aStrategy 124156 - Optimization 09896.sqx added

12-2-20aStrategy 124156 - Optimization 09896.sqx
(91.58 KiB)
h
#2

hankeys

05.12.2020 16:05

Attachment test.jpg added

test.jpg
(421.35 KiB)
for me its working good, right from the start the opening positions are changing


but your strategy has bigger problem - you are building on UTC0 data and want to exit friday at 23....but UTC0 data will have no candle at this time, so your strategy is exiting on Sunday


and be aware - using not cloned data to your broker time will lead to a false backtest

W
#3

WJPII

05.12.2020 17:11

Attachment Capture.png added

Capture.png
(118.53 KiB)
I am running more simulations today and will BT in SQX and MT4 and upload again showing same issues.  But three things:


1.  On data - In SQX I see no where to change the UTC.  So, I assume the UTC is 0 no region and I have my ticks in MT4 set as the same (GMT+0 no region).  Isn't that correct?  

2. I am still experimenting on how to get trades not to float for days or weeks.  So on the one I sent you, it was just a one example of many.  I am working on that portion.

3. I am starting the initial generation of strategies in builder using the standard MM tab.  However, during retest, optimization, then back to restest, I am using the ATM parameter of "enable ATM on and use ATM from strategy".  Is that making any difference with the risk size calculation in BT'ing?


Will upload more examples shortly of EA's and BT results.  It is still not working on my machine/software.  And by the way, the lot sizes to increase/decease on MT4 (have not tested in SQX retester), but they are not working in terms of the exact calculation.  IE: risk set to 50% with starting balance of $200 still yields a lot size of .01 for an entire 10 year BT.  I need to increase the risk to 95% in order to get the increases past .01.

h
#4

hankeys

05.12.2020 17:40
to have correct data is the first you need to do - if not, you are screwed...most brokers are using UTC2 data with US DST - so in datamanager you need to clone your data to EST07


datamanager - tools - clone to timezone


about the ATM - my advice is simple - dont use anyhing you dont really understand. ATM has nothing to do with MM and your setting will make nothing - because your strategies dont have ATM

W
#5

WJPII

05.12.2020 17:51
On data - I am doing the clone now to the EST07.  However, I am using TDS data and have that set in MT4 at GMT0 no region.  So, what do I set that at to match with SQX?  Obviously, this is important so that BT's match.


I will not use the ATM function for the next samples.  But, I would like to have an exchange with someone to understand what this new tab does to the strategies.  There is a reason that tab has been added....

TB
#6

Tomas Brynda

07.12.2020 10:42

Status changed from New to Waiting for information

The ATM enables you to scale out positions. It replaces the original PT and makes exits based on your settings.

You can find more information here https://strategyquant.com/doc/strategyquant/settings-atm/


We've done extensive testing in recent days ad the MM should work fine. 

You can attach a log from your MetaTrader if you need further assistance.


W
#7

WJPII

07.12.2020 14:22
Thank you for the link.  I will read more on this.


I am in the process of generating strategies based on the cloned data and imported MT4 TDS ticks all matched on GMT0.  After that is done, I am going to begin testing in SQX and MT4 and see if this problem still exists.  On initial testing, EA's without ATM are calculating lot sizes currently in MT4 tester.  But again, with ATM strategies, the lot sizes (opening size) is not working.  But, I will start a new ticket once I have evidence.  My first batch could have been a bug on my computer (running too many cores).

TB
#8

Tomas Brynda

07.12.2020 14:44

Status changed from Waiting for information to Refused

Ok, thanks for the info.

We will be releasing the final build 130 next week so please try it on the latest version. The issue might be fixed there. 


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