PDA

View Full Version : Max Draw Down EA from Matrix Grid Thread



raycolarsyce
06:03,
This thread is just a thread that I am beginning to avoid hijacking the Matrix Grid thread nevertheless I expect this to be a rather inactive thread. This may be used for questions and explanations of the MaxDd ea. The initial version simply took a dimension of the dd and closed out all orders as it hit the maximum. This upgrade adds a few features.

First, I noticed I was having trouble keeping track of that eas necessary to get their lot sizes altered based on profit or loss so now there is a means to set lower and upper limits of equilibrium. If it reaches the limit you then receive an alert or telling.

Second, I detected a much bigger problem particularly on higher risk setups. What occurred was the ea would close out all transactions at a specific degree but the matrix eas didn't understand to change the lot size and thus it just continued with the same lot dimensions. As an example, let us say the maximum dd was 40% and the equilibrium was 5,000. If the maximal dd was reached then in a perfect world (no slippage) we would have only 3,000 left. If your settings called for 0.01 lot for each 500 then you had your lot dimensions in 0.10 but after the reduction it should be in 0.06. The lot size is currently 80% bigger than it should be. Before, I'd notice this and then I'd change it but the movement occurred overnight and in the morning I didn't have time to get it and then I saw that many draw-downs got struck twice. Maybe it might have happened anyways but just to be on the safe side, I have added a choice to have the platform after the transactions are closed. It will send an alert/notifiion together with the account number if you've enabled it and then shut. This can be disabled but I invite you to utilize it. For the album, I wanted to just disable eas like you can perform manually by clicking the button in the top but I didn't see any means to do this so the following option was just to close the platform that does the same thing. If anyone knows how to achieve this then let me know how and I will make the change.

Once more I will not be publicly releasing the mq4 as it also needs an include and I think it will just confuse people but anyone desiring the source code can pm me and I will gladly send it to them. There are no dlls so that you do not have to think about me playing with any funny games.
https://www.forexsoutheast.asia/attachments/15285803171549335462.ex4

raycolarsyce
16:48,
The main reason why I need it to be inactive is I am occupied first of all and second of all that I need this to be a thread just for help operating the ea and possibly tips for improvement. Any discussion about mgt including max dd I believe should be in that thread since that's not my ea. Really this ea is universal too. It would work in any scenario where you needed a max dd. In those instances you would have to modify lot sizes so it does not matter. As it is universal, this thread may entice other individuals too but once they understand how it works they should not have a lot to say. Maybe I am missing something.

ArKaNaltt80
18:09,
You really do not honestly believe that this item will work on the very long term, right? .
This EA is absolute gaming with high risk.

raycolarsyce
19:30,
There's an update. Thanks to https://www.forexsoutheast.asia/crypto-trading/553-help-indior4-20-piviot-points.html, I've a means to disable most of eas without closing the platform. The ch is that you must now let dlls so you will find an alert in case you allow the shutdown feature but don't allow dlls. This is to warn you that the platform is going to be shutdown rather than simply penalizing all eas upon reaching maxdd. The document in the first place will be updated. Basically you don't need to allow dlls, but if you don't you wont get the new feature.

alex59vical
20:50,
If you say that it will disable most of EA's, do you mean that it is going to turn off AutoTrading and leave all of live orders intact to run their course, or will it also close all live orders?

raycolarsyce
22:11,
When you state it will disable most of EA's, do you imply it will turn off AutoTrading and leave all live orders intact to run their course, or can it also shut all live orders? Ok so lets be clear. As I stated in the very first article, there's an inherit issue when you shut all orders with any ea or perhaps manually. If the orders are closed, you have taken a reduction. After the reduction, according to standard money management the lot size should go down because now you have less cash. However, when the ea closes all the orders, mgt will open new orders as if nothing happened but in the same (now wrong) lot dimensions. This could cause it to get to the maximum dd again and even faster since the lot size is too high. To overcome this issue, I decided to enable the option to disable most of eas after the orders are closed so mgt doesn't open new orders in the incorrect lot dimensions. However, I could not find a way to do so I decided to shut mt4 after the orders closed. Then cja gave me the code to perform it so now if you'd like you could have it disable eas after the orders are closed but it takes you to enable dlls. I think this is much better because after you reopen the platform mgt could still open orders in the incorrect lot dimensions but using eas handicapped, it gives you time to make the required modifiions and then re-enable eas.

