SQX / Algowizard / Bug with MM and price level

Dear support team,



I experienced a bug with the money MM in algowizard.



But it  only happens, if you set a price level! as SL value. I almost get for every currency symbol (and CFD) different MM results. Sometimes it works, sometimes not. So you can check for yourself. 


Simply set a STOPLOSS price level, f.e. 1% below market price and use 100% risked money. Then check the risked money for different symbols EURUSD, CADCHF, ... (SL is hit). It should be 1% of balance/equity. But it is totally different. Sometimes risked money is lot more in size. Sometimes less. Sometimes in between.  Also CFD's are different. I tried to find a root cause, (contract size, conversation of currency rates,etc.) but I could not find any logic in this error. 


If I use fixed pip as STOPPLOSS for example -> the money MM works fine for all currency pairs and CFD's.


So probably nobody used it before and tested this way.


Happy findings...


Regards, 
Christian







Attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Low

History

CW
#1

ChrisWhite

02.02.2021 19:21

Task created

MF
#2

Mark Fric

03.02.2021 14:57

Priority changed from Normal to Low

TB
#3

Tomas Brynda

08.02.2021 14:35

Status changed from New to Waiting for information

Hi Chris,

can you attach the problematic strategy?

CW
#4

ChrisWhite

10.02.2021 17:55

Attachment Generic_Entry_Exit_Manual_Strategy_007_TP_SL.sqx added

Generic_Entry_Exit_Manual_Strategy_007_TP_SL.sqx
(10.91 KiB)
Hi Tomas,


here it is.


If've preset CADCHF as pair. Internal SL-Value = 1% of opening price (see formular). Then (for showing the bug) RISK fixed% of balance and Risk in %=100%.


StoppLoss variates from $37 to $46 in list of trades. (1% risk of initial balance of $10.000 should be $100)


My goal is to set x% of balance independent of the symbol, that I've  choosen.


Thanks for your appreciated help!


Good day.

Christian



TB
#5

Tomas Brynda

11.02.2021 14:34

Status changed from Waiting for information to Refused

Hi Chris,

I took a look at your strategy and there are two problems:

  1. You can't use OrderOpenPrice block in order's SL and PT field, because at that time the order is not opened yet (SL and PT are calculated beforehand) and it returns 0. Use bid/ask instead
  2. The MM calculation is based on the SL. If you want to risk 1% of account per trade, you just set 1% risk in MM settings and don't care about the SL. The position size will be calculated automatically according to your MM settings

Best regards,

Tomas

CW
#6

ChrisWhite

12.02.2021 14:32
Hello Tomas,


thanks for support and quick response.


That will help!


Nice weekend.

Christian


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