Reply

Issue with money management

12 replies

microsporum

Customer, bbp_participant, community, sq-ultimate, 5 replies.

Visit profile

3 years ago #259804

Hi, I have several EAs that cannot deal with money management rules such as 1% risk according to balance or to account equity. I’m attaching an example of one of these strategies, together with the retest file. Can you please test it at your end and find whether there is a fix that can make that EAs decide on the lot size by applying a certain % of account balance or equity.

I have of course strategies that do this, so why still some other strategies cannot make this?

Many thanks in advance

Kr

 

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #259818

Hello,

it works for me as expected trading various amounts of lots … what issue do you have specifically?

0

microsporum

Customer, bbp_participant, community, sq-ultimate, 5 replies.

Visit profile

3 years ago #259836

Hi, here are files where I describe the issues.

Could you please have a look?

For this strategy, I’ve put the following parameters on purpose : MM with 1% risk according to balance. I put 5 lot size for “size if no MM” to see in the trade records where I could spot the events.

There are two different things that I would like to understand and find fix for.

1)     Starting balance account is 10K and even with a MM risk of max 1%, the strategy takes 5 lots for trading, which is not consistent with risking 1% of the balance account. The stop loss should have been placed at different value. How is it that a stop loss and a target profit are specified although the stop loss does not take into account a risk of 1%

2)      The trade should have been stopped when the MAE reached 1% of account balance eg when it reached 100 dollars loss. Even if the MM was not active to set up the right number of lots relative to the balance account at the moment it entered the trade, why the stop loss did not move to levels where $100 USD would have be lost (which would have corresponded to 1% loss for a 10k account)?

Many thanks for your answers.

Kr

 

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #259940