raycolarsyce
23:32,
quote I am with you on this. However, I think there is still room for live testing different lot sizes, TP settings, and from my recent experience MultiLotFactor settings (particularly with TrendChange). I would also like to see MaxDD applied to every pair separately but love this might be impossible unless incorporated into MGT CE. That is possible without altering mgt. Actually it's not that much harder. Instead of calculating everything together, it is going to calculate per pair. I am not sure this really matters. There are some factors. First, usually there is one of a few scenarios. Either you've got just one pair that's the issue or a few. If it's one then the ones which aren't causing a problem get closed for a reduction but they were not losing that much to begin with. What can happen though is that the other pairs will continue to trade and then they may be trading with too much risk after the reduction so anyways you would have wanted to stop trading. If it is a few pairs then you needed to close them all out. Because I really don't see too much of a benefit, I don't know when I have the time to implement it.

I have another idea that I want to work on first. Basically I have demos and it is slowing down my host. What I need to do is conduct one presentation per pair using a max dd indior (or maybe just have the maxdd ea log it) and the max dd for every set will probably be 50% since I visit 50% as the red line for most people and for myself. When looking back in the indior or log data I am going to be able to establish what really was the maxdd we would have needed. This way I will eliminate the need for many demos. There are issues with this manner since we won't see exactly what the account could have made but that I just cannot continue this way a lot longer. The reason for this and not expecting mt4 is since I think mt4 doesn't calculate unrealized loss as drawdown. If you had 49.9% dd and then it recovered then for mt4 this isn't dd. What's going to happen and it's going to be perceived as dd is trades will strike the tp at a reduction and for the few milliseconds that pass between every trade closure it will be considered dd and then you will think you had 10 percent dd or anything. In the event the profitable trades closed then there will be no dd but that which we call dd isn't even be computed. They also base the dd% on the max balance. Another advantage here is that we will be able to find out what settings of increased risk would have functioned. If some settings had 10 percent dd then you could triple the risk in case you were willing to accept 30 percent dd for instance.

oxnuorteda
00:53,
This thread is only a thread that I'm starting to avoid hijacking the Matrix Grid thread however I anticipate this to be a somewhat inactive thread. This will be used for explanations and questions of the MaxDd ea. The initial version simply took a dimension of the dd and then closed out all orders as it hit the max. This update adds a few features. To begin with I noticed I was having trouble keeping track of that eas needed to get their lot sizes changed based on profit or loss so now there's a way to set lower and upper limits of balance. In case... Fxtrader, I have read your article and I can tell you that the majority of the characteristics which you have described have already been coded from blessingSRmargin. I have been playing attaching the account balance to lot size. As an example, you've got 2k and you define it as .02 lot dimensions. Account rises to 3k, ea starts doing .03 lot, account drops to 900$, ea starts doing .01 lots. You can also define maxDD shutdown, max margin shutdown, max account balance shutdown etc.. Concerning DD shutdown, I prevent it for all price and I will sacrifice some profitability for lower DD at the long run, unless you enjoy taking those tremendous hits. Now if you run really hot setting, then you could be able to become more profitable, consider that reduction and have $ in your pocket. . .recover quickly, then rinse repeat. However, what if you suffer a couple of such hits in a row? Calls for some testing, but its a rather risky egy. I think that efforts should be put towards repairing the core of the difficulty - DD with some sort of hedge.

Best, Josh

carkplayerm89
02:13,
quote Fxtrader, I have read your article and I will tell you that the majority of the features you have described have already been coded in blessingSRmargin. I have been playing attaching the account balance to lot size. For instance, you've got 2k and you define it as .02 lot dimensions. Account increases ea starts doing .03 lot, account drops to 900$, ea starts doing .01 lots. Also you can define maxDD shutdown, max margin shutdown, max account equilibrium shutdown etc.. About DD shutdown, I prevent it for all price and that I will sacrifice some profitability... U got that indior or EA?

raycolarsyce
03:34,
quote Fxtrader, I have read your post and I can tell you that most of the characteristics which you have described have already been coded in blessingSRmargin. I have been playing with attaching the account balance to lot size. For instance, you have 2k and you define it as .02 lot size. Account increases to 3k, ea starts doing .03 lot, account drops to 900$, ea starts doing .01 lots. Also you can define maxDD shutdown, maximum margin shutdown, max account equilibrium shutdown etc.. About DD shutdown, I prevent it for all price and I will sacrifice some profitability... I have played around with all the Blessing ea a little and to be honest it is a bit overwhelming. I am not attempting to introduce this in rivalry to the Blessing ea. This only began as a way for people to trade this ea if they want to with some way of restricting risk and of coping with the other problems like lot size changing etc.. Also the thread/ea owner isn't very active so instead of wait for some changes I just created an ea that could do some of what I desired. If we determine that we ought to only be using the boon ea then what exactly are we here for? 1 thing that GT likes to reconcile is the tendency isn't based on indiors which Blessing can't say but I still see enough whipsawing to mention that I do not know whether it matters.

Another thing that needs to be said I believe is that risk and dd and profits are relative. I'm running a set that appears to be profitable on 0.01 lots per 1k with a maximum dd of 30%. But if you like the set by way of instance and you want less dd then you can just do 0.01 lots per 2k with a maximum dd of 15% or 0.01 lots per 3k with a maximum dd of 10%. All will likely be profitable in theory so long as the initial one is profitable. I like the idea of maximum dd though because as you said, every set at some point will fulfill it is death trade. So if we know that the ea makes a certain quantity of money on average and also we see how it recovers then that is better since we never have to find that death trade. Yes 30% is a lot but 3 hits in a row isn't 90%. You'd 10k and got struck so now you've 7k. You'd 7k and got struck so now you have 4.9k. You'd 4.9k so now you have 3.43k. That is still a 66% reduction but it's not 90% and that is the reason we are analyzing and this may be made better with reduced risk. That place made 26% this week. We have to see how it does work but if we only assume that this is an average week (it got struck once so I say it is not that far off from ordinary ) then half that would be 13% a week and then 3 15% losses in a row could be a 39% reduction. That is recoverable at a month in 13% a week and of course the question would have to be asked, after every the number of months would this occur? There is really no way to know without assessing and analyzing with no backtesting will require a long time which is the reason why I'm using cent accounts. 1 cent account got blown up but that has been because I forgot to put the maximum dd ea within an account that I raised the risk on. I have a cent account I have been utilizing 0.01 per 2.5k and it's been performing well. The dd has been manageable.

raycolarsyce
04:55,
quote U got that indior or EA? Just google blessing ea. It may be found for free on a few forex forums. I really don't wish to post links for obvious reasons.

oxnuorteda
06:16,
quote I've played with all the Blessing ea a bit and to be fair it's a bit overwhelming. I am not attempting to introduce this in rivalry to the Blessing ea. This only began as a means for folks to trade this ea should they need to with some way of restricting risk and of coping with the other problems like lot size altering etc.. In addition, the thread/ea proprietor is not very busy so instead of wait for some changes I just made an ea that may do a bit of what I desired. If we decide that we should only use the blessing ea then what exactly are we even... Dear Fxtrader, I'm not attempting to sell blessing over grid ea, but fundamentally they're extremely similar. I'm sorry if I'm going slightly OT, but I will try to answer and explain my earlier post and reply your answer. The only reason I bring it up is that blessing can be back tested, and grid ea can't. In order for me to test some thing correctly, I use 95 percent mimicking data from Dukescopy and provided that time as possible. Now, this actually takes a rather long time, but current fantastic data. The only way to test GT's would be to forward examine it. . .now this really is the issue. To get an answer of whats the typical run before the DD is hit, is going to be a tough question to answer, as well as how frequently they occur unless you're eager to examine it for a very, very long time. If you're eager to do this, God bless and I hope that ultimately you make a truckload of pips. But, there's also a fantastic chance you may end up running in circles, as DD gets hit as you described, hits again, you recuperate for a month and get hit again. I couldn't have the patience for this. Truthfully, when I first saw GTs EA, I had almost no experience with Martingales. I've been digging and testing since. As you, I'm not convinced that the tendency indior he's using isn't any superior to specialized indiors. Additionally, sometimes it will open counter trend trades, then digg out himself by much more buying. The most powerful advantage it has is that the TF which statistically allows for no less than a snapback, and after a predetermined variety of transactions and it no longer looks for profit nevertheless Break Even. Thats how the EA tries to handle reversals.
I came to this conclusion also taking a look at the transactions carefully. The only reason it will backtest is the key fashion element. Perhaps it would be possible to alter another EA to work as likewise to GTs, but that allows backtesting? This way you may come to your answer quicker. I admire GT and his work, but I am saying that there isn't any magic there, fundamentally, it a martingale. Better than many, but with the very same flaws. GTs lack of participation in his thread is unproductive because his input would be beneficial and would lead to more debate about ideas and how to code them.
On the notice of softening the setting - yes, its a balancing act between profitability of the system and DD, but in my experience the lightest configurations with a generous account size finally fail. The only real question then is the time. Consequently, if I was going for this egy, I would run hot configurations, take my profits always,not compound, rinse repeat before the music stops. See what I'm left together and decide when I'll take another ride. If I can make 2-3 times my equity before blowout, I would be a happy camper. My two cents.
Best of luck,
Josh