I see the stop-loss is set as (MTKeltnerChannel(Main chart,MTKeltnerChannelPrd, 2).Lower(Upper[1] +/- (2.00 * BarRange(Main chart)[1])) which can be the cause of lot size fluctuations. Will test the strategy and let you know

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #260033

The problem is in certain situations when Keltner channel is narrow but the last bar range is high, the calculated stop-loss price is above the entry price (Keltner Low + 2* Bar Range for a long trade). It this case a position is opened without stop-loss, the lot size cannot be calculated for that reason and the trade size is set to 5 lots (Lot if no MM value)

The best way now to solve this is to set Lot if no MM = 0. This will prevent from opening large bets without stop-loss properly placed

0

microsporum

Customer, bbp_participant, community, sq-ultimate, 5 replies.

Visit profile

3 years ago #260063

Hi, I saw the text disappeared when I submitted the comment and only pictures seem to stay in the post so I wrote down something again summarizing my thoughts.

Thanks

Thanks for your reply. I understand that there is a technical issue when the strategy cannot determine where placing the stop loss.
I’ve done what you recommended and used the following setting with the same strategy : risk 1% according to balance, and “size if no MM” set to zero to avoid trades with 5 lots if no MM could be calculated when trade was opened.
However, I still have issues which I will detailed below and hopefully you will understand where I’m coming from. Please have a look at the attached pictures.

Looking at the trade list, we can see that the strategy took various lot sizes when trading. That should make one think that if “size if no MM” is set to zero, when the strategy opens a trade, it should place a stop loss according to the set money management system and guarantee that if equity level reaches a 1% loss (supposed to be here represented by the maximal adverse excursion – MAE) compared to the balance, than the stop loss should be executed. This is not what happened, and many times. When can see that losses are often above the 1% level.
On one occasion (ticket 3626), the biggest MAE reached $3045 and the stop loss was executed with a loss of $2281!!! That represents more than 10% loss in just one trade. By the way, the profit/loss percentage column and the % drawdown column are confusing as one refers to the initial starting balance and the other to the current balance at the moment where the trade was triggered.
I’ve got this issue on many other strategies so I think this problem does not pertain to this strategy only.
Even if the strategy looks profitable on the long run, this gives me an issue if we cannot really have a sound management system that will take us out of the trade when equity levels reached a maximal percentage loss that we have defined according to the balance.
Would it therefore be possible to have stop losses set to x % balance in all cases even if the strategy cannot determine, at the moment of the trade, where the level of the exit parameters will be for an ideal execution. Strategies may therefore be less profitable but at least, they will guarantee a sound money management system and will allow the traders to preserve their capital.

Thanks very much

0

microsporum

Customer, bbp_participant, community, sq-ultimate, 5 replies.

Visit profile

3 years ago #260060

Hi Tomas,

Thanks for your reply. I understand the technical issues but that prevents to have a sound money management system!

I’ve done what you recommended. The parameters I used were :

-Risk fixed % balance : 1%, size decimals : 1; Maximum lots : 50; Size if no MM : 0 ==> results attached.

I’ve attached various pictures so that you understand my issue.

In the trade list attached, we can see that the strategy takes various lot sizes and does not take the fixed lot size that it took before – that’s where setting “lot if no MM value” to zero had a positive effect”. However, lot sizes taken by the strategy do not seem to be in relation to a certain percentage of risk… Why does it trade then if, according to the setting “lot if no MM value” is zero? Losses are mentioned to have been triggered by stop losses. However, the profit/loss columns mentions a percentage loss which rarely corresponds to 1% risk according to the balance.

In addition, the maximal adverse excursions are sometimes bigger that the loss level…how is it possible? I expect that if risk is set to 1% according to the balance, when equity level drawdown (represented here by the maximal adverse excusion – MAE) reaches 1%, the stop loss should be triggered.  It did not…

Focusing on the biggest MAE now, it reached $3045 (ticket 3626), triggering a 10.35% loss in just one trade! Even if the strategy seemed profitable overall, I do not see myself in front of my metatrader platform with an open drawdown representing more than 10% of my account balance.

Moreover, it seems that the profit/loss and the % drawdown column do not take the same reference for the calculations. This trade (ticket 3626) is mentioned to have triggered a 22.81% loss and a 10.35% drawdown…I guess that the profit/loss column refers to the starting capital (10K) and that the % drawdown refers to a calculation in relation to the current balance at the moment of the trade. This is a bit confusing when trying to play with data.

Would it be possible to have a REAL stop loss guaranteed to be equal to a MAE of x% risk according to the balance. Strategies may therefore not be as profitable as they seem to be but you will guarantee a sound risk management system and you will allow what should matter most for the traders : the preservation of their capital.

 

Many thanks in advance

Kind regards

 

 

Attachments:
You must be logged in to view attached files.

0

Toni

Subscriber, bbp_participant, customer, community, sq-ultimate, 3 replies.

Visit profile

2 years ago #277229

Money management with % allocation of balance does not work properly in StrategyQuant 135. See attached files.

Attachments:
You must be logged in to view attached files.

0

Brent McDonald

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

1 year ago #281659

Hi All,

 

I am experiencing a similar issue and am curious to know where you’re at with resolving this issue.

This thread also seems to address a similar issue.

https://strategyquant.com/forum/topic/3039-money-management-calculation-error/

 

I have a strategy that is set to 0.1% risk of balance and it traded 1 lot which is what is set for mmLotsIfNoM.

I have checked settings and can’t seem to figure it out. Logically I think I’ve done things correctly. This seems to be a bug of some sort. Can you please provide some insight about this.

 

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year ago #281674

Hello,

I have tested the strategy. Look at the clip attached. It seems to be working as expected

Attachments:
You must be logged in to view attached files.

0

Brent McDonald

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

1 year ago #281680

Hi Tomas,

Thanks for your quick reply. I am referring to when I tested it in MT5. It might appear to work in SQX but in MT5 it traded the 1 lot instead. It sounds like other people have experienced this issue. Do you have any idea why this may be happening? It seems like it’s using the backup lot setting instead of the default chosen percentage of balance.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year ago #281693

Hello Brent,

you might need to check whether you export the code with a correct money-management. See the image attached

Attachments:
You must be logged in to view attached files.

0

Brent McDonald

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

1 year ago #281697

Thanks so much Tomas. That solved my issue. I actually had no idea about this drop down menu.

I’m a UX designer and like to analyse software as I learn it. Overall I really love SQX. As I’ve been learning how to use it I’ve realised there’s a few gaps in education that may leave people feeling stuck. I think this might be one of those small issues because I’ve seen other people talking about it on the forums.

Anyway thank you for the quick replies, much appreciated 🙂

p.s If your team would ever like my assistance with user testing, I’m happy to help 🙂

0

Viewing 12 replies - 1 through 12 (of 12 total)