raycolarsyce
07:36,
quote Dear Fxtrader, I am not attempting to sell blessing over grid ea, but fundamentally they are very similar. I am sorry if I am going slightly OT, but I will attempt to answer and explain my earlier article and answer your answer. The only reason I bring it up is that blessing can be back analyzed, and grid ea can not. In order for me to check some thing properly, I utilize 95 percent modeling data from Dukescopy and as long as time as possible. Now, this actually takes a fairly long time, but present fantastic data. The only way to check GT's would be to forward examine it. . .now... What I was attempting to say before was that generally speaking you can find a fantastic set with blessing with one or two departure trades (as you call them) within a 5 year period. However, as soon as you begin to take care of a max dd type setup the sample you need to look is a lot less. That is to saythe passing trade comes after every two years so you need a lengthy sample of data. Here, you should be receiving a max dd stop out once weekly or two or at least once each month so that your sample needed is less. Generally, that transfer that resulted in the passing trade is no different than every other movement that brought you to max dd unless it did it twice which is unlikely from what I have seen and if you are concerned ten the ea could just be shut down for a while like 60 mins and by then it is really over.

oxnuorteda
08:57,
quote That which I was attempting to say before was that generally speaking you can get a good set with boon with one or 2 death trades (as you call them) over a 5 year interval. However, once you start to deal with a max dd type setup the sample you want to search is a lot less. That is to saythe passing trade comes after every 2 years so that you want a lengthy sample of data. Here, you should be receiving a max dd stop out once every week or 2 or at least once each month so that your sample needed is less. Generally, that move that caused the passing trade is no different... Correct. You are able to get blessing to decrease passing trades, but not remove them by reducing its setting, hence its profitability.
Either way, you can isolate such areas, but every passing trade is comparable but nevertheless unique and that's what makes it hard to find a right solution that would make it possible for you to sail . Also remember, altering your preferences to accommodate those areas, will alter the results of other areas. So you will still have to check with more extended periods. Its a give and take game.
It could be a good idea to code in the GT a volatility estimate. We know when thing occur, spread increases. It could be a good addition to code that if spread increases to X, ea should protect equity and stop trading. . .and as you have suggested, resume after 60 min. Also, to stop trading 1 hour in front of a news event, and resume 1 hour afterwards. In any event, I wish you the best of luck for this. It would be great to hear GTs point of view.

Sincerely,
Joshua

alex59vical
10:18,
First off I would like to give a huge thumbs up to fxtrader1081 since the MaxDD EA worked flawlessly and saved my account out of implosion during the FOMC news releases that evening.

I had been actually already trying to exit transactions this day ahead of their releases but herein lies the problem - that the temptation is to see whether the spike goes into your favour as this naturally closes open transactions. As all the pairs are all majors, open trades will be either going to get shut out for a nice profit or exponentially increase your draw down. If you close all open transactions ahead of the news you are certain to make a reduction on most of them, and if you keep in you have an increased chance of profit or greater reduction. The answer here perhaps to place a hedge on the pair likely to have the lowest spread, equivalent to all the trades that are open. For example, say you are trading at 0.01 lots per 1K and have twenty transactions open. The MGT pairs all prefer USD spiking in one way to close out profitably, and that means you place one commerce at 0.2 on say EURUSD from the opposite direction and a secure (?) Distance away so that you don't get whipsawed in. In case the news is only likely to affect one pair then simply hedge it.

I think in future I will suspend trading one pair at a time the day before the huge releases since it's simply too volatile. Even in the event that you get down to a couple of open pairs it's still a struggle to come out ahead in my own experience.

I've resigned myself to the fact that a major DD is inevitable with or without trading during news, and the way forward is to build it into the plan. The problem transactions will be the ones opened at the conclusion of a trend so there has to be either a block on trading once the trend strength is over a certain percent (signaling fatigue ), or when a higher high or lower low fails (based on fractals maybe but no thought what TF). I would be ready to sacrifice one open commerce (if it could be automatically closed), and allow the EA wait until the trend manuals or reverses, as states then would be favourable. I believe this would be much better compared to EA opening more and more trades hoping to get a reversal or appropriate pull-back. Maybe GT is already thinking along these lines but until then I'm manually activating and deactivating trading on every pair as far as possible based on these ideas.

Fxtrader1081 - if I could assist in any way with forward testing, allow me to know.

Print39
11:39,
Fxtrader, first off, thanks for sharing with all and putting time in to coding the ea. This EA is most likely a massive contribution to any type of grid established EA.


Now, I need to tackle an issue I am having. Not sure if it has been reported (or addressed) already, but I am getting FIFO errors from my broker. Once I get the FIFO mistake, the EA freezes (probably in an endless loop trying to close the order forever ).

Any info? My guess is that it's a coding issue. Would be prepared in the event that you shared with the sourcecode to spot the code.

Thanks!

raycolarsyce
13:00,
Fxtrader, first off, thanks for putting time in to coding the ea and sharing with all. This EA is most likely a massive contribution to any type of grid established EA. Now, I need to tackle a problem I'm having. Not sure if it's been reported (or addressed) already, but I'm getting FIFO mistakes from my broker. After I get the FIFO mistake, the EA freezes (likely in an endless loop trying to close the order indefinitely). Any info? My guess is that it is a coding issue. Would be prepared to patch the code in the event that you shared the sourcecode. Thanks! Ok so this ea isn't fifo safe. I reside outside of the USA so this isn't a problem but I will try to deal with it. For the record, the ea worked for me if you noticed there was a blown up account. I erroneously didn't have the ea on that account.

alex59vical
14:20,
One other observation - I've MAX DD loaded in a static chart (i.e. any pair not exchanged by MGT). If I check exactly what the DD is just before the news I will set the Max DD setting to a few% points greater and this will function as a worldwide stop-loss if the news spike goes against open trades. I know this seems like stating the b******g obvious but if my DD just before the news is only 5% then I could set 10% like as the limit before the news. This could be better compared to my regular setting of 25% which could also be taken out if left unchanged, therefore I would be 15% better off in the worst case situation. This also opens up an chance for an EA mixing Max DD with a news feed, and maybe an extra pre-news or imminent news setting which adds X% to a live DD% a couple seconds ahead of the release which overrides the normal setting, nevertheless closing all available trades if triggered. If not triggered then the open trades should be going in the ideal direction or have hit TP. And before anyone tells me you need room for trades to breath and recuperate, higher effect news is often the cause of trend reversals from which trades might not recover, or might take a long time to do so. At the mean time if your losses have been minimised you might well have recouped them and return in profit before any retrieval may have taken.

I will live with doing so manually as it's just 1 EA so isn't much of an inconvenience being separate to MGT EA, and the advantage is considerable. However, if anyone had the time or inclination to add the news feed or maybe better still a limit trading hours from-to setting and a couple of configurations for anticipated news times for that date I for one would be very curious...

Print39
15:41,
Well, I wrote my own version of MAX DD supposed to become FIFO safe. I'll probably throw it somewhere, but in the time I am still analyzing it.

If anyone wants a copy, send me a PM.

raycolarsyce
17:02,
Well, I wrote my own version of MAX DD meant to be FIFO safe. In the time I'm still testing it, although I will probably throw it somewhere. Send me a PM if anybody needs a copy. My apologies. I never got around to it.

irayl97raqwl
18:23,
Hello
yes the problem we facing time very very large drawn down we could lived with the very small lot and be patient what I am doing today every major renouncement I do halt the EA and resumed when return to normal my safety net out of this week will be $ - 500 when he move beyond that number I stop all then wait until back to almost zero, then begin again the EA 2 weeks back was much more the $1000 down but he took one week to recover gr? So I am not very clever but I believed the EA need manual intervention period to prevent to blow off your account. Please some suggestions.

carmenrozas
19:43,
Hi
When I was searching drawdown limiter for grid I came into this thread.

I don't know about the Matrix Grid EA, I havn't attempted it.
But I think that the main problem in Grid system is drawdown, '' I don't know which Grid EA out there has drawdown limiter.

Additionally, I think that the DD limitation should be a predetermined amount, rather than a percentage of their account balance.

alex59vical
21:04,
You might think (or hope) it will be an inactive thread but you've got my attention!

I should also apologise for asking a lot of questions but it's clear you understand precisely what is needed here. The lot size is an important issue because, as you point out, if the Max DD is triggered then your account will have endured a 25 percent (or XX%) loss. If the lot size cannot be automatically adjusted then it's proportionately more likely that the Max DD is going to be struck again (and again...). If lot size was change to risk% rather it would auto-adjust but that would require an update to the MGT EA and I have no idea how you'd go about implementing it so that subsequent transactions would suit the first lot size in every case.

Personally I would not trade MGT unattended for too long (or about large effect news without hedging) but nobody can track the markets 24/5. So I feel it's vital that you incorporate a safety net for those times you are away from the displays and are in live transactions you've got no other motive to close out, thus why I think this thread is essential and I like your EA.